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.

A152749 a(n) = (n+1)*(3*n+1)/4 for n odd, a(n) = n*(3*n+2)/4 for n even.

Original entry on oeis.org

0, 2, 4, 10, 14, 24, 30, 44, 52, 70, 80, 102, 114, 140, 154, 184, 200, 234, 252, 290, 310, 352, 374, 420, 444, 494, 520, 574, 602, 660, 690, 752, 784, 850, 884, 954, 990, 1064, 1102, 1180, 1220, 1302, 1344, 1430, 1474, 1564, 1610, 1704, 1752, 1850, 1900, 2002
Offset: 0

Views

Author

Vincenzo Librandi, Dec 31 2009

Keywords

Comments

Interleaving of A049450 and A049451 (for n > 0).
Also, integer values of k*(k+1)/3. - Charles R Greathouse IV, Dec 11 2010
The nonzero coefficients of the expansion of f(a) = Product_{k>=1} (1-a^(2k)), see A194159, occur at the terms of the sequence given above, i.e., f(a) = 1 - a^2 - a^4 + a^10 + a^14 - a^24 - a^30 + a^44 + a^52 - a^70 - a^80 + ... = Sum_{n>=0} (-1)^binomial(n+1,2)*a^A152749(n). - Johannes W. Meijer, Aug 21 2011
Partial sums of A109043. - Reinhard Zumkeller, Mar 31 2012
Nonnegative k such that 12*k+1 is a square. - Vicente Izquierdo Gomez, Jul 22 2013
Equivalently, numbers of the form h*(3*h+1), where h = 0, -1, 1, -2, 2, -3, 3, -4, 4, ... (see also the fifth comment of A062717). - Bruno Berselli, Feb 02 2017
For n > 0, a(n-1) is the sum of the largest parts of the partitions of 2n into two even parts. - Wesley Ivan Hurt, Dec 19 2017
The sequence terms occur as exponents in the expansion of Sum_{n >= 0} q^(n*(n+1)/2) * Product_{k >= n+1} 1 - q^k = 1 - q^2 - q^4 + q^10 + q^14 - q^24 - q^30 + + - - .... - Peter Bala, Dec 15 2024
Sequence terms occur as exponents in the expansions of Sum_{n >= 0} q^(n*(2*n+1)) * Product_{k >= 2*n+2} 1 - q^k = Sum_{n >= 0} q^(n*(2*n-1)) * Product_{k >= 2*n+1} 1 - q^k = 1 - q^2 - q^4 + q^10 + q^14 - q^24 - q^30 + + - - .... - Peter Bala, Jun 23 2025

Crossrefs

Cf. A049450 (n*(3*n-1)), A049451 (n*(3*n+1)), A153383 (12n+1 is not prime).

Programs

  • Haskell
    a152749 n = a152749_list !! (n-1)
    a152749_list = scanl1 (+) a109043_list
    -- Reinhard Zumkeller, Mar 31 2012
  • Magma
    [IsOdd(n) select (n+1)*(3*n+1)/4 else n*(3*n+2)/4: n in [0..52]];
    
  • Magma
    f:=func; [0] cat [f(n*m): m in [-1,1], n in [1..30]]; // Bruno Berselli, Nov 13 2012
    
  • Maple
    A152749 := proc(n): if type(n,even) then n*(3*n+2)/4  else (n+1)*(3*n+1)/4 fi: end: seq(A152749(n), n=0..51); # Johannes W. Meijer, Aug 21 2011
  • Mathematica
    Table[If[OddQ[n],(n+1)*(3*n+1)/4,n*(3*n+2)/4],{n,0,60}] (* Vladimir Joseph Stephan Orlovsky, Feb 03 2012 *)
    LinearRecurrence[{1,2,-2,-1,1}, {0, 2, 4, 10, 14}, 50] (* Vincenzo Librandi, Feb 22 2012 *)
    Select[Range[1,1000], IntegerQ[Sqrt[12#+1]]&] (* Vicente Izquierdo Gomez, Jul 22 2013 *)

Formula

From R. J. Mathar, Jan 03-06 2009: (Start)
G.f.: 2*x*(1+x+x^2)/((1+x)^2*(1-x)^3).
a(n) = a(n-1) + 2*a(n-2) - 2*a(n-3) - a(n-4) + a(n-5) = A003154(n+1)/8 - (-1)^n*A005408(n)/8.
a(n) = 2*A001318(n) = ((6*n^2+6*n+1) - (2*n+1)*(-1)^n)/8. (End)
From Amiram Eldar, Mar 15 2022: (Start)
Sum_{n>=1} 1/a(n) = 3 - Pi/sqrt(3).
Sum_{n>=1} (-1)^(n+1)/a(n) = 3*(log(3)-1). (End)

Extensions

Edited, typo corrected and extended by Klaus Brockhaus, Jan 02 2009
Leading term a(0)=0 added by Johannes W. Meijer, Aug 21 2011