%I #118 Aug 03 2024 17:54:51
%S 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,
%T 11,12,12,12,13,13,13,14,14,14,15,15,15,16,16,16,17,17,17,18,18,18,19,
%U 19,19,20,20,20,21,21,21,22,22,22,23,23,23,24,24,24,25,25,25,26,26,26
%N Positive integers repeated three times.
%C Arises from Gleason's theorem on self-dual codes: the Molien series is 1/((1-x^8)*(1-x^24)) for the weight enumerators of doubly-even binary self-dual codes; also 1/((1-x^4)*(1-x^12)) for ternary self-dual codes.
%C The number of partitions of n into distinct parts where each part is either a power of two or three times a power of two.
%C Number of partitions of n into parts 1 or 3. - _Reinhard Zumkeller_, Aug 15 2011
%C The dimension of the space of modular forms on Gamma_1(3) of weight n>0 with a(q) the generator of weight 1 and c(q)^3 / 27 the generator of weight 3 where a(), c() are cubic AGM theta functions. - _Michael Somos_, Apr 01 2015
%C Cubic AGM theta functions: a(q) (see A004016), b(q) (A005928), c(q) (A005882).
%C a(n-1) is the minimal number of circles that can be drawn through n points in general position in the plane. - _Anton Zakharov_, Dec 31 2016
%C Number of partitions of n into distinct parts from A029744.- _R. J. Mathar_, Mar 01 2023
%C Number of representations n=sum_i c_i*2^i with c_i in {0,1,3,4} [Anders]. See A120562 or A309025 for other c_i sets. - _R. J. Mathar_, Mar 01 2023
%D G. E. Andrews, K. Eriksson, Integer Partitions, Cambridge Univ. Press, 2004. page 12 Exer. 7
%D D. J. Benson, Polynomial Invariants of Finite Groups, Cambridge, 1993, p. 100.
%D F. J. MacWilliams and N. J. A. Sloane, Theory of Error-Correcting Codes, 1977, Chapter 19, Eq. (14), p. 601 and Theorem 3c, p. 602; also Problem 5 p. 620.
%H Vincenzo Librandi, <a href="/A008620/b008620.txt">Table of n, a(n) for n = 0..10000</a>
%H K. Anders, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL19/Anders/anders9.html">Counting Non-Standard Binary Representations</a>, JIS vol 19 (2016) #16.3.3 example 1.
%H E. R. Berlekamp, F. J. MacWilliams and N. J. A. Sloane, <a href="http://dx.doi.org/10.1109/TIT.1972.1054817">Gleason's Theorem on Self-Dual Codes</a>, IEEE Trans. Information Theory, IT-18 (1972), 409-414.
%H INRIA Algorithms Project, <a href="http://ecs.inria.fr/services/structure?nbr=210">Encyclopedia of Combinatorial Structures 210</a>
%H INRIA Algorithms Project, <a href="http://ecs.inria.fr/services/structure?nbr=449">Encyclopedia of Combinatorial Structures 449</a>
%H F. J. MacWilliams, C. L. Mallows and N. J. A. Sloane, <a href="http://neilsloane.com/doc/gleason2.html">Generalizations of Gleason's theorem on weight enumerators of self-dual codes</a>, IEEE Trans. Inform. Theory, 18 (1972), 794-805; see p. 802, col. 2, foot.
%H G. Nebe, E. M. Rains and N. J. A. Sloane, <a href="http://neilsloane.com/doc/cliff2.html">Self-Dual Codes and Invariant Theory</a>, Springer, Berlin, 2006.
%H Jan Snellman and Michael Paulsen, <a href="http://www.cs.uwaterloo.ca/journals/JIS/VOL7/Snellman/snellman2.html">Enumeration of Concave Integer Partitions</a>, J. Integer Seqs., Vol. 7, 2004.
%H <a href="/index/Mo#Molien">Index entries for Molien series</a>
%H <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (1,0,1,-1).
%F a(n) = floor(n/3) + 1.
%F a(n) = A010766(n+3, 3).
%F G.f.: 1/((1-x)*(1-x^3)) = 1/((1-x)^2*(1+x+x^2)).
%F a(n) = A001840(n+1) - A001840(n). - _Reinhard Zumkeller_, Aug 01 2002
%F From _Paul Barry_, May 19 2004: (Start)
%F Convolution of A049347 and A000027.
%F a(n) = Sum_{k=0..n} (k+1)*2*sqrt(3)*cos(2*Pi*(n-k)/3 + Pi/6)/3. (End)
%F The g.f. is 1/(1-V_trefoil(x)), where V_trefoil is the Jones polynomial of the trefoil knot. - _Paul Barry_, Oct 08 2004
%F a(2n) = A004396(n+1). - _Philippe Deléham_, Dec 14 2006
%F a(n) = ceiling(n/3), n>=1. - _Mohammad K. Azarian_, May 22 2007
%F E.g.f.: exp(x)*(2 + x)/3 + exp(-x/2)*(3*cos(sqrt(3)*x/2) + sqrt(3)*sin(sqrt(3)*x/2))/9. - _Stefano Spezia_, Oct 17 2022
%p A008620:=n->floor(n/3)+1; seq(A008620(n), n=0..100); # _Wesley Ivan Hurt_, Dec 06 2013
%t Table[Floor[n/3] + 1, {n, 0, 90}] (* _Stefan Steinerberger_, Apr 02 2006 *)
%t Table[{n, n, n}, {n, 30}] // Flatten (* _Harvey P. Dale_, Jan 15 2017 *)
%t Ceiling[Range[20]/3] (* _Eric W. Weisstein_, Aug 12 2023 *)
%t Table[Ceiling[n/3], {n, 20}] (* _Eric W. Weisstein_, Aug 12 2023 *)
%t Table[(1 + n - Cos[2 n Pi]/3] + Sin[2 n Pi/3]/Sqrt[3])/3, {n, 20}] (* _Eric W. Weisstein_, Aug 12 2023 *)
%t Table[(n - ChebyshevU[n, -1/2] + 1)/3, {n, 20}] (* _Eric W. Weisstein_, Aug 12 2023 *)
%t LinearRecurrence[{1, 0, 1, -1}, {1, 1, 1, 2}, 20] (* _Eric W. Weisstein_, Aug 12 2023 *)
%t CoefficientList[Series[1/((-1 + x)^2 (1 + x + x^2)), {x, 0, 20}], x] (* _Eric W. Weisstein_, Aug 12 2023 *)
%o (PARI) a(n)=n\3+1
%o (Magma) [Floor(n/3)+1: n in [0..80]]; // _Vincenzo Librandi_, Aug 16 2011
%o (Haskell)
%o a008620 = (+ 1) . (`div` 3)
%o a008620_list = concatMap (replicate 3) [1..]
%o -- _Reinhard Zumkeller_, Feb 19 2013, Apr 16 2012, Sep 25 2011
%o (Sage) def a(n) : return( dimension_modular_forms( Gamma1(3), n) ); # _Michael Somos_, Apr 01 2015
%o (Magma) a := func< n | Dimension( ModularForms( Gamma1(3), n))>; /* _Michael Somos_, Apr 01 2015 */
%Y Cf. A000027, A001840, A002264, A004016, A004396, A005882, A005928, A008621, A010766, A049347.
%Y Column 3 of A235791.
%K nonn,easy,nice
%O 0,4
%A _N. J. A. Sloane_