Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
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
OFFSET
0,5
COMMENTS
Periodic with length 4^2 = 16.
LINKS
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
KEYWORD
nonn
AUTHOR
Hieronymus Fischer, Oct 10 2007
STATUS
approved