OFFSET
0,3
COMMENTS
Length-7 necklaces with n kinds of beads. - Vincenzo Librandi Apr 30 2012
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (8,-28,56,-70,56,-28,8,-1).
FORMULA
a(n) = (1/7) * Sum_{d|7} phi(d)*n^(7/d) = (1/7) * (n^7 + 6*n). [corrected by Klaus Wagner, Sep 15 2015]
G.f.: x*(1+12*x+183*x^2+328*x^3+183*x^4+12*x^5+x^6) / (1-x)^8. - R. J. Mathar, Aug 30 2011
a(n) = 8*a(n-1)-28*a(n-2)+56*a(n-3)-70*a(n-4)+56*a(n-5)-28*a(n-6)+8*a(n-7)-a(n-8), n>7. - Wesley Ivan Hurt, Sep 15 2015
MAPLE
a:=proc(n) option remember:
if n=0 then 0 elif n=1 then 1 elif n=2 then 20 elif n=3 then 315 elif n=4 then 2344 elif n=5 then 11165 elif n=6 then 39996 elif n=7 then 117655 elif n=8 then 299600 else
8*a(n-1)-28*a(n-2)+56*a(n-3)-70*a(n-4)+56*a(n-5)-28*a(n-6)+8*a(n-7)-a(n-8): fi: end: seq(a(n), n=0..50); # Wesley Ivan Hurt, Sep 15 2015
MATHEMATICA
CoefficientList[Series[x*(1+12*x+183*x^2+328*x^3+183*x^4+ 12*x^5+x^6)/(x-1)^8, {x, 0, 33}], x] (* Vincenzo Librandi, Apr 30 2012 *)
PROG
(Magma) I:=[0, 1, 20, 315, 2344, 11165, 39996, 117655]; [n le 8 select I[n] else 8*Self(n-1)-28*Self(n-2)+56*Self(n-3)-70*Self(n-4)+56*Self(n-5)-28*Self(n-6)+8*Self(n-7)-Self(n-8): n in [1..30]]; // Vincenzo Librandi, Apr 30 2012
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane, Apr 16 2000
EXTENSIONS
Edited by Christian G. Bower, Sep 07 2002
STATUS
approved