A081753 a(n) = floor(n/12) if n == 2 (mod 12); a(n) = floor(n/12) + 1 otherwise.
1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 8, 9, 9, 9, 9, 9, 9
Offset: 0
Examples
G.f. = 1 + x + x^3 + x^4 + x^5 + x^6 + x^7 + x^8 + x^9 + x^10 + x^11 + 2*x^12 + ... - _Michael Somos_, Dec 11 2018
References
- Apostol, Tom M., Modular Functions and Dirichlet Series in Number Theory, second edition, Springer, 1990.
- Yves Hellegouarch, "Invitation aux mathématiques de Fermat-Wiles", Dunod, 2ème édition, p. 285
Links
- Robert Israel, Table of n, a(n) for n = 0..10000
- Index entries for linear recurrences with constant coefficients, signature (1,0,0,0,0,0,0,0,0,0,0,1,-1).
Programs
-
Maple
seq(floor(n/12)+1-charfcn[0](n-2 mod 12), n=0..100); # Robert Israel, Sep 16 2016
-
Mathematica
Table[If[Mod[n, 12] == 2, Floor[n/12], Floor[n/12] + 1], {n, 0, 120}] (* or *) CoefficientList[Series[(1 - x^2 + x^3)/(1 - x - x^12 + x^13), {x, 0, 120}], x] (* Michael De Vlieger, Sep 19 2016 *) a[ n_] := Quotient[n, 12] + Boole[Mod[n, 12] != 2]; (* Michael Somos, Dec 11 2018 *)
-
PARI
a(k) = if(k%12-2, floor(k/12)+1, floor(k/12))
-
PARI
{a(n) = n\12 + (n%12!=2)}; /* Michael Somos, Dec 11 2018 */
Formula
a(n) = floor(n/12) if n == 2 (mod 12); a(n) = floor(n/12) + 1 otherwise.
G.f.: (1-x^2+x^3)/(1-x-x^12+x^13). - Robert Israel, Sep 16 2016
Comments