OFFSET
1,2
COMMENTS
A198095 is included in this sequence.
If n is in the sequence, then so is 10*n. - Robert Israel, Aug 16 2020
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
137 is in the sequence because 1*1! + 3*2! + 7*3! = 1 + 6 + 42 = 7^2.
MAPLE
for n from 1 to 520 do :l:=length(n):n0:=n:s:=0:for m from l by -1 to 1 do:q:=n0:u:=irem(q, 10):v:=iquo(q, 10):n0:=v :s:=s+u*m!:od: z:=sqrt(s):if z=floor(z) then printf(`%d, `, n):else fi:od:
# Simpler:
filter:= proc(n)
local L, k;
L:= convert(n, base, 10);
issqr(add(L[-k]*k!, k=1..nops(L)))
end proc:
select(filter, [$1..1000]); # Robert Israel, Aug 16 2020
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Michel Lagneau, Oct 21 2011
STATUS
approved