A002264 Nonnegative integers repeated 3 times.
0, 0, 0, 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 6, 6, 6, 7, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10, 10, 11, 11, 11, 12, 12, 12, 13, 13, 13, 14, 14, 14, 15, 15, 15, 16, 16, 16, 17, 17, 17, 18, 18, 18, 19, 19, 19, 20, 20, 20, 21, 21, 21, 22, 22, 22, 23, 23, 23, 24, 24, 24, 25
Offset: 0
Links
- Michael De Vlieger, Table of n, a(n) for n = 0..10000
- Václav Chvátal, A combinatorial theorem in plane geometry, Journal of Combinatorial Theory, Series B 18 (1975), pp. 39-41, doi:10.1016/0095-8956(75)90061-1.
- Clark Kimberling, A Combinatorial Classification of Triangle Centers on the Line at Infinity, J. Int. Seq., Vol. 22 (2019), Article 19.5.4.
- Index entries for linear recurrences with constant coefficients, signature (1,0,1,-1).
Crossrefs
Programs
-
Haskell
a002264 n = a002264_list !! n a002264_list = 0 : 0 : 0 : map (+ 1) a002264_list -- Reinhard Zumkeller, Nov 06 2012, Apr 16 2012
-
Magma
[Floor(n/3): n in [0..100]]; // Vincenzo Librandi, Apr 29 2015
-
Magma
&cat [[n,n,n]: n in [0..30]]; // Bruno Berselli, Apr 29 2015
-
Maple
seq(i$3,i=0..100); # Robert Israel, Aug 04 2014
-
Mathematica
Flatten[Table[{n, n, n}, {n, 0, 25}]] (* Harvey P. Dale, Jun 09 2013 *) Floor[Range[0, 20]/3] (* Eric W. Weisstein, Aug 12 2023 *) Table[Floor[n/3], {n, 0, 20}] (* Eric W. Weisstein, Aug 12 2023 *) Table[(n - Cos[2 (n - 2) Pi/3] + Sin[2 (n - 2) Pi/3]/Sqrt[3] - 1)/3, {n, 0, 20}] (* Eric W. Weisstein, Aug 12 2023 *) Table[(n - ChebyshevU[n - 2, -1/2] - 1)/3, {n, 0, 20}] (* Eric W. Weisstein, Aug 12 2023 *) LinearRecurrence[{1, 0, 1, -1}, {0, 0, 0, 1}, 20] (* Eric W. Weisstein, Aug 12 2023 *) CoefficientList[Series[x^3/((-1 + x)^2 (1 + x + x^2)), {x, 0, 20}], x] (* Eric W. Weisstein, Aug 12 2023 *)
-
PARI
a(n)=n\3 /* Jaume Oliver Lafont, Mar 25 2009 */
-
PARI
v=[0,0];for(n=2,50,v=concat(v,n-2-v[#v]-v[#v-1]));v \\ Derek Orr, Apr 28 2015
-
Sage
[floor(n/3) for n in range(0,79)] # Zerinvary Lajos, Dec 01 2009
Formula
a(n) = floor(n/3).
a(n) = (3*n-3-sqrt(3)*(1-2*cos(2*Pi*(n-1)/3))*sin(2*Pi*(n-1)/3))/9. - Hieronymus Fischer, Sep 18 2007
a(n) = (n - A010872(n))/3. - Hieronymus Fischer, Sep 18 2007
Complex representation: a(n) = (n - (1 - r^n)*(1 + r^n/(1 - r)))/3 where r = exp(2*Pi/3*i) = (-1 + sqrt(3)*i)/2 and i = sqrt(-1). - Hieronymus Fischer, Sep 18 2007; - corrected by Guenther Schrack, Sep 26 2019
a(n) = Sum_{k=0..n-1} A022003(k). - Hieronymus Fischer, Sep 18 2007
G.f.: x^3/((1-x)*(1-x^3)). - Hieronymus Fischer, Sep 18 2007
a(n) = (n - 1 + 2*sin(4*(n+2)*Pi/3)/sqrt(3))/3. - Jaume Oliver Lafont, Dec 05 2008
For n >= 3, a(n) = floor(log_3(3^a(n-1) + 3^a(n-2) + 3^a(n-3))). - Vladimir Shevelev, Jun 22 2010
a(n) = (n - 3 + A010872(n-1) + A010872(n-2))/3 using Zumkeller's 2008 formula in A010872. - Adriano Caroli, Nov 23 2010
a(n) = n - 2 - a(n-1) - a(n-2) for n > 1 with a(0) = a(1) = 0. - Derek Orr, Apr 28 2015
From Wesley Ivan Hurt, May 27 2015: (Start)
a(n) = a(n-1) + a(n-3) - a(n-4), n > 4.
a(n) = (n - 1 + 0^((-1)^(n/3) - (-1)^n) - 0^((-1)^(n/3)*(-1)^(1/3) + (-1)^n))/3. (End)
a(n) = (3*n - 3 + r^n*(1 - r) + r^(2*n)*(r + 2))/9 where r = (-1 + sqrt(-3))/2. - Guenther Schrack, Sep 26 2019
E.g.f.: exp(x)*(x - 1)/3 + exp(-x/2)*(3*cos(sqrt(3)*x/2) + sqrt(3)*sin(sqrt(3)*x/2))/9. - Stefano Spezia, Oct 17 2022
Comments