A109753 n^3 mod 8; the periodic sequence {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, 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, 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, 1, 0, 3, 0, 5, 0, 7, 0
Offset: 0
Links
- Index entries for linear recurrences with constant coefficients, signature (0, 0, 0, 0, 0, 0, 0, 1).
Programs
-
PARI
a(n)=n^3%8 \\ Charles R Greathouse IV, Apr 06 2016
-
Sage
[power_mod(n,3,8 ) for n in range(0, 105)] # - Zerinvary Lajos, Oct 29 2009
Formula
G.f. = (x+3x^3+5x^5+7x^7)/(1-x^8)