login
a(n) = n^3 mod 28.
2

%I #30 Dec 18 2023 14:55:08

%S 0,1,8,27,8,13,20,7,8,1,20,15,20,13,0,15,8,13,8,27,20,21,8,15,20,1,20,

%T 27,0,1,8,27,8,13,20,7,8,1,20,15,20,13,0,15,8,13,8,27,20,21,8,15,20,1,

%U 20,27,0,1,8,27,8,13,20,7,8,1,20,15,20,13,0,15,8,13,8,27,20,21,8,15,20

%N a(n) = n^3 mod 28.

%C a(n) repeats after 28 terms. - _Vincenzo Librandi_, Oct 03 2015

%C a(14k) = 0. - _Altug Alkan_, Oct 03 2015

%H G. C. Greubel, <a href="/A070490/b070490.txt">Table of n, a(n) for n = 0..1000</a>

%H <a href="/index/Rec#order_28">Index entries for linear recurrences with constant coefficients</a>, signature (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1).

%t Table[PowerMod[n, 3, 28], {n, 0, 100}] (* _Vincenzo Librandi_, Oct 03 2015 *)

%o (Sage) [power_mod(n,3,28 ) for n in range(0, 81)] # _Zerinvary Lajos_, Oct 30 2009

%o (PARI) vector(100, n, (n-1)^3 % 28); \\ _Altug Alkan_, Oct 03 2015

%Y Cf. A000578, A070489.

%K nonn,easy

%O 0,3

%A _N. J. A. Sloane_, May 12 2002