login
A270346
a(n) is the number whose base-11 digits are, in order, the first n terms of the simple periodic sequence: repeat 2,3,5,7.
0
2, 25, 280, 3087, 33959, 373552, 4109077, 45199854, 497198396, 5469182359, 60161005954, 661771065501, 7279481720513, 80074298925646, 880817288182111, 9688990170003228, 106578891870035510, 1172367810570390613, 12896045916274296748, 141856505079017264235
OFFSET
1,1
COMMENTS
The periodic sequence comprises the first four primes, and the selected base is the fifth prime.
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
Cf. A033113.
Sequence in context: A174970 A249893 A085830 * A367506 A212022 A198710
KEYWORD
nonn,easy,base
AUTHOR
Harvey P. Dale, Mar 15 2016
STATUS
approved