Find as many positive integers, N, not ending in 0, as you can, such that N^2 contains N and N^4 contains N^2.
1 1 1
5 25 625
25 625 390625
90625 8212890625 67451572418212890625
Not in oeis.
------------------------
ns = [i for i in range(1,100001) if str(i)[-1] != '0']
squares = [i*i for i in ns]
fourths = [i*i for i in squares]
for i,f in enumerate(ns):
if str(f) in str(squares[i]) and str(squares[i]) in str(fourths[i]):
print(ns[i], squares[i], fourths[i])
|
Posted by Larry
on 2023-09-09 09:20:53 |