OFFSET
0,4
COMMENTS
a(n) = A000166(n) for n <= 7.
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..1000
FORMULA
G.f.: -(631*x^43 +953*x^42 -174*x^41 -3296*x^40 -6097*x^39 -3581*x^38 -11543*x^37 -14483*x^36 +3789*x^35 +67487*x^34 +120551*x^33 +88025*x^32 +64863*x^31 +14567*x^30 -69173*x^29 -386577*x^28 -600146*x^27 -488818*x^26 -105459*x^25 +188333*x^24 +315070*x^23 +540030*x^22 +633950*x^21 +478098*x^20 +53481*x^19 -202345*x^18 -260532*x^17 -228778*x^16 -157245*x^15 -78737*x^14 +1943*x^13 +17159*x^12 +13669*x^11 +7299*x^10 +3547*x^9 +981*x^8 -1103*x^7 -151*x^6 -25*x^5 -5*x^4 +3*x -1) / ((x-1) *(x+1) *(x^2+x+1) *(x^2-x+1) *(x^13-x^11+x^10-x^9-x^8-9*x^7 -3*x^6+3*x^5+7*x^4-x^3+x^2+2*x-1) *(x^3+x^2+x-1) *(x^3-x^2-x-1) *(x^12+x^11+x^10-x^8+x^7-8*x^6-7*x^5-5*x^4-2*x^3-x^2-x+1)).
EXAMPLE
a(8) = 4752: 21436587, 21436785, 21436857, 21437586, ..., 87653421, 87654123, 87654312, 87654321.
MAPLE
a:= n-> `if`(n=0, 1, LinearAlgebra[Permanent](Matrix(n, (i, j)->
`if`(i<>j and (i-j mod n<=3 or j-i mod n<=3), 1, 0)))):
seq(a(n), n=0..15);
MATHEMATICA
a[n_] := If[n == 0, 1, Permanent[Table[If[i != j && (Mod[i - j, n] <= 3 || Mod[j - i, n] <= 3), 1, 0], {i, 1, n}, {j, 1, n}]]]; Table[a[n], {n, 0, 15}] (* Jean-François Alcover, Jan 06 2016, adapted from Maple *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Alois P. Heinz, Jul 15 2015
STATUS
approved