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.

A081909 a(n) = 3^n(n^2 - n + 18)/18.

Original entry on oeis.org

1, 3, 10, 36, 135, 513, 1944, 7290, 26973, 98415, 354294, 1259712, 4428675, 15411789, 53144100, 181752822, 617003001, 2080591515, 6973568802, 23245229340, 77096677311, 254535261273, 836828256240, 2740612539186
Offset: 0

Views

Author

Paul Barry, Mar 31 2003

Keywords

Comments

Binomial transform of A081908. 3rd binomial transform of (1,0,1,0,0,0,...). Case k=3 where a(n,k) = k^n*(n^2 - n + 2k^2)/(2k^2) with g.f. (1 - 2kx + (k^2+1)x^2)/(1-kx)^3.
a(n) is the number of words of length n defined on 4 letters where one of the letters is not used or is used exactly twice. - Enrique Navarrete, Mar 29 2024

Examples

			a(2)=10 since the number of words of length 2 defined on {0,1,2,3} that don't use 0 or use it twice are 12, 21, 13, 31, 23, 32, 11, 22, 33, 00. - _Enrique Navarrete_, Mar 29 2024
		

Crossrefs

Programs

  • Magma
    [3^n*(n^2-n+18)/18: n in [0..40]]; // Vincenzo Librandi, Apr 27 2011
  • Mathematica
    Table[3^n(n^2-n+18)/18,{n,0,30}] (* or *) CoefficientList[Series[ (1-6x+10x^2)/(1-3x)^3,{x,0,30}],x]  (* Harvey P. Dale, Apr 26 2011 *)

Formula

a(n) = 3^n*(n^2 - n + 18)/18.
G.f.: (1 - 6x + 10x^2)/(1-3x)^3.
E.g.f.: exp(3*x)*(1+x^2/2). - Enrique Navarrete, Mar 29 2024