cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A004099 Sum of digits of Euler numbers.

Original entry on oeis.org

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, 88, 91, 110, 113, 124, 106, 128, 170, 142, 157, 164, 128, 178, 172, 146, 176, 178, 178, 209, 206, 214, 247, 218, 263, 268, 235, 335, 284, 259, 295, 254, 278, 295, 283, 254, 308, 313
Offset: 0

Views

Author

Keywords

Crossrefs

Programs

  • Maple
    b:= proc(n, k) option remember; `if`(k=0,
         `if`(n=0, 1, 0), b(n, k-1)+b(n-1, n-k))
        end:
    a:= proc(n) option remember;
          add(i,i=convert(b(n$2), base, 10))
        end:
    seq(a(n), n=0..100);  # Alois P. Heinz, Apr 17 2023
  • Python
    from itertools import accumulate, islice
    def A004099_gen(): # generator of terms
        yield from (1,1)
        blist = (0,1)
        while True:
            blist = tuple(accumulate(reversed(blist),initial=0))
            yield sum(int(d) for d in str(blist[-1]))
    A004099_list = list(islice(A004099_gen(),30)) # Chai Wah Wu, Apr 17 2023

Formula

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