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.

A211278 a(n) is the number of n-lettered words in the alphabet {1, 2, 3} with as many occurrences of the substring (consecutive subword) [1, 1] as of [2, 3].

Original entry on oeis.org

1, 3, 7, 16, 38, 95, 248, 668, 1838, 5131, 14470, 41112, 117475, 337203, 971515, 2807744, 8136090, 23630215, 68768210, 200481036, 585381973, 1711647959, 5011157073, 14687848012, 43095321203, 126565380735, 372030471493, 1094437253428, 3221999290418, 9492019319771, 27981390048004
Offset: 0

Views

Author

N. J. A. Sloane, Apr 07 2012

Keywords

Comments

Define a triangle by T(n, n) = n + 1 and T(n, 0) = 1 for n >= 0, and T(r, c) = T(r, c-1) + T(r-1, c-1) + T(r-2, c-1). The sum of the terms in row n is a(n). - J. M. Bergot, Mar 01 2013

Programs

  • Maple
    gf := (1 + sqrt((1 + x) / (1 - 3*x))) / (1 - x)^2 / 2:
    A211278 := n -> coeff(series(gf, x, n+1), x, n):
    seq(A211278(n), n = 0 .. 30); # Mélika Tebni, Mar 20 2025
  • Python
    from math import comb as C
    def a(n):
        return sum(C(n+1, k+1)*abs(sum((-1)**j*C(k, j) for j in range(k//2+1))) for k in range(n+1))
    print([a(n) for n in range(31)]) # Mélika Tebni, Mar 20 2025

Formula

Conjecture: n*a(n) - 4*n*a(n-1) +2*(n+3)*a(n-2) + 4*(n-3)*a(n-3) + 3*(-n+2)*a(n-4) = 0. - R. J. Mathar, Jun 09 2013
From Mélika Tebni, Mar 20 2025: (Start)
G.f.: (1 + sqrt((1 + x) / (1 - 3*x))) / (1 - x)^2 / 2.
a(n) = Sum_{k=0..n} binomial(n+1, k+1)*abs(Sum_{j=0..floor(k/2)} (-1)^j*binomial(k, j)).
E.g.f.: (g(x) + Integral_{x=-oo..oo} g(x) dx)*exp(x) where g(x) = Integral_{x=-oo..oo} BesselI(0, 2*x) dx + (1 + BesselI(0, 2*x)) / 2. (End)