A010881 Simple periodic sequence: n mod 12.
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11
Offset: 0
Examples
a(27) = 3 since 27 = 12*2+3.
Links
- Index entries for linear recurrences with constant coefficients, signature (0,0,0,0,0,0,0,0,0,0,0,1).
Crossrefs
Programs
-
Mathematica
Mod[Range[0, 100], 12] (* Paolo Xausa, Feb 02 2024 *)
-
PARI
A010881(n)=n%12 \\ M. F. Hasler, Sep 25 2014
Formula
From Hieronymus Fischer, May 31 2007: (Start)
a(n) = n mod 12.
Complex representation: a(n) = (1/12)*(1-r^n)*Sum_{k=1..11} k*Product_{m=1..11, m<>k} (1-r^(n-m)) where r = exp(Pi/6*i) = (sqrt(3)+i)/2 and i = sqrt(-1).
Trigonometric representation: a(n) = (512/3)^2*(sin(n*Pi/12))^2*Sum_{k=1..11} k*Product_{m=1..11, m<>k} (sin((n-m)*Pi/12))^2.
G.f.: (Sum_{k=1..11} k*x^k)/(1-x^12).
G.f.: x*(11*x^12-12*x^11+1)/((1-x^12)*(1-x)^2). (End)
From Hieronymus Fischer, Jun 11 2007: (Start)
a(n) = (n mod 2)+2*(floor(n/2) mod 2)+4*(floor(n/4) mod 3) = A000035(n)+2*A000035(A004526(n))+4*A010872(A002265(n)). (End)
a(A001248(k) + 17) = 6 for k>2. - Reinhard Zumkeller, May 12 2010
a(n) = A034326(n+1)-1. - M. F. Hasler, Sep 25 2014
Comments