login
A037752
Base 5 digits are, in order, the first n terms of the periodic sequence with initial period 2,3,1,0.
1
2, 13, 66, 330, 1652, 8263, 41316, 206580, 1032902, 5164513, 25822566, 129112830, 645564152, 3227820763, 16139103816, 80695519080, 403477595402, 2017387977013, 10086939885066, 50434699425330, 252173497126652
OFFSET
1,1
FORMULA
G.f.: ( x*(2+x) ) / ( (x-1)*(5*x-1)*(x^2+1) ). - R. J. Mathar, Oct 15 2015
MATHEMATICA
Table[FromDigits[PadRight[{}, n, {2, 3, 1, 0}], 5], {n, 30}] (* Harvey P. Dale, Jan 26 2025 *)
(* Alternative: *)
LinearRecurrence[{6, -6, 6, -5}, {2, 13, 66, 330}, 30] (* Harvey P. Dale, Jan 26 2025 *)
PROG
(PARI) a(n)=([0, 1, 0, 0; 0, 0, 1, 0; 0, 0, 0, 1; -5, 6, -6, 6]^(n-1)*[2; 13; 66; 330])[1, 1] \\ Charles R Greathouse IV, Jun 02 2026
CROSSREFS
Sequence in context: A037745 A037626 A160459 * A037640 A391827 A137967
KEYWORD
nonn,base,easy,changed
STATUS
approved