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.

Showing 1-2 of 2 results.

A349977 Inverse Euler transform of the classical tribonacci numbers.

Original entry on oeis.org

0, 1, 1, 1, 3, 4, 8, 13, 23, 38, 68, 114, 201, 343, 600, 1037, 1817, 3157, 5543, 9692, 17047, 29952, 52828, 93157, 164743, 291459, 516679, 916626, 1628684, 2896261, 5156925, 9189769, 16393652, 29268223, 52300907, 93529331, 167390342, 299787639, 537281476
Offset: 1

Views

Author

Peter Luschny, Dec 07 2021

Keywords

Comments

The classical tribonacci numbers are defined a(n) = a(n-1) + a(n-2) + a(n-3) for n >= 3 with a(0) = 0 and a(1) = a(2) = 1.
See A349904 for the analogous sequence for the shifted tribonacci numbers A000073.

Crossrefs

Programs

  • Mathematica
    (* EulerInvTransform is defined in A022562. *)
    EulerInvTransform[LinearRecurrence[{1, 1, 1}, {0, 1, 1}, 40]]
  • Python
    # After the Maple program of Alois P. Heinz in A349904.
    from functools import cache
    from math import comb
    def euler_inv_trans(a: callable, len: int):
        @cache
        def h(n: int, k: int):
            if n == 0: return 1
            if k <  1: return 0
            bk = b(k)
            R = range(int(bk == 0), 1 + n // k)
            return sum(comb(bk + j - 1, j) * h(n - k * j, k - 1) for j in R)
        @cache
        def b(n: int): return a(n - 1) - h(n, n - 1)
        return [b(n) for n in range(1, len)]
    @cache
    def tribonacci(n: int):
        return sum(tribonacci(n - j - 1) for j in range(3)) if n >= 3 else min(n, 1)
    print(euler_inv_trans(tribonacci, 40))

A376789 Table read by antidiagonals: T(n,k) is the number of Lyndon words of length k on the alphabet {0,1} whose prefix is the bitwise complement of the binary expansion of n with n >= 1 and k >= 1.

Original entry on oeis.org

1, 1, 0, 2, 1, 0, 3, 1, 0, 0, 6, 1, 1, 0, 0, 9, 2, 2, 1, 0, 0, 18, 2, 4, 1, 0, 0, 0, 30, 4, 7, 1, 0, 1, 0, 0, 56, 5, 14, 1, 1, 1, 0, 0, 0, 99, 8, 25, 2, 1, 2, 1, 0, 0, 0, 186, 11, 48, 2, 2, 3, 2, 1, 0, 0, 0, 335, 18, 88, 3, 3, 6, 4, 1, 0, 0, 0, 0
Offset: 1

Views

Author

Peter Kagey, Oct 04 2024

Keywords

Comments

T(n,k) = 0 if n is in A366195.
Row 1 is A059966.
Row 2 is A006206 for n > 1.
Row 3 is A065491 for n > 2.
Row 4 is A065417.
Row 6 is A349904.

Examples

			Table begins
n\k| 1  2  3  4  5  6   7   8   9  10   11   12
---+-------------------------------------------
 1 | 1, 1, 2, 3, 6, 9, 18, 30, 56, 99, 186, 335
 2 | 0, 1, 1, 1, 2, 2,  4,  5,  8, 11,  18,  25
 3 | 0, 0, 1, 2, 4, 7, 14, 25, 48, 88, 168, 310
 4 | 0, 0, 1, 1, 1, 1,  2,  2,  3,  4,   6,   7
 5 | 0, 0, 0, 0, 1, 1,  2,  3,  5,  7,  12,  18
 6 | 0, 0, 1, 1, 2, 3,  6, 10, 18, 31,  56,  96
 7 | 0, 0, 0, 1, 2, 4,  8, 15, 30, 57, 112, 214
 8 | 0, 0, 0, 1, 1, 1,  1,  1,  2,  2,   3,   3
 9 | 0, 0, 0, 0, 0, 0,  1,  1,  1,  2,   3,   4
10 | 0, 0, 0, 0, 1, 1,  2,  3,  5,  7,  12,  18
11 | 0, 0, 0, 0, 0, 0,  0,  0,  0,  0,   0,   0
12 | 0, 0, 0, 1, 1, 2,  3,  5,  9, 15,  26,  43
T(6,5) = 2 because 6 is 110 in base 2, its bitwise complement is 001, and there are T(6,5) = 2 length-5 Lyndon words that begin with 001: 00101 and 00111.
		

Crossrefs

Showing 1-2 of 2 results.