A008611 a(n) = a(n-3) + 1, with a(0)=a(2)=1, a(1)=0.
1, 0, 1, 2, 1, 2, 3, 2, 3, 4, 3, 4, 5, 4, 5, 6, 5, 6, 7, 6, 7, 8, 7, 8, 9, 8, 9, 10, 9, 10, 11, 10, 11, 12, 11, 12, 13, 12, 13, 14, 13, 14, 15, 14, 15, 16, 15, 16, 17, 16, 17, 18, 17, 18, 19, 18, 19, 20, 19, 20, 21, 20, 21, 22, 21, 22, 23, 22, 23, 24, 23, 24, 25, 24, 25, 26, 25, 26, 27, 26, 27, 28
Offset: 0
Examples
G.f. = 1 + x^2 + 2*x^3 + x^4 + 2*x^5 + 3*x^6 + 2*x^7 + 3*x^8 + 4*x^9 + ...
References
- D. J. Benson, Polynomial Invariants of Finite Groups, Cambridge, 1993, p. 103.
Links
- Vincenzo Librandi, Table of n, a(n) for n = 0..10000
- Cristian Cobeli, Aaditya Raghavan, and Alexandru Zaharescu, On the central ball in a translation invariant involutive field, arXiv:2408.01864 [math.NT], 2024. See p. 7.
- Frederik Glitzner and David Manlove, Perspectives on Unsolvability in Roommates Markets, arXiv:2505.06717 [cs.GT], 2025. See p. 13.
- INRIA Algorithms Project, Encyclopedia of Combinatorial Structures 447.
- Gerard P. Michon, Counting Polyhedra.
- Yang Yuansheng et al., The crossing number of C(n; {1,3}), Discr. Math. 289 (2004), 107-118.
- Index entries for linear recurrences with constant coefficients, signature (1,0,1,-1).
- Index entries for Molien series.
Crossrefs
Programs
-
Haskell
a008611 n = n' + mod r 2 where (n', r) = divMod (n + 1) 3 a008611_list = f [1,0,1] where f xs = xs ++ f (map (+ 1) xs) -- Reinhard Zumkeller, Nov 25 2013
-
Magma
[(n-1)-2*Floor((n-1)/3): n in [0..90]]; // Vincenzo Librandi, Aug 21 2011
-
Maple
with(numtheory): for n from 1 to 70 do:it:=0: y:=[fsolve(x^n+x+1, x, complex)] : for m from 1 to nops(y) do : if abs(y[m])< 1 then it:=it+1:else fi:od: printf(`%d, `,it):od: A008611:=n->(n-1)-2*floor((n-1)/3); seq(A008611(n), n=0..50); # Wesley Ivan Hurt, May 18 2014
-
Mathematica
With[{nn=30},Riffle[Riffle[Range[nn],Range[0,nn-1]],Range[nn],3]] (* or *) RecurrenceTable[{a[0]==a[2]==1,a[1]==0,a[n]==a[n-3]+1},a,{n,90}] (* Harvey P. Dale, Nov 06 2011 *) LinearRecurrence[{1, 0, 1, -1}, {1, 0, 1, 2}, 100] (* Vladimir Joseph Stephan Orlovsky, Feb 23 2012 *) a[ n_] := Quotient[n - 1, 3] + Mod[n + 2, 3]; (* Michael Somos, Jan 23 2014 *)
-
PARI
{a(n) = (n-1) \ 3 + (n+2) % 3}; /* Michael Somos, Jan 23 2014 */
Formula
a(n) = a(n-3) + 1.
a(n) = (n-1) - 2*floor((n-1)/3).
G.f.: (1 + x^2 + x^4)/(1 - x^3)^2.
After the initial term, has form {n, n+1, n+2} for n=0, 1, 2, ...
From Paul Barry, Mar 18 2004: (Start)
a(n) = Sum_{k=0..n} (-1)^floor(2*(k-2)/3);
a(n) = 4*sqrt(3)*cos(2*Pi*n/3 + Pi/6)/9 + (n+1)/3. (End)
From Paul Barry, Oct 15 2004: (Start)
G.f.: (1 - x + x^2)/((1 + x + x^2)*(x-1)^2);
a(n) = Sum_{k=0..floor(n/2)} binomial(n-k, k)*A078008(n-2k)*(-1)^k. (End)
a(n) = -a(-2-n) for all n in Z.
Euler transform of length 6 sequence [0, 1, 2, 0, 0, -1]. - Michael Somos, Jan 23 2014
a(n) = ((n-1) mod 3) + floor((n-1)/3). - Wesley Ivan Hurt, May 18 2014
PSUM transform of A257075. - Michael Somos, Apr 15 2015
a(n) = A194960(n-3), n >= 0, with extended A194960. See the a(n) formula two lines above. - Wolfdieter Lang, May 06 2017
From Guenther Schrack, Nov 07 2020: (Start)
a(n) = (3*n + 3 + 2*(w^(2*n)*(1 - w) + w^n*(2 + w)))/9, where w = (-1 + sqrt(-3))/2, a primitive third root of unity;
a(n) = (n + 1 + 2*A049347(n))/3;
a(n) = (2*n - A330396(n-1))/3. (End)
E.g.f.: (3*exp(x)*(1 + x) + exp(-x/2)*(6*cos(sqrt(3)*x/2) - 2*sqrt(3)*sin(sqrt(3)*x/2)))/9. - Stefano Spezia, May 06 2022
Sum_{n>=2} (-1)^n/a(n) = 3*log(2) - 1. - Amiram Eldar, Sep 10 2023
Comments