OFFSET
1,1
COMMENTS
The periodic sequence comprises the first four primes, and the selected base is the fifth prime.
LINKS
Index entries for linear recurrences with constant coefficients, signature (11,0,0,1,-11).
FORMULA
a(1)=2, a(2)=25, a(3)=280, a(4)=3087, a(5)=33959, a(n) = 11*a(n-1) + a(n-4) - 11*a(n-5). - Harvey P. Dale, Mar 15 2016
G.f.: x*(2+3*x+5*x^2+7*x^3) / ((1-x)*(1+x)*(1-11*x)*(1+x^2)). - Colin Barker, Jul 31 2016
EXAMPLE
a(8) = 45199854 = 23572357_11.
MATHEMATICA
Table[FromDigits[PadRight[{}, n, {2, 3, 5, 7}], 11], {n, 30}] (* or *) LinearRecurrence[{11, 0, 0, 1, -11}, {2, 25, 280, 3087, 33959}, 31]
PROG
(PARI) a(n) = (-2074+305*(-1)^n+(370+410*I)*(-I)^n+(370-410*I)*I^n+1029*11^n)/4880 \\ Colin Barker, Jul 31 2016
(PARI) Vec(x*(2+3*x+5*x^2+7*x^3)/((1-x)*(1+x)*(1-11*x)*(1+x^2)) + O(x^30)) \\ Colin Barker, Jul 31 2016
(Magma) R<x>:=PowerSeriesRing(Integers(), 30); Coefficients(R!( x*(2+3*x+5*x^2+7*x^3)/((1-x^4)*(1-11*x)) )); // G. C. Greubel, Jul 14 2019
(Sage) a=(x*(2+3*x+5*x^2+7*x^3)/((1-x^4)*(1-11*x))).series(x, 30).coefficients(x, sparse=False); a[1:] # G. C. Greubel, Jul 14 2019
(GAP) a:=[2, 25, 280, 3087, 33959];; for n in [6..30] do a[n]:=11*a[n-1]+a[n-4]-11*a[n-5]; od; a; # G. C. Greubel, Jul 14 2019
CROSSREFS
KEYWORD
nonn,easy,base
AUTHOR
Harvey P. Dale, Mar 15 2016
STATUS
approved