OFFSET
1,1
COMMENTS
A subsequence of A056020. - R. J. Mathar, Feb 10 2008
Next term > 10000000. - R. J. Mathar, Oct 20 2009
If it exists, a(24) > 10^10. - Hugo Pfoertner, May 17 2021
If it exists, a(24) > 10^29. - Michael S. Branicky, May 30 2021
LINKS
Michael S. Branicky, Python program
EXAMPLE
Corresponding squares are 64, 361, 1225, 2116, 3025, 5041, 21025, 23104, 32041, 63001, 110224, 130321, 201601, 203401, 300304, 421201, 20241001, 410022001, 410103001, 600201001, 10110101401, 13110021001, 100021020121.
8^2 = 64 and 6+4 = 10. 316261^2 = 100021020121 and 1+0+0+0+2+1+0+2+0+1+2+1 = 10. - Zak Seidov, Aug 26 2009
MATHEMATICA
s={}; Do[If[Mod[n, 10]>0&&10==Total[IntegerDigits[n^2]], AppendTo[s, n]], {n, 10^8}]; s (* Zak Seidov, Aug 26 2009 *)
PROG
(Python)
def A007953(n):
a=0
sh=n
while sh > 0:
a += sh % 10
sh //= 10
return a
def isA135027(n):
if n % 10 == 0:
return False
else:
return A007953(n**2) == 10
for n in range(70000):
if isA135027(n):
print(n)
# R. J. Mathar, Oct 20 2009
(Python) # See linked program to go to large numbers
def ok(n): return n%10 != 0 and sum(map(int, str(n*n))) == 10
print(list(filter(ok, range(316262)))) # Michael S. Branicky, May 30 2021
(PARI) is(n) = sumdigits(n^2)==10 && n%10 > 0 \\ Felix Fröhlich, May 17 2021
CROSSREFS
KEYWORD
base,more,nonn
AUTHOR
Zak Seidov, Feb 10 2008
STATUS
approved