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!)
A131955 a(n) = sum of digits of (n!! + a(n-1)). 5

%I #13 Oct 29 2020 19:29:34

%S 1,3,6,5,2,5,2,17,17,23,14,23,23,23,23,23,41,41,41,41,41,50,41,59,68,

%T 59,68,59,68,86,86,104,95,95,104,86,104,86,122,95,104,113,149,95,140,

%U 95,131,122,149,140,140,113,185,149,185,149,176,194,176,185,194,194,203

%N a(n) = sum of digits of (n!! + a(n-1)).

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

%e a(4)=6+4!!=6+8=14 -> Sum_digits(14)=5.

%p P:=proc(n) local a,i,k,w; a:=0; for i from 1 by 1 to n do w:=0; k:=a+2^((1+2*i-cos(i*Pi))/4)*Pi^((cos(i*Pi)-1)/4)*GAMMA(1+1/2*i); while k>0 do w:=w+k-(trunc(k/10)*10); k:=trunc(k/10); od; a:=w; print(a); od; end: P(100);

%p # alternative:

%p A[1]:= 1:

%p for n from 2 to 100 do

%p A[n]:= convert(convert(doublefactorial(n)+A[n-1],base,10),`+`);

%p od:

%p seq(A[i],i=1..100); # _Robert Israel_, Oct 29 2020

%Y Cf. A055263, A131954.

%K easy,nonn,base,look

%O 1,2

%A _Paolo P. Lava_ and _Giorgio Balzarotti_, Jul 31 2007

%E Offset corrected by _Robert Israel_, Oct 29 2020

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 April 25 09:38 EDT 2024. Contains 371967 sequences. (Running on oeis4.)