login
A131955
a(n) = sum of digits of (n!! + a(n-1)).
5
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, 59, 68, 59, 68, 86, 86, 104, 95, 95, 104, 86, 104, 86, 122, 95, 104, 113, 149, 95, 140, 95, 131, 122, 149, 140, 140, 113, 185, 149, 185, 149, 176, 194, 176, 185, 194, 194, 203
OFFSET
1,2
LINKS
EXAMPLE
a(4)=6+4!!=6+8=14 -> Sum_digits(14)=5.
MAPLE
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);
# alternative:
A[1]:= 1:
for n from 2 to 100 do
A[n]:= convert(convert(doublefactorial(n)+A[n-1], base, 10), `+`);
od:
seq(A[i], i=1..100); # Robert Israel, Oct 29 2020
CROSSREFS
Sequence in context: A144179 A155540 A225451 * A249281 A316169 A346525
KEYWORD
easy,nonn,base,look
AUTHOR
EXTENSIONS
Offset corrected by Robert Israel, Oct 29 2020
STATUS
approved