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!)
A004099 Sum of digits of Euler numbers. 2

%I #10 Oct 24 2023 19:32:10

%S 1,1,1,2,5,7,7,11,17,25,13,29,29,34,46,38,41,61,61,65,62,70,85,74,83,

%T 88,91,110,113,124,106,128,170,142,157,164,128,178,172,146,176,178,

%U 178,209,206,214,247,218,263,268,235,335,284,259,295,254,278,295,283,254,308,313

%N Sum of digits of Euler numbers.

%H Chai Wah Wu, <a href="/A004099/b004099.txt">Table of n, a(n) for n = 0..10000</a>

%F a(n) = A007953(A000111(n)).

%p b:= proc(n, k) option remember; `if`(k=0,

%p `if`(n=0, 1, 0), b(n, k-1)+b(n-1, n-k))

%p end:

%p a:= proc(n) option remember;

%p add(i,i=convert(b(n$2), base, 10))

%p end:

%p seq(a(n), n=0..100); # _Alois P. Heinz_, Apr 17 2023

%o (Python)

%o from itertools import accumulate, islice

%o def A004099_gen(): # generator of terms

%o yield from (1,1)

%o blist = (0,1)

%o while True:

%o blist = tuple(accumulate(reversed(blist),initial=0))

%o yield sum(int(d) for d in str(blist[-1]))

%o A004099_list = list(islice(A004099_gen(),30)) # _Chai Wah Wu_, Apr 17 2023

%Y Cf. A000111, A007953.

%K nonn,base

%O 0,4

%A _N. J. A. Sloane_

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 16:45 EDT 2024. Contains 371989 sequences. (Running on oeis4.)