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.

A382618 a(n) = 3^(n-2)*(binomial(n,2) + 3*n + 9).

Original entry on oeis.org

1, 4, 16, 63, 243, 918, 3402, 12393, 44469, 157464, 551124, 1909251, 6554439, 22320522, 75464622, 253497357, 846585513, 2812385772, 9298091736, 30606218631, 100341906651, 327757733694, 1066956026706, 3462376910193, 11203038280413, 36150980669568, 116360969030172
Offset: 0

Views

Author

Enrique Navarrete, Apr 01 2025

Keywords

Comments

a(n) is the number of words of length n defined on 4 letters where a chosen letter (for example, the first letter of the alphabet) is used at most twice.

Examples

			a(4) = 243 since from the 256 words defined on {0, 1, 2, 3} we subtract the 4 words of type 0001, the 4 words of type 0002, the 4 words of type 0003, and 0000.
		

Crossrefs

Cf. A006234.

Programs

  • Mathematica
    a[n_] := 3^(n-2)*(n^2 + 5*n + 18)/2; Array[a, 27, 0] (* Amiram Eldar, Apr 01 2025 *)

Formula

E.g.f.: (1 + x + x^2/2)*exp(3*x).
G.f.: x*(1 - 5*x + 7*x^2)/(1 - 3*x)^3. - Stefano Spezia, Apr 01 2025