OFFSET
1,2
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
a(3) = 36 is a member of the sequence because 36 + 3^2 + 6^2 = 81 = 9^2.
MAPLE
filter:= n -> issqr(n + convert(map(`^`, convert(n, base, 10), 2), `+`)):
select(filter, [$0..10^4]);
MATHEMATICA
Select[Range[0, 5000], IntegerQ[Sqrt[#+Total[IntegerDigits[#]^2]]]&] (* Harvey P. Dale, Jan 01 2022 *)
PROG
(Python)
from sympy.ntheory.primetest import is_square
def ssd(n): return sum(int(d)**2 for d in str(n))
def ok(n): return is_square(n + ssd(n))
def aupto(limit): return [m for m in range(limit+1) if ok(m)]
print(aupto(4000)) # Michael S. Branicky, Jan 30 2021
(PARI) isok(k) = issquare(k+norml2(digits(k))); \\ Michel Marcus, Jan 31 2021
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Will Gosnell and Robert Israel, Nov 07 2019
STATUS
approved