A218130 Number of length 6 primitive (=aperiodic or period 6) n-ary words.
0, 0, 54, 696, 4020, 15480, 46410, 117264, 261576, 530640, 998910, 1770120, 2984124, 4824456, 7526610, 11387040, 16772880, 24132384, 34006086, 47038680, 63991620, 85756440, 113368794, 148023216, 191088600, 244124400, 308897550, 387400104, 481867596, 594798120
Offset: 0
Links
- Alois P. Heinz, Table of n, a(n) for n = 0..1000
- Index entries for linear recurrences with constant coefficients, signature (7, -21, 35, -35, 21, -7, 1).
Crossrefs
Row n=6 of A143324.
Programs
-
Maple
a:= n-> (((n^3-1)*n-1)*n+1)*n: seq(a(n), n=0..30);
-
Mathematica
Table[n^6-n^3-n^2+n,{n,0,30}] (* or *) LinearRecurrence[{7,-21,35,-35,21,-7,1},{0,0,54,696,4020,15480,46410},30] (* Harvey P. Dale, Oct 13 2017 *)
Formula
G.f.: -6*x^2*(9+53*x+47*x^2+11*x^3)/(x-1)^7.
a(n) = n^6-n^3-n^2+n.