OFFSET
0,2
COMMENTS
[Empirical] a(base,n)=a(base-1,n)+A002426(n+1) for base>=1.int(n/2)+1
a(n) = T(n, 4) where T(n, k) = Sum_{j=1..k} (1+2*cos(j*Pi/(k+1)))^n. These are the number of smooth cyclic words of length n over the alphabet {1,2,3,4}. See theorem 3.3 in Knopfmacher and others, reference in A124696. - Peter Luschny, Aug 13 2012
LINKS
Colin Barker, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (4,-3,-2,1).
FORMULA
G.f.: A(x) = (3*x^4-4*x^3-3*x^2+1) / ((x^2-3*x+1)*(1-x-x^2)). - Colin Barker, Jul 19 2015
From Peter Bala, Nov 08 2022: (Start)
A(x) = 1 + x*B'(x)/B(x), where B(x) = 1/((1 - x - x^2)*(1 - 3*x + x^2)) = 1 + 4*x + 13*x^2 + 38*x^3 + ... has integral coefficients. See A056014.
It follows that the Gauss congruences hold: a(n*p^r) == a(n*p^(r-1)) (mod p^r) for all primes p and positive integers n and r. (End)
MATHEMATICA
LinearRecurrence[{4, -3, -2, 1}, {1, 4, 10, 22, 54}, 30] (* Harvey P. Dale, Oct 14 2016 *)
PROG
(S/R) stvar $[N]:(0..M-1) init $[]:=0 asgn $[]->{*} kill +[i in 0..N-1](($[i]`-$[(i+1)mod N]`>1)+($[(i+1)mod N]`-$[i]`>1))
(PARI) Vec(-(3*x^4-4*x^3-3*x^2+1)/((x^2-3*x+1)*(x^2+x-1)) + O(x^40)) \\ Colin Barker, Jul 19 2015
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
R. H. Hardin, Dec 28 2006
STATUS
approved