A001318 Generalized pentagonal numbers: m*(3*m - 1)/2, m = 0, +-1, +-2, +-3, ....
0, 1, 2, 5, 7, 12, 15, 22, 26, 35, 40, 51, 57, 70, 77, 92, 100, 117, 126, 145, 155, 176, 187, 210, 222, 247, 260, 287, 301, 330, 345, 376, 392, 425, 442, 477, 495, 532, 551, 590, 610, 651, 672, 715, 737, 782, 805, 852, 876, 925, 950, 1001, 1027, 1080, 1107, 1162, 1190, 1247, 1276, 1335
Offset: 0
Examples
G.f. = x + 2*x^2 + 5*x^3 + 7*x^4 + 12*x^5 + 15*x^6 + 22*x^7 + 26*x^8 + 35*x^9 + ...
References
- Enoch Haga, A strange sequence and a brilliant discovery, chapter 5 of Exploring prime numbers on your PC and the Internet, first revised ed., 2007 (and earlier ed.), pp. 53-70.
- Ross Honsberger, Ingenuity in Mathematics, Random House, 1970, p. 117.
- Donald E. Knuth, The Art of Computer Programming, vol. 4A, Combinatorial Algorithms, (to appear), section 7.2.1.4, equation (18).
- Ivan Niven and Herbert S. Zuckerman, An Introduction to the Theory of Numbers, 2nd ed., Wiley, NY, 1966, p. 231.
- N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
- N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
Links
- T. D. Noe, Table of n, a(n) for n = 0..1000
- G. E. Andrews and J. A. Sellers, Congruences for the Fishburn Numbers, arXiv preprint arXiv:1401.5345 [math.NT], 2014.
- Paul Barry, On sequences with {-1, 0, 1} Hankel transforms, arXiv preprint arXiv:1205.2565 [math.CO], 2012. - From _N. J. A. Sloane_, Oct 18 2012
- Burkard Polster (Mathologer), The hardest "What comes next?" (Euler's pentagonal formula), Youtube video, Oct 17 2020.
- S. Cooper and M. D. Hirschhorn, Results of Hurwitz type for three squares, Discrete Math., Vol. 274, No. 1-3 (2004), pp. 9-24. See P(q).
- Stephen Eberhart, Letter to N. J. A. Sloane, Jan 19 1978.
- John Elias, Illustration of Initial Terms: Generalized Penthexagrams.
- John Elias, Illustration: Star Number Fractal.
- John Elias, Illustration: Generalized Pentagonals In Generalized-Octagonal-Hexagrams.
- Andreas Enge, William Hart, and Fredrik Johansson, Short addition sequences for theta functions, arXiv:1608.06810 [math.NT], 2016.
- Leonhard Euler, Découverte d'une loi tout extraordinaire des nombres par rapport à la somme de leurs diviseurs, Opera Omnia, Series I, Vol. 2 (1751), pp. 241-253.
- Leonhard Euler, On the remarkable properties of the pentagonal numbers, arXiv:math/0505373 [math.HO], 2005.
- Leonhard Euler, De mirabilibus proprietatibus numerorum pentagonalium, par. 2
- Leonhard Euler, Observatio de summis divisorum p. 8.
- Leonhard Euler, An observation on the sums of divisors, p. 8, arXiv:math/0411587 [math.HO], 2004.
- Alex Fink, Richard K. Guy, and Mark Krusemeyer, Partitions with parts occurring at most thrice, Contrib. Discr. Math., Vol. 3, No. 2 (2008), pp. 76-114.
- Silvia Heubach and Toufik Mansour, Counting rises, levels and drops in compositions, arXiv:math/0310197 [math.CO], 2003.
- Alfred Hoehn, Illustration of initial terms.
- Barbara H. Margolius, Permutations with inversions, J. Integ. Seq., Vol. 4 (2001), Article 01.2.4.
- Johannes W. Meijer, Euler's Ship on the Pentagonal Sea, pdf and jpg.
- Johannes W. Meijer and Manuel Nepveu, Euler's ship on the Pentagonal Sea, Acta Nova, Vol. 4, No. 1 (December 2008), pp. 176-187.
- Mircea Merca, The Lambert series factorization theorem, The Ramanujan Journal, January 2017; DOI: 10.1007/s11139-016-9856-3.
- Mircea Merca and Maxie D. Schmidt, New Factor Pairs for Factorizations of Lambert Series Generating Functions, arXiv:1706.02359 [math.CO], 2017. See Remark 2.2.
- Mircea Merca, Euler's partition function in terms of 2-adic valuation, Bol. Soc. Mat. Mex. 30, 76 (2024). See p. 3.
- Ivan Niven, Formal power series, Amer. Math. Monthly, Vol. 76, No. 8 (1969), pp. 871-889.
- Robert J. Lemke Oliver, Eta quotients and theta functions, Advances in Mathematics, Vol. 241, Jul. 2013, pp. 1-17.
- Vladimir Pletser, Congruence conditions on the number of terms in sums of consecutive squared integers equal to squared integers, arXiv:1409.7969 [math.NT], 2014.
- Vladimir Pletser, Finding all squared integers expressible as the sum of consecutive squared integers using generalized Pell equation solutions with Chebyshev polynomials, arXiv preprint arXiv:1409.7972 [math.NT], 2014.
- Simon Plouffe, Approximations de séries génératrices et quelques conjectures, Dissertation, Université du Québec à Montréal, 1992, arXiv:0911.4975 [math.NT], 2009.
- Simon Plouffe, 1031 Generating Functions, Appendix to Thesis, Montreal, 1992.
- S. Realis, Question 271, Nouv. Corresp. Math., 4 (1878) 27-29.
- Steven J. Schlicker, Numbers Simultaneously Polygonal and Centered Polygonal, Mathematics Magazine, Vol. 84, No. 5 (December 2011), pp. 339-350.
- André Weil, Two lectures on number theory, past and present, L'Enseign. Math., Vol. XX (1974), pp. 87-110; Oeuvres III, pp. 279-302.
- Eric Weisstein's World of Mathematics, Pentagonal numbers, Partition Function P.
- Eric Weisstein's World of Mathematics, Pentagonal Number Theorem.
- Wikipedia, Pentagonal number theorem.
- M. Wohlgemuth, Pentagon, Kartenhaus und Summenzerlegung.
- Keke Zhang, Generalized Catalan numbers, arXiv:2011.09593 [math.CO], 2020.
- Index entries for linear recurrences with constant coefficients, signature (1,2,-2,-1,1).
Crossrefs
Cf. A080995 (characteristic function), A026741 (first differences), A034828 (partial sums), A165211 (mod 2).
Cf. A000326 (pentagonal numbers), A005449 (second pentagonal numbers), A000217 (triangular numbers).
Indices of nonzero terms of A010815, i.e., the (zero-based) indices of 1-bits of the infinite binary word to which the terms of A068052 converge.
Sequences of generalized k-gonal numbers: this sequence (k=5), A000217 (k=6), A085787 (k=7), A001082 (k=8), A118277 (k=9), A074377 (k=10), A195160 (k=11), A195162 (k=12), A195313 (k=13), A195818 (k=14), A277082 (k=15), A274978 (k=16), A303305 (k=17), A274979 (k=18), A303813 (k=19), A218864 (k=20), A303298 (k=21), A303299 (k=22), A303303 (k=23), A303814 (k=24), A303304 (k=25), A316724 (k=26), A316725 (k=27), A303812 (k=28), A303815 (k=29), A316729 (k=30).
Column 1 of A195152.
Cf. A002620.
Programs
-
GAP
a:=[0,1,2,5];; for n in [5..60] do a[n]:=2*a[n-2]-a[n-4]+3; od; a; # Muniru A Asiru, Aug 16 2018
-
Haskell
a001318 n = a001318_list !! n a001318_list = scanl1 (+) a026741_list -- Reinhard Zumkeller, Nov 15 2015
-
Magma
[(6*n^2 + 6*n + 1 - (2*n + 1)*(-1)^n)/16 : n in [0..50]]; // Wesley Ivan Hurt, Nov 03 2014
-
Magma
[(3*n^2 + 2*n + (n mod 2) * (2*n + 1)) div 8: n in [0..70]]; // Vincenzo Librandi, Nov 04 2014
-
Maple
A001318 := -(1+z+z**2)/(z+1)**2/(z-1)**3; # Simon Plouffe in his 1992 dissertation; gives sequence without initial zero A001318 := proc(n) (6*n^2+6*n+1)/16-(2*n+1)*(-1)^n/16 ; end proc: # R. J. Mathar, Mar 27 2011
-
Mathematica
Table[n*(n+1)/6, {n, Select[Range[0, 100], Mod[#, 3] != 1 &]}] Select[Accumulate[Range[0,200]]/3,IntegerQ] (* Harvey P. Dale, Oct 12 2014 *) CoefficientList[Series[x (1 + x + x^2) / ((1 + x)^2 (1 - x)^3), {x, 0, 70}], x] (* Vincenzo Librandi, Nov 04 2014 *) LinearRecurrence[{1,2,-2,-1,1},{0,1,2,5,7},70] (* Harvey P. Dale, Jun 05 2017 *) a[ n_] := With[{m = Quotient[n + 1, 2]}, m (3 m + (-1)^n) / 2]; (* Michael Somos, Jun 02 2018 *)
-
PARI
{a(n) = (3*n^2 + 2*n + (n%2) * (2*n + 1)) / 8}; /* Michael Somos, Mar 24 2011 */
-
PARI
{a(n) = if( n<0, n = -1-n); polcoeff( x * (1 - x^3) / ((1 - x) * (1-x^2))^2 + x * O(x^n), n)}; /* Michael Somos, Mar 24 2011 */
-
PARI
{a(n) = my(m = (n+1) \ 2); m * (3*m + (-1)^n) / 2}; /* Michael Somos, Jun 02 2018 */
-
Python
def a(n): p = n % 2 return (n + p)*(3*n + 2 - p) >> 3 print([a(n) for n in range(60)]) # Peter Luschny, Jul 15 2022
-
Python
def A001318(n): return n*(n+1)-(m:=n>>1)*(m+1)>>1 # Chai Wah Wu, Nov 23 2024
-
Sage
@CachedFunction def A001318(n): if n == 0 : return 0 inc = n//2 if is_even(n) else n return inc + A001318(n-1) [A001318(n) for n in (0..59)] # Peter Luschny, Oct 13 2012
Formula
Euler: Product_{n>=1} (1 - x^n) = Sum_{n=-oo..oo} (-1)^n*x^(n*(3*n - 1)/2).
A080995(a(n)) = 1: complement of A090864; A000009(a(n)) = A051044(n). - Reinhard Zumkeller, Apr 22 2006
Euler transform of length-3 sequence [2, 2, -1]. - Michael Somos, Mar 24 2011
a(-1 - n) = a(n) for all n in Z. a(2*n) = A005449(n). a(2*n - 1) = A000326(n). - Michael Somos, Mar 24 2011. [The extension of the recurrence to negative indices satisfies the signature (1,2,-2,-1,1), but not the definition of the sequence m*(3*m -1)/2, because there is no m such that a(-1) = 0. - Klaus Purath, Jul 07 2021]
a(n) = 3 + 2*a(n-2) - a(n-4). - Ant King, Aug 23 2011
Product_{k>0} (1 - x^k) = Sum_{k>=0} (-1)^k * x^a(k). - Michael Somos, Mar 24 2011
G.f.: x*(1 + x + x^2)/((1 + x)^2*(1 - x)^3).
a(n) = n*(n + 1)/6 when n runs through numbers == 0 or 2 mod 3. - Barry E. Williams
Sequence consists of the pentagonal numbers (A000326), followed by A000326(n) + n and then the next pentagonal number. - Jon Perry, Sep 11 2003
a(n) = (6*n^2 + 6*n + 1)/16 - (2*n + 1)*(-1)^n/16; a(n) = A034828(n+1) - A034828(n). - Paul Barry, May 13 2005
a(n) = Sum_{k=1..floor((n+1)/2)} (n - k + 1). - Paul Barry, Sep 07 2005
If n even a(n) = a(n-1) + n/2 and if n odd a(n) = a(n-1) + n, n >= 2. - Pierre CAMI, Dec 09 2007
a(n)-a(n-1) = A026741(n) and it follows that the difference between consecutive terms is equal to n if n is odd and to n/2 if n is even. Hence this is a self-generating sequence that can be simply constructed from knowledge of the first term alone. - Ant King, Sep 26 2011
a(n) = (1/2)*ceiling(n/2)*ceiling((3*n + 1)/2). - Mircea Merca, Jul 13 2012
a(n) = floor((n + 1)/2)*((n + 1) - (1/2)*floor((n + 1)/2) - 1/2). - Wesley Ivan Hurt, Jan 26 2013
From Oskar Wieland, Apr 10 2013: (Start)
a(n) = a(n+1) - A026741(n),
a(n) = a(n+2) - A001651(n),
a(n) = a(n+3) - A184418(n),
a(n) = a(n+4) - A007310(n),
a(n) = a(n+12)- A007310(n)*3,
a(n) = a(n+14)- A001651(n)*7. (End)
a(n) = (A007310(n+1)^2 - 1)/24. - Richard R. Forberg, May 27 2013; corrected by Zak Seidov, Mar 14 2015; further corrected by Jianing Song, Oct 24 2018
a(n) = Sum_{i = ceiling((n+1)/2)..n} i. - Wesley Ivan Hurt, Jun 08 2013
G.f.: x*G(0), where G(k) = 1 + x*(3*k + 4)/(3*k + 2 - x*(3*k + 2)*(3*k^2 + 11*k + 10)/(x*(3*k^2 + 11*k + 10) + (k + 1)*(3*k + 4)/G(k+1))); (continued fraction). - Sergei N. Gladkovskii, Jun 16 2013
Sum_{n>=1} 1/a(n) = 6 - 2*Pi/sqrt(3). - Vaclav Kotesovec, Oct 05 2016
a(n) = Sum_{i=1..n} numerator(i/2) = Sum_{i=1..n} denominator(2/i). - Wesley Ivan Hurt, Feb 26 2017
a(n) = ((-5 + (-1)^n - 6n)*(-1 + (-1)^n - 6n))/96. - José de Jesús Camacho Medina, Jun 12 2018
a(n) = Sum_{k=1..n} k/gcd(k,2). - Pedro Caceres, Apr 23 2019
Quadrisection. For r = 0,1,2,3: a(r + 4*k) = 6*k^2 + sqrt(24*a(r) + 1)*k + a(r), for k >= 1, with inputs (k = 0) {0,1,2,5}. These are the sequences A049453(k), A033570(k), A033568(k+1), A049452(k+1), for k >= 0, respectively. - Wolfdieter Lang, Feb 12 2021
a(n) = a(n-4) + sqrt(24*a(n-2) + 1), n >= 4. - Klaus Purath, Jul 07 2021
Sum_{n>=1} (-1)^(n+1)/a(n) = 6*(log(3)-1). - Amiram Eldar, Feb 28 2022
E.g.f.: (x*(7 + 3*x)*cosh(x) + (1 + 5*x + 3*x^2)*sinh(x))/8. - Stefano Spezia, Aug 01 2024
Comments