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.

Showing 1-10 of 16 results. Next

A001318 Generalized pentagonal numbers: m*(3*m - 1)/2, m = 0, +-1, +-2, +-3, ....

Original entry on oeis.org

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

Views

Author

Keywords

Comments

Partial sums of A026741. - Jud McCranie; corrected by Omar E. Pol, Jul 05 2012
From R. K. Guy, Dec 28 2005: (Start)
"Conway's relation twixt the triangular and pentagonal numbers: Divide the triangular numbers by 3 (when you can exactly):
0 1 3 6 10 15 21 28 36 45 55 66 78 91 105 120 136 153 ...
0 - 1 2 .- .5 .7 .- 12 15 .- 22 26 .- .35 .40 .- ..51 ...
.....-.-.....+..+.....-..-.....+..+......-...-.......+....
"and you get the pentagonal numbers in pairs, one of positive rank and the other negative.
"Append signs according as the pair have the same (+) or opposite (-) parity.
"Then Euler's pentagonal number theorem is easy to remember:
"p(n-0) - p(n-1) - p(n-2) + p(n-5) + p(n-7) - p(n-12) - p(n-15) ++-- = 0^n
where p(n) is the partition function, the left side terminates before the argument becomes negative and 0^n = 1 if n = 0 and = 0 if n > 0.
"E.g. p(0) = 1, p(7) = p(7-1) + p(7-2) - p(7-5) - p(7-7) + 0^7 = 11 + 7 - 2 - 1 + 0 = 15."
(End)
The sequence may be used in order to compute sigma(n), as described in Euler's article. - Thomas Baruchel, Nov 19 2003
Number of levels in the partitions of n + 1 with parts in {1,2}.
a(n) is the number of 3 X 3 matrices (symmetrical about each diagonal) M = {{a, b, c}, {b, d, b}, {c, b, a}} such that a + b + c = b + d + b = n + 2, a,b,c,d natural numbers; example: a(3) = 5 because (a,b,c,d) = (2,2,1,1), (1,2,2,1), (1,1,3,3), (3,1,1,3), (2,1,2,3). - Philippe Deléham, Apr 11 2007
Also numbers a(n) such that 24*a(n) + 1 = (6*m - 1)^2 are odd squares: 1, 25, 49, 121, 169, 289, 361, ..., m = 0, +-1, +-2, ... . - Zak Seidov, Mar 08 2008
From Matthew Vandermast, Oct 28 2008: (Start)
Numbers n for which A000326(n) is a member of A000332. Cf. A145920.
This sequence contains all members of A000332 and all nonnegative members of A145919. For values of n such that n*(3*n - 1)/2 belongs to A000332, see A145919. (End)
Starting with offset 1 = row sums of triangle A168258. - Gary W. Adamson, Nov 21 2009
Starting with offset 1 = Triangle A101688 * [1, 2, 3, ...]. - Gary W. Adamson, Nov 27 2009
Starting with offset 1 can be considered the first in an infinite set generated from A026741. Refer to the array in A175005. - Gary W. Adamson, Apr 03 2010
Vertex number of a square spiral whose edges have length A026741. The two axes of the spiral forming an "X" are A000326 and A005449. The four semi-axes forming an "X" are A049452, A049453, A033570 and the numbers >= 2 of A033568. - Omar E. Pol, Sep 08 2011
A general formula for the generalized k-gonal numbers is given by n*((k - 2)*n - k + 4)/2, n=0, +-1, +-2, ..., k >= 5. - Omar E. Pol, Sep 15 2011
a(n) is the number of 3-tuples (w,x,y) having all terms in {0,...,n} and 2*w = 2*x + y. - Clark Kimberling, Jun 04 2012
Generalized k-gonal numbers are second k-gonal numbers and positive terms of k-gonal numbers interleaved, k >= 5. - Omar E. Pol, Aug 04 2012
a(n) is the sum of the largest parts of the partitions of n+1 into exactly 2 parts. - Wesley Ivan Hurt, Jan 26 2013
Conway's relation mentioned by R. K. Guy is a relation between triangular numbers and generalized pentagonal numbers, two sequences from different families, but as triangular numbers are also generalized hexagonal numbers in this case we have a relation between two sequences from the same family. - Omar E. Pol, Feb 01 2013
Start with the sequence of all 0's. Add n to each value of a(n) and the next n - 1 terms. The result is the generalized pentagonal numbers. - Wesley Ivan Hurt, Nov 03 2014
(6k + 1) | a(4k). (3k + 1) | a(4k+1). (3k + 2) | a(4k+2). (6k + 5) | a(4k+3). - Jon Perry, Nov 04 2014
Enge, Hart and Johansson proved: "Every generalised pentagonal number c >= 5 is the sum of a smaller one and twice a smaller one, that is, there are generalised pentagonal numbers a, b < c such that c = 2a + b." (see link theorem 5). - Peter Luschny, Aug 26 2016
The Enge, et al. result for c >= 5 also holds for c >= 2 if 0 is included as a generalized pentagonal number. That is, 2 = 2*1 + 0. - Michael Somos, Jun 02 2018
Suggestion for title, where n actually matches the list and b-file: "Generalized pentagonal numbers: k(n)*(3*k(n) - 1)/2, where k(n) = A001057(n) = [0, 1, -1, 2, -2, 3, -3, ...], n >= 0" - Daniel Forgues, Jun 09 2018 & Jun 12 2018
Generalized k-gonal numbers are the partial sums of the sequence formed by the multiples of (k - 4) and the odd numbers (A005408) interleaved, with k >= 5. - Omar E. Pol, Jul 25 2018
The last digits form a symmetric cycle of length 40 [0, 1, 2, 5, ..., 5, 2, 1, 0], i.e., a(n) == a(n + 40) (mod 10) and a(n) == a(40*k - n - 1) (mod 10), 40*k > n. - Alejandro J. Becerra Jr., Aug 14 2018
Only 2, 5, and 7 are prime. All terms are of the form k*(k+1)/6, where 3 | k or 3 | k+1. For k > 6, the value divisible by 3 must have another factor d > 2, which will remain after the division by 6. - Eric Snyder, Jun 03 2022
8*a(n) is the product of two even numbers one of which is n + n mod 2. - Peter Luschny, Jul 15 2022
a(n) is the dot product of [1, 2, 3, ..., n] and repeat[1, 1/2]. a(5) = 12 = [1, 2, 3, 4, 5] dot [1, 1/2, 1, 1/2, 1] = [1 + 1 + 3 + 2 + 5]. - Gary W. Adamson, Dec 10 2022
Every nonnegative number is the sum of four terms of this sequence [S. Realis]. - N. J. A. Sloane, May 07 2023
From Peter Bala, Jan 06 2025: (Start)
The sequence terms are the exponents in the expansions of the following infinite products:
1) Product_{n >= 1} (1 - s(n)*q^n) = 1 + q + q^2 + q^5 + q^7 + q^12 + q^15 + ..., where s(n) = (-1)^(1 + mod(n+1,3)).
2) Product_{n >= 1} (1 - q^(2*n))*(1 - q^(3*n))^2/((1 - q^n)*(1 - q^(6*n))) = 1 + q + q^2 + q^5 + q^7 + q^12 + q^15 + ....
3) Product_{n >= 1} (1 - q^n)*(1 - q^(4*n))*(1 - q^(6*n))^5/((1 - q^(2*n))*(1 - q^(3*n))*(1 - q^(12*n)))^2 = 1 - q + q^2 - q^5 - q^7 + q^12 - q^15 + q^22 + q^26 - q^35 + ....
4) Product_{n >= 1} (1 - q^(2*n))^13/((1 - (-1)^n*q^n)*(1 - q^(4*n)))^5 = 1 - 5*q + 7*q^2 - 11*q^5 + 13*q^7 - 17*q^12 + 19*q^15 - + .... See Oliver, Theorem 1.1. (End)

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).

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.
Union of A036498 and A036499.
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.
Squares in APs: A221671, A221672.
Quadrisection: A049453(k), A033570(k), A033568(k+1), A049452(k+1), k >= 0.
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
a(n) = A008805(n-1) + A008805(n-2) + A008805(n-3), n > 2. - Ralf Stephan, Apr 26 2003
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
a(n) = A000217(n) - A000217(floor(n/2)). - Pierre CAMI, Dec 09 2007
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) = (A008794(n+1) + A000217(n))/2 = A002378(n) - A085787(n). - Omar E. Pol, Jan 12 2013
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+6) - A001651(n)*3 = a(n+6) - A016051(n),
a(n) = a(n+8) - A007310(n)*2 = a(n+8) - A091999(n),
a(n) = a(n+10)- A001651(n)*5 = a(n+10)- A072703(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) = A000292(A001651(n))/A001651(n), for n>0. - Ivan N. Ianakiev, May 08 2018
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
a(n) = A002620(n) + A008805(n-1). Gary W. Adamson, Dec 10 2022
E.g.f.: (x*(7 + 3*x)*cosh(x) + (1 + 5*x + 3*x^2)*sinh(x))/8. - Stefano Spezia, Aug 01 2024

A007009 Number of 3-voter voting schemes with n linearly ranked choices.

Original entry on oeis.org

1, 4, 12, 27, 54, 96, 160, 250, 375, 540, 756, 1029, 1372, 1792, 2304, 2916, 3645, 4500, 5500, 6655, 7986, 9504, 11232, 13182, 15379, 17836, 20580, 23625, 27000, 30720, 34816, 39304, 44217, 49572, 55404, 61731, 68590, 76000, 84000, 92610, 101871, 111804
Offset: 1

Views

Author

Keywords

Comments

With a(0) = 0 nontrivial integer solutions of (x + y)^3 = (x - y)^4. If x = a(n) then y = a(n + (-1)^n). - Thomas Scheuerle, Mar 22 2023

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A034828 (first differences).

Programs

  • Magma
    I:=[1,4,12,27,54,96,160]; [n le 7 select I[n] else 3*Self(n-1)-Self(n-2)- 5*Self(n-3)+5*Self(n-4)+Self(n-5)-3*Self(n-6)+Self(n-7): n in [1..50]]; // Vincenzo Librandi, Sep 21 2015
    
  • Maple
    a:= n-> (Matrix([[0$4, 1, 4, 12, 27]]). Matrix(8, (i, j)-> `if`(i=j-1, 1, `if`(j=1, [4, -4, -4, 10, -4, -4, 4, -1][i], 0)))^n)[1, 1]:
    seq(a(n), n=1..40);  # Alois P. Heinz, Aug 13 2008
  • Mathematica
    LinearRecurrence[{3, -1, -5, 5, 1, -3, 1}, {1, 4, 12, 27, 54, 96, 160}, 50] (* Vincenzo Librandi, Sep 21 2015 *)
  • PARI
    Vec(x*(1-x^3)/((1-x)^4*(1-x^2)^2) + O(x^100)) \\ Colin Barker, Jan 07 2016

Formula

G.f.: x*(1-x^3)/((1-x)^4*(1-x^2)^2) = x*(1+x+x^2)/((1-x)^5*(1+x)^2).
a(n) = (1/2)*Sum_{k=1..n+1} k*floor(k/2)*ceiling(k/2). - Vladeta Jovovic, Apr 29 2006
a(n) = A006009(n)/4.
a(n) = A007590(n+2)*A007590(n+1)/8. - Richard R. Forberg, Dec 03 2013
For n > 1, a(n) = A000332(n+3) - A002624(n-2). - Antal Pinter, Sep 20 2015
a(n) = (n^4 + 6*n^3 + 12*n^2 + 8*n)/32 for n even; a(n) = (n^4 + 6*n^3 + 12*n^2 + 10*n + 3)/32 for n odd. - Colin Barker, Jan 07 2016

Extensions

More terms from James Sellers, Sep 08 2000

A088003 Take the list t(n,0) = {1,...,n}; denote by t(n,j) this list after rotating to left (or right) by j positions. Calculate inner product of t(n,0) and t(n,j) and denote the value by s(n,j). Compute this inner product for all j = 1..n and choose the smallest. This is a(n).

Original entry on oeis.org

1, 4, 11, 22, 40, 64, 98, 140, 195, 260, 341, 434, 546, 672, 820, 984, 1173, 1380, 1615, 1870, 2156, 2464, 2806, 3172, 3575, 4004, 4473, 4970, 5510, 6080, 6696, 7344, 8041, 8772, 9555, 10374, 11248, 12160, 13130, 14140, 15211, 16324, 17501, 18722, 20010
Offset: 1

Views

Author

Labos Elemer, Oct 14 2003

Keywords

Comments

If the largest were chosen rather than the smallest, then A000330(n), the square pyramidal numbers, would be obtained. Also, if the inner product of t with 1-rotated-t is calculated, then A006527(n) is produced.
From Jonathan Halabi, Dec 25 2017, on behalf of Maya Nicklas: (Start)
a(n) is the number of squares (of any size) that occur in a skewed n X n chessboard, having n rows of n squares, each offset by one square from the row above. For instance, a(4) is the number of squares in this diagram:
XXXX
.XXXX
..XXXX
...XXXX
which is 22.
(End)
It seems that if we connect the top row of this skewed board with its bottom row (in the same skewed way), i.e., make the board toroidal, and count squares, we will get A128624. - Andrey Zabolotskiy, Dec 25 2017

Examples

			For n=6: t(6,0) = {1,2,3,4,5,6}, t(6,3) = {4,5,6,1,2,3};
compute scalar products for all rotations:
{76,67,64,67,76,91} of which the smallest is 64, so a(6)=64.
		

Crossrefs

Programs

  • Mathematica
    t0[x_] := Table[w, {w, 1, x}]; jr[x_, j_] := RotateRight[t0[x], j]; Table[Min[Table[Apply[Plus, t0[g]*jr[g, i]], {i, 1, g}]], {g, 1, up}]

Formula

a(n) = Min{y; y=t(n, 0)*t(n, x)=s(n, x); for x=1..n}.
a(n) = n*(2*n*(5*n+12)-3*(-1)^n+11)/48.
G.f.: x*(1+2*x+2*x^2)/((1+x)^2*(1-x)^4). - Bruno Berselli, Dec 01 2010
For n >= 1, a(n) = A000330(n) - A034828(n). - Luce ETIENNE, Aug 11 2014
a(n) = Sum_{i=0..floor(n/2)} (n-i)*(n-2*i). For n=7, a(7) = 7*7 + 6*5 + 5*3 + 4*1 = 98. - Bruno Berselli, Oct 26 2015

Extensions

Edited by Bruno Berselli, Dec 01 2010

A107231 a(n) = C(n+2,2)*C(n,floor(n/2)).

Original entry on oeis.org

1, 3, 12, 30, 90, 210, 560, 1260, 3150, 6930, 16632, 36036, 84084, 180180, 411840, 875160, 1969110, 4157010, 9237800, 19399380, 42678636, 89237148, 194699232, 405623400, 878850700, 1825305300, 3931426800, 8143669800, 17450721000
Offset: 0

Views

Author

Paul Barry, May 13 2005

Keywords

Comments

Third column of A107230. Related to the generalized pentagonal numbers A001318. The sequence 0,0,1,3,12,... is an inverse Chebyshev transform of 0,0,1,3,8,... (see A034828). This transform maps a g.f. g(x) to (1/sqrt(1-4x^2))g(c(x^2)). Thus A001318, as first differences of A034828, can be expressed in terms of A107231.

Crossrefs

Programs

  • Mathematica
    Table[Binomial[n + 2, 2]*Binomial[n, Floor[n/2]], {n,0,50}] (* G. C. Greubel, Jun 13 2017 *)
  • PARI
    for(n=0,50, print1(binomial(n+2,2)*binomial(n,n\2), ", ")) \\ G. C. Greubel, Jun 13 2017

Formula

G.f.: (1+x)*(1-sqrt(1-4*x^2))^3*(sqrt(1-4*x^2)-4*x^2+1)^2/(8*x^4*(1-4*x^2)^(5/2)*(sqrt(1-4*x^2)+2*x-1)^2).
a(n) = Sum_{k=0..floor((n+2)/2)} binomial(n+2, k)*A034828(n+2-2*k). [corrected by Jason Yuen, Sep 02 2024]
Conjecture: n*a(n) +(n-4)*a(n-1) +2*(-2*n-5)*a(n-2) -4*n*a(n-3)=0. - R. J. Mathar, Nov 24 2012
G.f.: (1+x)/((1+2*x)^(3/2)*(1-2*x)^(5/2)). - Vladimir Reshetnikov, Aug 01 2018
Sum_{n>=0} 1/a(n) = Pi^2/9 - 2*Pi/sqrt(3) + 4. - Amiram Eldar, Sep 03 2024

A005996 G.f.: 2*(1-x^3)/((1-x)^5*(1+x)^2).

Original entry on oeis.org

2, 6, 16, 30, 54, 84, 128, 180, 250, 330, 432, 546, 686, 840, 1024, 1224, 1458, 1710, 2000, 2310, 2662, 3036, 3456, 3900, 4394, 4914, 5488, 6090, 6750, 7440, 8192, 8976, 9826, 10710, 11664, 12654, 13718, 14820, 16000, 17220, 18522, 19866, 21296, 22770, 24334
Offset: 1

Views

Author

Keywords

Comments

a(n) is also the number of triples (w,x,y) having all terms in {0,...,n} and wClark Kimberling, Jun 10 2012
a(n) is also the sum of all elements of the square matrix M(n-1) = M1(n-1) x M2(n-1), where M1(n) is the square matrix with elements m1(i,j)= (1+(-1)^(i+j+1))/2, A057212; and M2(n) is the square matrix given by m2(i,j)= (1+(-1)^(i+j))/2, A057212. - Enrique Pérez Herrero, Jun 15 2013
Also the number of longest paths in the (n+1)-web graph for n > 2. - Eric W. Weisstein, Mar 27 2018
a(n) also is the number of undirected rook moves on an n X n chessboard, taken up to 180 degree rotation and axial reflections (horizontal and vertical), for n >= 2. - Hilko Koning, Aug 16 2025

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Essentially twice A034828.

Programs

  • Mathematica
    Table[(1/4)*(1 + n)*(-2 + 5*n + n^2 + 2*Ceiling[1/2 - n/2] - 4*Floor[n/2]), {n, 1, 200}] (* Enrique Pérez Herrero, Aug 03 2012 *)
    CoefficientList[Series[2 (1 - x^3)/((1 - x)^5 (1 + x)^2), {x, 0, 40}], x] (* Harvey P. Dale, Apr 08 2013 *)
    LinearRecurrence[{2, 1, -4, 1, 2, -1}, {2, 6, 16, 30, 54, 84}, 40] (* Harvey P. Dale, Apr 08 2013 *)
    Table[(n + 1) (2 n (n + 2) + 1 - (-1)^n)/8, {n, 20}] (* Eric W. Weisstein, Mar 27 2018 *)

Formula

a(n) = 2*(A006918(n) + A006918(n-1) + A006918(n-2)), n>1. - Ralf Stephan, Apr 26 2003
a(n) = 2*a(n-1) + a(n-2) - 4*a(n-3) + a(n-4) + 2*a(n-5) - a(n-6), with a(1)=2, a(2)=6, a(3)=16, a(4)=30, a(5)=54, a(6)=84. - Harvey P. Dale, Apr 08 2013
From Ayoub Saber Rguez, Nov 20 2021: (Start)
a(n) = A143785(n) - A002620(n+1).
a(n) = A128624(n) + A002620(n+1).
a(n) = (n^3 + 3*n^2 + 2*n + 1 + n*(n mod 2) - ((n+1) mod 2))/4. (End)

Extensions

Edited by N. J. A. Sloane, Aug 03 2012

A109900 The (n,r)-th term of the following triangle is T(n)-T(r) for r = 0 to n. The n-th row contains n+1 terms. T(n) = the n-th triangular number = n(n+1)/2. Sequence contains the sum of terms at a 45-degree angle.

Original entry on oeis.org

0, 1, 3, 8, 15, 27, 42, 64, 90, 125, 165, 216, 273, 343, 420, 512, 612, 729, 855, 1000, 1155, 1331, 1518, 1728, 1950, 2197, 2457, 2744, 3045, 3375, 3720, 4096, 4488, 4913, 5355, 5832, 6327, 6859, 7410, 8000, 8610, 9261, 9933, 10648, 11385, 12167, 12972
Offset: 0

Views

Author

Amarnath Murthy, Jul 13 2005

Keywords

Comments

Initial terms match those of A047866 with a difference of +1 or -1 in some cases. A047866: 0, 1, 3, 8, 15, 27, 42, 63, 90, 124, 165, 215, ...

Examples

			The (n,r)-th term of the following triangle is T(n)-T(r) for r = 0 to n. The n-th row contains n+1 terms.
   0
   1  0
   3  2  0
   6  5  3  0
  10  9  7  4  0
  15 14 12  9  5  0
  21 20 18 15 11  6  0
  28 27 ...
  36 ...
Sequence contains the sum of terms at a 45-degree angle.
a(5) = 15 + 9 + 3 = 27.
		

Crossrefs

Programs

  • Maple
    A109900 := proc(n) if n mod 2 = 1 then ( (n+1)/2)^3 ; else (n+1)*(n/2+1)*(n/2)/2 ; fi ; end: seq(A109900(n),n=0..80) ; # R. J. Mathar, Feb 11 2008
  • Mathematica
    LinearRecurrence[{2, 1, -4, 1, 2, -1}, {0, 1, 3, 8, 15, 27}, 50] (* Amiram Eldar, Sep 17 2022 *)

Formula

a(2n+1) = (n+1)^3; a(2n) = (2n+1)*T(n) = (2n+1)*(n+1)*n/2, where T=A000217. - R. J. Mathar, Feb 11 2008
a(n) = A034828(n+1). - R. J. Mathar, Aug 18 2008
G.f.: x*(1+x+x^2)/(1-2*x-x^2+4*x^3-x^4-2*x^5+x^6). - Colin Barker, Jan 04 2012
a(n) = (2*n^3+6*n^2+5*n+1-(n+1)*(-1)^n)/16. - Luce ETIENNE, May 12 2015
a(n) = Sum_{k=0..n} A001318(k). - Jacob Szlachetka, Dec 20 2021
Sum_{n>=1} 1/a(n) = 6 - 8*log(2) + zeta(3). - Amiram Eldar, Sep 17 2022

Extensions

Corrected and extended by R. J. Mathar, Feb 11 2008

A122657 a(n) = if n mod 2 = 1 then (n^2-1)*n^3/4 else n^5/4.

Original entry on oeis.org

0, 0, 8, 54, 256, 750, 1944, 4116, 8192, 14580, 25000, 39930, 62208, 92274, 134456, 189000, 262144, 353736, 472392, 617310, 800000, 1018710, 1288408, 1606044, 1990656, 2437500, 2970344, 3582306, 4302592, 5121690, 6075000, 7149840, 8388608, 9774864, 11358856
Offset: 0

Views

Author

N. J. A. Sloane, Sep 22 2006

Keywords

Comments

Wiener index of product of two cycles of length n.

Crossrefs

Programs

  • Mathematica
    Table[If[Mod[n, 2] == 0, n^5, (n^2 - 1) n^3]/4, {n, 0, 20}] (* Eric W. Weisstein, May 10 2017 *)
    LinearRecurrence[{2, 3, -8, -2, 12, -2, -8, 3, 2, -1}, {0, 8, 54, 256,
       750, 1944, 4116, 8192, 14580, 25000}, {0, 20}] (* Eric W. Weisstein, May 10 2017 *)
    CoefficientList[Series[2 x^2 (4 x^6 + 19 x^5 + 62 x^4 + 70 x^3 + 62 x^2 + 19 x + 4)/((x + 1)^4 (x - 1)^6), {x, 0, 20}], x] (* Eric W. Weisstein, Sep 08 2017 *)
    If[OddQ[#],((#^2-1)#^3)/4,#^5/4]&/@Range[0,40] (* Harvey P. Dale, Jul 03 2021 *)

Formula

G.f.: 2*x^2*(4*x^6+19*x^5+62*x^4+70*x^3+62*x^2+19*x+4) /((x+1)^4*(x-1)^6). - Maksym Voznyy (voznyy(AT)mail.ru), Jul 28 2009

A316224 a(n) = n*(2*n + 1)*(4*n + 1).

Original entry on oeis.org

0, 15, 90, 273, 612, 1155, 1950, 3045, 4488, 6327, 8610, 11385, 14700, 18603, 23142, 28365, 34320, 41055, 48618, 57057, 66420, 76755, 88110, 100533, 114072, 128775, 144690, 161865, 180348, 200187, 221430, 244125, 268320, 294063, 321402, 350385, 381060, 413475, 447678, 483717
Offset: 0

Views

Author

Bruno Berselli, Jun 27 2018

Keywords

Comments

Sums of the consecutive integers from A000384(n) to A000384(n+1)-1. This is the case s=6 of the formula n*(n*(s-2) + 1)*(n*(s-2) + 2)/2 related to s-gonal numbers.
The inverse binomial transform is 0, 15, 60, 48, 0, ... (0 continued).

Examples

			Row sums of the triangle:
|  0 |  ................................................................. 0
|  1 |  2  3  4  5  .................................................... 15
|  6 |  7  8  9 10 11 12 13 14  ........................................ 90
| 15 | 16 17 18 19 20 21 22 23 24 25 26 27  ........................... 273
| 28 | 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44  ............... 612
| 45 | 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65  .. 1155
...
where:
. first column is A000384,
. second column is A130883 (without 1),
. third column is A033816,
. diagonal is A014106,
. 0, 2, 8, 18, 32, 50, ... are in A001105.
		

Crossrefs

First bisection of A059270 and subsequence of A034828, A047866, A109900, A290168.
Sums of the consecutive integers from P(s,n) to P(s,n+1)-1, where P(s,k) is the k-th s-gonal number: A027480 (s=3), A055112 (s=4), A228888 (s=5).

Programs

  • GAP
    List([0..40], n -> n*(2*n+1)*(4*n+1));
    
  • Julia
    [n*(2*n+1)*(4*n+1) for n in 0:40] |> println
  • Magma
    [n*(2*n+1)*(4*n+1): n in [0..40]];
    
  • Maple
    seq(n*(2*n+1)*(4*n+1),n=0..40); # Muniru A Asiru, Jun 27 2018
  • Mathematica
    Table[n (2 n + 1) (4 n + 1), {n, 0, 40}]
  • Maxima
    makelist(n*(2*n+1)*(4*n+1), n, 0, 40);
    
  • PARI
    vector(40, n, n--; n*(2*n+1)*(4*n+1))
    
  • Python
    [n*(2*n+1)*(4*n+1) for n in range(40)]
    
  • Sage
    [n*(2*n+1)*(4*n+1) for n in (0..40)]
    

Formula

O.g.f.: 3*x*(5 + 10*x + x^2)/(1 - x)^4.
E.g.f.: x*(15 + 30*x + 8*x^2)*exp(x).
a(n) = 4*a(n-1) - 6*a(n-2) + 4*a(n-3) - a(n-4).
a(n) = 3*A258582(n).
a(n) = -3*A100157(-n).
Sum_{n>0} 1/a(n) = 2*(3 - log(4)) - Pi.
Sum_{n>=1} (-1)^(n+1)/a(n) = log(2) + 2*sqrt(2)*log(1+sqrt(2)) + (sqrt(2)-1/2)*Pi - 6. - Amiram Eldar, Sep 17 2022

A158822 Triangle read by rows, matrix triple product A000012 * A145677 * A000012.

Original entry on oeis.org

1, 3, 1, 6, 3, 2, 10, 6, 5, 3, 15, 10, 9, 7, 4, 21, 15, 14, 12, 9, 5, 28, 21, 20, 18, 15, 11, 6, 36, 28, 27, 25, 22, 18, 13, 7, 45, 36, 35, 33, 30, 26, 21, 15, 8, 55, 45, 44, 42, 39, 35, 30, 24, 17, 9, 66, 55, 54, 52, 49, 45, 40, 34, 27, 19, 10
Offset: 0

Views

Author

Gary W. Adamson and Roger L. Bagula, Mar 28 2009

Keywords

Examples

			First few rows of the triangle =
   1;
   3,  1;
   6,  3,  2;
  10,  6,  5,  3;
  15, 10,  9,  7,  4;
  21, 15, 14, 12,  9,  5;
  28, 21, 10, 18, 15, 11,  6;
  36, 28, 27, 25, 22, 18, 13,  7;
  45, 36, 35, 33, 30, 26, 21, 15,  8;
  55, 45, 44, 42, 39, 35, 30, 24, 17,  9;
  66, 55, 54, 52, 49, 45, 40, 34, 27, 19, 10;
  78, 66, 65, 63, 60, 56, 51, 45, 38, 30, 21, 11;
  91, 78, 77, 75, 72, 68, 63, 57, 50, 42, 33, 23, 12;
  ...
		

Crossrefs

Programs

  • Mathematica
    T[n_, k_]:= If[k==0, Binomial[n+2, 2], (n+1-k)*(n+k)/2];
    Table[T[n, k], {n,0,15}, {k,0,n}]//Flatten (* G. C. Greubel, Dec 26 2021 *)
  • Sage
    def A158822(n,k):
        if (k==0): return binomial(n+2, 2)
        else: return (n-k+1)*(n+k)/2
    flatten([[A158822(n,k) for k in (0..n)] for n in (0..15)]) # G. C. Greubel, Dec 26 2021

Formula

Triangle read by rows, A000012 * A145677 * A000012; where A000012 = an infinite lower triangular matrix: (1; 1,1; 1,1,1; ...), with all 1's.
From G. C. Greubel, Dec 26 2021: (Start)
T(n, k) = (n+1-k)*(n+k)/2 with T(n, 0) = binomial(n+2, 2).
Sum_{k=0..n} T(n, k) = (1/3)*(n+1)*(n^2 + 2*n + 3) = A006527(n+1).
Sum_{k=0..floor(n/2)} T(n-k, k) = binomial(n+2, 2) + A034828(n+1).
T(n, 1) = A000217(n).
T(n, 2) = A000096(n-1).
T(n, 3) = A055998(n-2).
T(2*n, n) = A134479(n). (End)

Extensions

Definition corrected by Michael Somos, Nov 05 2011

A227356 Partial sums of A129361.

Original entry on oeis.org

1, 2, 5, 10, 20, 36, 65, 112, 193, 324, 544, 900, 1489, 2442, 4005, 6534, 10660, 17336, 28193, 45760, 74273, 120408, 195200, 316216, 512257, 829458, 1343077, 2174130, 3519412, 5696124, 9219105, 14919408, 24144289
Offset: 1

Views

Author

Kival Ngaokrajang, Jul 08 2013

Keywords

Comments

Sum of labeled numbers of boxes arranged as Pyramid type-II with base Fibonacci(n).
Let us call a Pyramid "type-I" when each row starts with the same number as the leftmost base number, and "type-II" when each column has the same number as the base.
The Pyramid arrangements are related to other sequences as follows:
Base Number Type-I Type-II
----------- ------ -------
Natural A002623 A034828
Fibonacci A129696 a(n)
1,0 A008805
See illustration in links.

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{2,1,-3,1,-1,0,1},{1,2,5,10,20,36,65},40] (* Harvey P. Dale, Jun 30 2025 *)

Formula

For n >=2, a(n) = a(n-1) + A129361(n-1).
G.f. -x*(1+x)*(x^2-x+1) / ( (x-1)*(x^2+x-1)*(x^4+x^2-1) ). - Joerg Arndt, Jul 10 2013
a(n) = 2 + A000045(n+4) - A096748(n+6). - R. J. Mathar, Jul 20 2013
Showing 1-10 of 16 results. Next