login
A133877
N modulo 7 repeated 7 times.
4
1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1
OFFSET
0,8
COMMENTS
Periodic with length 7^2=49.
LINKS
Index entries for linear recurrences with constant coefficients, signature (1,0,0,0,0,0,-1,1,0,0,0,0,0,-1,1,0,0,0,0,0,-1,1,0,0,0,0,0,-1,1,0,0,0,0,0,-1,1,0,0,0,0,0,-1,1).
FORMULA
a(n) = (1+floor(n/7)) mod 7.
a(n) = 1+floor(n/7)-7*floor((n+7)/49).
a(n) = (((n+7) mod 49)-(n mod 7))/7.
a(n) = ((n+7-(n mod 7))/7) mod 7.
a(n) = binomial(n+7,n) mod 7 = binomial(n+7,7) mod 7.
G.f. g(x) = (1-x^7)*(1+2*x^7+3*x^14+4*x^21+5*x^28+6*x^35)/((1-x)*(1-x^49)).
G.f. g(x) = (6*x^49-7*x^42+1)/((1-x)*(1-x^7)*(1-x^49)).
G.f.: (1 + 2*x^7 + 3*x^14 + 4*x^21 + 5*x^28 + 6*x^35)/(1 - x + x^7 - x^8 + x^14 - x^15 + x^21 - x^22 + x^28 - x^29 + x^35 - x^36 + x^42 - x^43). - Charles R Greathouse IV, May 26 2026
MATHEMATICA
Mod[(1 + Quotient[Range[0, 97], 7]), 7] (* Paolo Xausa, May 28 2026 *)
PROG
(PARI) a(n)=1+n\7-7*((n+7)\49) \\ Charles R Greathouse IV, May 26 2026
KEYWORD
nonn,easy
AUTHOR
Hieronymus Fischer, Oct 10 2007
STATUS
approved