%I #22 Dec 14 2023 05:18:51
%S 0,1,0,3,0,5,0,7,0,1,0,3,0,5,0,7,0,1,0,3,0,5,0,7,0,1,0,3,0,5,0,7,0,1,
%T 0,3,0,5,0,7,0,1,0,3,0,5,0,7,0,1,0,3,0,5,0,7,0,1,0,3,0,5,0,7,0,1,0,3,
%U 0,5,0,7,0,1,0,3,0,5,0,7,0,1,0,3,0,5,0,7,0,1,0,3,0,5,0,7,0,1,0,3,0,5,0,7,0
%N n^3 mod 8; the periodic sequence {0,1,0,3,0,5,0,7}.
%H <a href="/index/Rec#order_08">Index entries for linear recurrences with constant coefficients</a>, signature (0, 0, 0, 0, 0, 0, 0, 1).
%F G.f. = (x+3x^3+5x^5+7x^7)/(1-x^8)
%o (Sage) [power_mod(n,3,8 ) for n in range(0, 105)] # - _Zerinvary Lajos_, Oct 29 2009
%o (PARI) a(n)=n^3%8 \\ _Charles R Greathouse IV_, Apr 06 2016
%Y Cf. n mod 8 = A010877; n^2 mod 8 = A070432.
%K easy,nonn
%O 0,4
%A Bruce Corrigan (scentman(AT)myfamily.com), Aug 11 2005