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!)
A133874 n modulo 4 repeated 4 times. 5
1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,5
COMMENTS
Periodic with length 4^2 = 16.
LINKS
Index entries for linear recurrences with constant coefficients, signature (1, 0, 0, -1, 1, 0, 0, -1, 1, 0, 0, -1, 1).
FORMULA
a(n) = (1 + floor(n/4)) mod 4.
a(n) = A010873(A002265(n+4)).
a(n) = 1 + floor(n/4) - 4*floor((n+4)/16).
a(n) = (((n+4) mod 16) - (n mod 4))/4.
a(n) = ((n + 4 - (n mod 4))/4) mod 4.
G.f. g(x) = (1 + x + x^2 + x^3 + 2x^4 + 2x^5 + 2x^6 + 2x^7 + 3x^8 + 3x^9 + 3x^10 + 3x^11)/(1-x^16).
G.f. g(x) = ((1-x^4)*(1+2x^4+3x^8))/((1-x)*(1-x^16)).
G.f. g(x) = (3x^16-4x^12+1)/((1-x)*(1-x^4)*(1-x^16)).
G.f. g(x) = (1+2x^4+3x^8)/((1-x)*(1+x^4)*(1+x^8)).
MATHEMATICA
Flatten[Table[Table[Mod[n, 4], {4}], {n, 30}]] (* Harvey P. Dale, Dec 22 2013 *)
PROG
(Python)
def A133874(n): return 1+(n>>2)&3 # Chai Wah Wu, Jan 18 2023
CROSSREFS
Sequence in context: A347648 A184320 A092363 * A053384 A321857 A186313
KEYWORD
nonn
AUTHOR
Hieronymus Fischer, Oct 10 2007
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 April 19 11:31 EDT 2024. Contains 371792 sequences. (Running on oeis4.)