login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A109718 Periodic sequence with period {0,1,0,3}, or n^3 mod 4. 3
0, 1, 0, 3, 0, 1, 0, 3, 0, 1, 0, 3, 0, 1, 0, 3, 0, 1, 0, 3, 0, 1, 0, 3, 0, 1, 0, 3, 0, 1, 0, 3, 0, 1, 0, 3, 0, 1, 0, 3, 0, 1, 0, 3, 0, 1, 0, 3, 0, 1, 0, 3, 0, 1, 0, 3, 0, 1, 0, 3, 0, 1, 0, 3, 0, 1, 0, 3, 0, 1, 0, 3, 0, 1, 0, 3, 0, 1, 0, 3, 0, 1, 0, 3, 0, 1, 0, 3, 0, 1, 0, 3, 0, 1, 0, 3, 0, 1, 0, 3, 0, 1, 0, 3, 0 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,4
COMMENTS
Since n^(2k+1) mod 4 = n^3 mod 4 for k>1 this sequence also represents n^5 mod 4; and n^7 mod 4; etc.
LINKS
FORMULA
a(n) = n^3 mod 4.
G.f. = (x+3*x^3)/(1-x^4).
a(n) = (n mod 2)*(n mod 4) = (1+(-1)^(n+1))*(2+i^(n+1))/2 with i=sqrt(-1). - Bruno Berselli, Mar 14 2011
PROG
(Sage) [power_mod(n, 3, 4 )for n in range(0, 105)] # Zerinvary Lajos, Oct 29 2009
(Magma) &cat[[0, 1, 0, 3]: k in [0..26]]; // Bruno Berselli, Mar 14 2011
(PARI) a(n)=n^3%4 \\ Charles R Greathouse IV, Apr 06 2016
CROSSREFS
n mod 4 = A010873; n^2 mod 4 = A000035.
Cf. A110270; A131743. - Bruno Berselli, Mar 14 2011
Sequence in context: A357868 A357881 A204689 * A053385 A213543 A247254
KEYWORD
easy,nonn
AUTHOR
Bruce Corrigan (scentman(AT)myfamily.com), Aug 09 2005
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 18 22:34 EDT 2024. Contains 370951 sequences. (Running on oeis4.)