OFFSET
0,2
COMMENTS
Repeats with period 18*9 = 162.
FORMULA
a(n) = (2^n + 3*floor(n/18)) mod 27.
MATHEMATICA
Table[Mod[(2^n + 3 Floor[n/18]), 27], {n, 0, 70}] (* Vincenzo Librandi, Feb 23 2016 *)
PROG
(Magma) [(2^n+3*Floor(n/18)) mod 27: n in [0..80]]; // Vincenzo Librandi, Feb 23 2016
(PARI) a(n) = (2^n + 3*(n\18)) % 27; \\ Michel Marcus, Feb 24 2016
CROSSREFS
KEYWORD
nonn,easy,less
AUTHOR
Joe Slater, Feb 22 2016
STATUS
approved