cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A008615 a(n) = floor(n/2) - floor(n/3).

This page as a plain text file.
%I A008615 #166 Aug 10 2025 11:54:45
%S A008615 0,0,1,0,1,1,1,1,2,1,2,2,2,2,3,2,3,3,3,3,4,3,4,4,4,4,5,4,5,5,5,5,6,5,
%T A008615 6,6,6,6,7,6,7,7,7,7,8,7,8,8,8,8,9,8,9,9,9,9,10,9,10,10,10,10,11,10,
%U A008615 11,11,11,11,12,11,12,12,12,12,13,12,13,13,13,13,14,13,14,14,14,14,15,14
%N A008615 a(n) = floor(n/2) - floor(n/3).
%C A008615 If the two leading 0's are dropped, this becomes the essentially identical sequence A103221, with g.f. 1/((1-x^2)*(1-x^3)), which arises in many contexts. For example, 1/((1-x^4)*(1-x^6)) is the Poincaré series [or Poincare series] for modular forms of weight w for the full modular group. As generators one may take the Eisenstein series E_4 (A004009) and E_6 (A013973).
%C A008615 Dimension of the space of weight 2n+8 cusp forms for Gamma_0( 1 ).
%C A008615 Apart from initial term(s), dimension of the space of weight 2n cuspidal newforms for Gamma_0( 5 ).
%C A008615 a(n) is the number of ways n can be written as the sum of a positive even number and a nonnegative multiple of 3 and so the number of ways (n-2) can be written as the sum of a nonnegative even number and a nonnegative multiple of 3 and also the number of ways (n+3) can be written as the sum of a positive even number and a positive multiple of 3.
%C A008615 It appears that this is also the number of partitions of 2n+6 that are 4-term arithmetic progressions. - _John W. Layman_, May 01 2009 [verified by _Wesley Ivan Hurt_, Jan 17 2021]
%C A008615 a(n) is the number of (n+3)-digit fixed points under the base-3 Kaprekar map A164993 (see A164997 for the list of fixed points). - _Joseph Myers_, Sep 04 2009
%C A008615 Starting from n=10 also the number of balls in new consecutive hexagonal edges, if an (infinite) chain of balls is winded spirally around the first ball at the center, such that each six steps make an entire winding. - _K. G. Stier_, Dec 21 2012
%C A008615 In any three consecutive terms at least two of them are equal to each other. - _Michael Somos_, Mar 01 2014
%C A008615 Number of partitions of (n-2) into parts 2 and 3. - _David Neil McGrath_, Sep 05 2014
%C A008615 a(n), n >= 0, is also the dimension of S_{2*(n+4)}, the complex vector space of modular cusp forms of weight 2*(n+4) and level 1 (full modular group). The dimension of S_0, S_2, S_4 and S_6 is 0. See, e.g., Ash and Gross, p. 178. Table 13.1. - _Wolfdieter Lang_, Sep 16 2016
%C A008615 From _Wolfdieter Lang_, May 08 2017: (Start)
%C A008615 a(n-2) = floor((n-2)/2) - floor((n-2)/3) = floor(n/2) - floor((n+1)/3) is for n >=0 the number of integers k in the interval (n+1)/3 < k <= floor(n/2). This problem appears in the computation of the number of zeros of Chebyshev S(n, x) polynomials (coefficients in A049310) in the open interval (-1, +1). See a comment there. This computation was motivated by a conjecture given in A008611 by _Michel Lagneau_, Mar 31 2017.
%C A008615 a(n) is also the number of integers k in the closed interval (n+1)/3 <= k <= floor(n/2), which is floor(n/2) - (ceiling((n+1)/3) - 1) for n >= 0 (proof trivial for n+1 == 0 (mod 3) and otherwise). From the preceding statement this a(n) is also a(n-2) + [n == 2 (mod 3)] for n >= 0 (with [statement] = 1 if the statement is true and zero otherwise). This proves the recurrence given by _Michael Somos_ in the formula section. (End)
%C A008615 Assuming the Collatz conjecture to be true, for n > 1, a(n+7) is the row length of the n-th row of A340985. That is, the number of weakly connected components of the Collatz digraph of order n. - _Sebastian Karlsson_, Feb 23 2021
%D A008615 Avner Ash and Robert Gross, Summing it up, Princeton University Press, 2016, p. 178.
%D A008615 D. J. Benson, Polynomial Invariants of Finite Groups, Cambridge, 1993, p. 100.
%D A008615 E. Freitag, Siegelsche Modulfunktionen, Springer-Verlag, Berlin, 1983; p. 141, Th. 1.1.
%D A008615 R. C. Gunning, Lectures on Modular Forms. Princeton Univ. Press, Princeton, NJ, 1962.
%D A008615 J.-M. Kantor, Où en sont les mathématiques, La formule de Molien-Weyl, SMF, Vuibert, p. 79
%H A008615 Vincenzo Librandi, <a href="/A008615/b008615.txt">Table of n, a(n) for n = 0..10000</a>
%H A008615 David Broadhurst, <a href="http://arxiv.org/abs/1604.03057">Feynman integrals, L-series and Kloosterman moments</a>, arXiv:1604.03057 [physics.gen-ph], 2016. See Cor. 1.
%H A008615 J. Igusa, <a href="http://www.jstor.org/stable/2373172">On Siegel modular forms of genus 2 (II)</a>, Amer. J. Math., 86 (1964), 392-412, esp. p. 402.
%H A008615 INRIA Algorithms Project, <a href="http://ecs.inria.fr/services/structure?nbr=212">Encyclopedia of Combinatorial Structures 212</a>
%H A008615 INRIA Algorithms Project, <a href="http://ecs.inria.fr/services/structure?nbr=448">Encyclopedia of Combinatorial Structures 448</a>
%H A008615 Clark Kimberling, <a href="https://www.emis.de/journals/JIS/VOL22/Kimberling/kimb9.html">A Combinatorial Classification of Triangle Centers on the Line at Infinity</a>, J. Int. Seq., Vol. 22 (2019), Article 19.5.4.
%H A008615 A. V. Kitaev and A. Vartanian, <a href="https://arxiv.org/abs/2304.05671">Algebroid Solutions of the Degenerate Third Painlevé Equation for Vanishing Formal Monodromy Parameter</a>, arXiv:2304.05671 [math.CA], 2023. See p. 20.
%H A008615 T. Shioda, <a href="http://www.jstor.org/stable/2373415">On the graded ring of invariants of binary octavics</a>, Amer. J. Math. 89, 1022-1046, 1967.
%H A008615 William A. Stein, <a href="http://wstein.org/Tables/">The modular forms database</a>
%H A008615 James Tanton, <a href="https://www.jamestanton.com/wp-content/uploads/2013/10/Integer-Triangles_Sample-Book-Chapter_Math-Galore.pdf">Integer Triangles</a>, Chapter 11 in "Mathematics Galore!" (MAA, 2012).
%H A008615 James Tanton, <a href="https://web.archive.org/web/20150929035825/https://maa.org/sites/default/files/pdf/pubs/mayjun02web.pdf">Young students approach integer triangles</a>, FOCUS 22 no. 5 (2002), 4 - 6.
%H A008615 James Tanton et al., <a href="https://web.archive.org/web/20080201141628/http://www.themathcircle.org/focusarticle.php">Young students approach integer triangles</a>, FOCUS 22 no. 5 (2002), 4 - 6.
%H A008615 <a href="/index/Mo#Molien">Index entries for Molien series</a>
%H A008615 <a href="/index/Rec#order_05">Index entries for linear recurrences with constant coefficients</a>, signature (0,1,1,0,-1).
%F A008615 a(n) = a(n-6) + 1 = a(n-2) + a(n-3) - a(n-5). - _Henry Bottomley_, Sep 02 2000
%F A008615 G.f.: x^2 / ((1-x^2) * (1-x^3)).
%F A008615 From _Reinhard Zumkeller_, Feb 27 2008: (Start)
%F A008615 a(A016933(n)) = a(A016957(n)) = a(A016969(n)) = n+1.
%F A008615 a(A008588(n)) = a(A016921(n)) = a(A016945(n)) = n. (End)
%F A008615 a(6*k) = k, k >= 0. - _Zak Seidov_, Sep 09 2012
%F A008615 a(n) = A005044(n+1) - A005044(n-3). - _Johannes W. Meijer_, Oct 18 2013
%F A008615 a(n) = floor((n+4)/6) - floor((n+3)/6) + floor((n+2)/6). - _Mircea Merca_, Nov 27 2013
%F A008615 Euler transform of length 3 sequence [0, 1, 1]. - _Michael Somos_, Mar 01 2014
%F A008615 a(n+2) = a(n) + 1 if n == 0 (mod 3), a(n+2) = a(n) otherwise. - _Michael Somos_, Mar 01 2014. See the May 08 2017 comment above. - _Wolfdieter Lang_, May 08 2017
%F A008615 a(n) = -a(-1 - n) for all n in Z. - _Michael Somos_, Mar 01 2014.
%F A008615 a(n) = A004526(n) - A002264(n). - _Reinhard Zumkeller_, Apr 28 2014
%F A008615 a(n) = Sum_{i=0..n-2} (floor(i/6)-floor((i-3)/6))*(-1)^i. - _Wesley Ivan Hurt_, Sep 08 2015
%F A008615 a(n) = a(n+6) - 1 = A103221(n+4) - 1, n >= 0. - _Wolfdieter Lang_, Sep 16 2016
%F A008615 12*a(n) = 2*n +1 +3*(-1)^n -4*A057078(n). - _R. J. Mathar_, Jun 19 2019
%F A008615 a(n) = Sum_{k=1..floor((n+3)/2)} Sum_{j=k..floor((2*n+6-k)/3)} Sum_{i=j..floor((2*n+6-j-k)/2)} ([j-k = i-j = 2*n+6-2*i-j-k] - [k = j = i = 2*n+6-i-j-k]), where [ ] is the (generalized) Iverson bracket. - _Wesley Ivan Hurt_, Jan 17 2021
%F A008615 E.g.f.: (3*(2 + x)*cosh(x) - 2*exp(-x/2)*(3*cos(sqrt(3)*x/2) + sqrt(3)*sin(sqrt(3)*x/2)) + 3*(x-1)*sinh(x))/18. - _Stefano Spezia_, Oct 17 2022
%e A008615 G.f. = x^2 + x^4 + x^5 + x^6 + x^7 + 2*x^8 + x^9 + 2*x^10 + 2*x^11 + 2*x^12 + ...
%p A008615 a := n-> floor(n/2) - floor(n/3): seq(a(n), n = 0 .. 87);
%t A008615 a[n_]:=Floor[n/2]-Floor[n/3]; Array[a,90,0] (* _Vladimir Joseph Stephan Orlovsky_, Dec 05 2008; corrected by _Harvey P. Dale_, Nov 30 2011 *)
%t A008615 LinearRecurrence[{0, 1, 1, 0, -1}, {0, 0, 1, 0, 1}, 100]; (* _Vincenzo Librandi_, Sep 09 2015 *)
%o A008615 (PARI) {a(n) = (n\2) - (n\3)}; /* _Michael Somos_, Feb 06 2003 */
%o A008615 (Magma) [Floor(n/2)-Floor(n/3): n in [0..10]]; // Sergei Haller (sergei(AT)sergei-haller.de), Dec 21 2006
%o A008615 (Magma) a := func< n | n lt 2 select 0 else n eq 2 select 1 else Dimension( ModularForms( PSL2( Integers()), 2*n-4))>; /* _Michael Somos_, Dec 11 2018 */
%o A008615 (Haskell)
%o A008615 a008615 n = n `div` 2 - n `div` 3  -- _Reinhard Zumkeller_, Apr 28 2014
%o A008615 (Python)
%o A008615 def A008615(n): return n//2 - n//3 # _Chai Wah Wu_, Jun 07 2022
%Y A008615 Essentially the same as A103221.
%Y A008615 First differences of A069905 (and A001399).
%Y A008615 Cf. A002264, A004009, A004526, A005044, A008588, A008611, A013973, A016921, A016933, A016957, A049310, A057078, A164993, A164997, A340985.
%K A008615 nonn,easy,nice
%O A008615 0,9
%A A008615 _N. J. A. Sloane_, _Simon Plouffe_