login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A198097
n such that d(1)*1! + d(2)*2! + ... + d(k)*k! is a perfect square, where d(i) are the decimal digits of n.
1
1, 4, 9, 10, 14, 21, 27, 33, 40, 46, 52, 65, 71, 79, 84, 90, 98, 100, 104, 108, 111, 133, 137, 140, 162, 166, 191, 195, 210, 212, 225, 241, 249, 254, 270, 278, 283, 301, 323, 327, 330, 352, 356, 381, 385, 400, 402, 415, 431, 439, 444, 460, 468, 473, 497, 513
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
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
Sequence in context: A243170 A356711 A054294 * A358762 A157908 A064973
KEYWORD
nonn,base
AUTHOR
Michel Lagneau, Oct 21 2011
STATUS
approved