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.

A380976 a(0) = 0, a(1) = 1. Thereafter, a(n) = a(n-1) + a(n-2) converted to base n, read in base n+1.

Original entry on oeis.org

0, 1, 1, 2, 3, 6, 10, 18, 31, 54, 93, 172, 300, 536, 955, 1686, 2976, 5224, 9491, 17089, 30618, 54774, 97553, 172749, 305164, 554749, 982005, 1757750, 3140769, 5584153, 9924579, 17582197, 31100841, 56191241, 99509416, 177595495, 316647651, 564436376, 1002970166
Offset: 0

Views

Author

Kaleb Williams, Feb 10 2025

Keywords

Examples

			a(5) = a(4) + a(3) = 5 = 10_5 -> 10_6 = 6.
a(13) = a(12) + a(11) = 472 = 2A4_13 -> 2A4_14 = 536.
		

Programs

  • Maple
    a:= proc(n) option remember; `if`(n<2, n, (l-> add(l[i]*
         (n+1)^(i-1), i=1..nops(l)))(convert(a(n-1)+a(n-2), base, n)))
        end:
    seq(a(n), n=0..43);  # Alois P. Heinz, Feb 12 2025
  • Mathematica
    A380976[n_] := A380976[n] = If[n <= 1, n, FromDigits[IntegerDigits[A380976[n-1] + A380976[n-2], n], n+1]];
    Array[A380976, 50, 0] (* Paolo Xausa, Feb 14 2025 *)
  • Python
    from itertools import count, islice
    from sympy.ntheory.digits import digits
    def fromdigits(digs, base): return sum(d*base**i for i, d in enumerate(digs[::-1]))
    def agen(): # generator of terms
        yield from (a := [0, 1])
        for n in count(2):
            yield (an := fromdigits(digits(a[-2] + a[-1], n)[1:], n+1))
            a = [a[-1], an]
    print(list(islice(agen(), 37))) # Michael S. Branicky, Feb 11 2025