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.

A209528 The number of length n ternary sequences in which no symbol appears exactly once.

Original entry on oeis.org

1, 0, 3, 3, 21, 63, 243, 969, 3657, 12987, 43959, 143685, 458109, 1435047, 4439451, 13612257, 41474577, 125798643, 380343519, 1147320285, 3455328261, 10394294175, 31242648963, 93853773369, 281825558361, 846030320043, 2539248584583, 7620161669109
Offset: 0

Views

Author

Geoffrey Critzer, Mar 20 2012

Keywords

Examples

			a(2)=3 because we have (letting our alphabet be {0,1,2}) three length two sequences: (0,0), (1,1), (2,2).
a(3)=3 because we have: (0,0,0), (1,1,1), (2,2,2).
		

Crossrefs

Cf. A130102.

Programs

  • Mathematica
    nn=20; a=Exp[x]-x; Range[0,nn]! CoefficientList[Series[a^3, {x,0,nn}], x]
    LinearRecurrence[{10,-40,82,-91,52,-12},{1,0,3,3,21,63,243,969,3657,12987},30] (* Harvey P. Dale, Aug 20 2015 *)
  • PARI
    Vec(-(72*x^9 -312*x^8 +546*x^7 -492*x^6 +325*x^5 -202*x^4 +109*x^3 -43*x^2 +10*x -1) / ((x -1)^3*(2*x -1)^2*(3*x -1)) + O(x^100)) \\ Colin Barker, Nov 30 2014

Formula

E.g.f.: (exp(x)-x)^3.
For n>3: a(n) = 3^n - 3*n*2^(n-1) + 3*n*(n-1).
G.f.: -(72*x^9 -312*x^8 +546*x^7 -492*x^6 +325*x^5 -202*x^4 +109*x^3 -43*x^2 +10*x -1) / ((x -1)^3*(2*x -1)^2*(3*x -1)). - Colin Barker, Nov 30 2014