OFFSET
1,1
COMMENTS
If k is a term, then so is 10*k. - Robert Israel, Dec 23 2022
LINKS
Robert Israel, Table of n, a(n) for n = 1..2000
EXAMPLE
a(1) = 10 because 100*1 = 10^2;
a(2) = 20: 200*2 = 20^2;
a(11) = 110: 1100*11 = 110^2;
a(14) = 252: 144*441 = 252^2;
a(28) = 816: 768*867 = 816^2.
MAPLE
rev:= proc(n) local L, i; L:= convert(n, base, 10); add(L[-i]*10^(i-1), i=1..nops(L)) end proc:
g:= proc(d, m) local r; r:= rev(d); r <> d and m = d*r end proc:
filter:= proc(n) ormap(g, numtheory:-divisors(n^2), n^2) end proc:
select(filter, [$1..3000]); # Robert Israel, Dec 23 2022
PROG
(PARI) L=List(); for (k=1, 3*10^6, my (r=fromdigits(Vecrev(digits(k))), s); if (issquare(r*k, &s) && r!=k, if(s<3001, listput(L, s)))); Set(L)
(Python)
from itertools import count, islice
from sympy import divisors
def A359173_gen(startvalue=1): # generator of terms >= startvalue
return filter(lambda n:any(d*int(str(d)[::-1])==n**2 for d in divisors(n**2, generator=True) if d != n), count(max(startvalue, 1)))
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Hugo Pfoertner, Dec 17 2022
STATUS
approved