login
a(n) = n^3 mod 16.
1

%I #25 Dec 18 2023 14:44:03

%S 0,1,8,11,0,13,8,7,0,9,8,3,0,5,8,15,0,1,8,11,0,13,8,7,0,9,8,3,0,5,8,

%T 15,0,1,8,11,0,13,8,7,0,9,8,3,0,5,8,15,0,1,8,11,0,13,8,7,0,9,8,3,0,5,

%U 8,15,0,1,8,11,0,13,8,7,0,9,8,3,0,5,8,15,0,1,8,11,0,13,8,7,0,9,8,3,0,5,8,15

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

%C a(4k) = 0, k>=0, k being integer. - _G. C. Greubel_, Mar 30 2016

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

%H <a href="/index/Rec#order_16">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, 1).

%F From _G. C. Greubel_, Mar 28 2016: (Start)

%F a(n) = a(n-16).

%F G.f.: (-x -8*x^2 -11*x^3 -13*x^5 -8*x^6 -7*x^7 -9*x^9 -8*x^10 -3*x^11 -5*x^13 -8*x^14 -15*x^15)/(-1 + x^16). (End)

%t Table[Mod[n^3, 16], {n, 0, 100}] (* _G. C. Greubel_, Mar 28 2016 *)

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

%o (Magma) [Modexp(n, 3, 16): n in [0..100]]; // _Vincenzo Librandi_, Mar 28 2016

%o (PARI) a(n)=n^3%16 \\ _Charles R Greathouse IV_, Apr 06 2016

%K nonn,easy

%O 0,3

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