login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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

%I #10 Aug 16 2020 19:09:38

%S 1,4,9,10,14,21,27,33,40,46,52,65,71,79,84,90,98,100,104,108,111,133,

%T 137,140,162,166,191,195,210,212,225,241,249,254,270,278,283,301,323,

%U 327,330,352,356,381,385,400,402,415,431,439,444,460,468,473,497,513

%N 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.

%C A198095 is included in this sequence.

%C If n is in the sequence, then so is 10*n. - _Robert Israel_, Aug 16 2020

%H Robert Israel, <a href="/A198097/b198097.txt">Table of n, a(n) for n = 1..10000</a>

%e 137 is in the sequence because 1*1! + 3*2! + 7*3! = 1 + 6 + 42 = 7^2.

%p 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:

%p # Simpler:

%p filter:= proc(n)

%p local L,k;

%p L:= convert(n,base,10);

%p issqr(add(L[-k]*k!,k=1..nops(L)))

%p end proc:

%p select(filter, [$1..1000]); # _Robert Israel_, Aug 16 2020

%Y Cf. A198095, A198044.

%K nonn,base

%O 1,2

%A _Michel Lagneau_, Oct 21 2011

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 5 21:36 EDT 2024. Contains 375700 sequences. (Running on oeis4.)