OFFSET
0,2
LINKS
FORMULA
a(n) = a(n-3), n>=5. - G. C. Greubel, Jun 13 2016
G.f. 1+2*x -4*x^2*(1+2*x+4*x^2) / ( (x-1)*(1+x+x^2) ). - R. J. Mathar, Jun 18 2019
MATHEMATICA
Table[Mod[2^n, 28], {n, 0, 50}] (* G. C. Greubel, Jun 13 2016 *)
PowerMod[2, Range[0, 90], 28] (* or *) PadRight[{1, 2}, 90, {8, 16, 4}] (* Harvey P. Dale, Mar 09 2023 *)
PROG
(Sage) [power_mod(2, n, 28)for n in range(0, 84)] #
(PARI) a(n)=lift(Mod(2, 28)^n) \\ Charles R Greathouse IV, Mar 22 2016
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Zerinvary Lajos, Nov 03 2009
STATUS
approved