%I #17 Sep 08 2022 08:46:15
%S 1,2,4,8,16,5,10,20,13,26,25,23,19,11,22,17,7,14,4,5,7,11,19,8,13,23,
%T 16,2,1,26,22,14,25,20,10,17,7,8,10,14,22,11,16,26,19,5,4,2,25,17,1,
%U 23,13,20,10,11,13,17,25,14,19,2,22,8,7,5,1,20
%N 2^n mod 27 successively displaced by 0, 3, 6, 9, etc.
%C Repeats with period 18*9 = 162.
%F a(n) = (2^n + 3*floor(n/18)) mod 27.
%t Table[Mod[(2^n + 3 Floor[n/18]), 27], {n, 0, 70}] (* _Vincenzo Librandi_, Feb 23 2016 *)
%o (Magma) [(2^n+3*Floor(n/18)) mod 27: n in [0..80]]; // _Vincenzo Librandi_, Feb 23 2016
%o (PARI) a(n) = (2^n + 3*(n\18)) % 27; \\ _Michel Marcus_, Feb 24 2016
%Y Cf. A070337.
%K nonn,easy,less
%O 0,2
%A _Joe Slater_, Feb 22 2016