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-3 of 3 results.

A006331 a(n) = n*(n+1)*(2*n+1)/3.

Original entry on oeis.org

0, 2, 10, 28, 60, 110, 182, 280, 408, 570, 770, 1012, 1300, 1638, 2030, 2480, 2992, 3570, 4218, 4940, 5740, 6622, 7590, 8648, 9800, 11050, 12402, 13860, 15428, 17110, 18910, 20832, 22880, 25058, 27370, 29820, 32412, 35150, 38038, 41080, 44280
Offset: 0

Views

Author

Keywords

Comments

Triangles in rhombic matchstick arrangement of side n.
Maximum accumulated number of electrons at energy level n. - Scott A. Brown, Feb 28 2000
Let M_n denote the n X n matrix M_n(i,j)=i^2+j^2; then the characteristic polynomial of M_n is x^n - a(n)x^(n-1) - .... - Michael Somos, Nov 14 2002
Convolution of odds (A005408) and evens (A005843). - Graeme McRae, Jun 06 2006
a(n) is the number of non-monotonic functions with domain {0,1,2} and codomain {0,1,...,n}. - Dennis P. Walsh, Apr 25 2011
For any odd number 2n+1, find Sum_{aJ. M. Bergot, Jul 16 2011
a(n) gives the number of (n+1) X (n+1) symmetric (0,1)-matrices containing three ones (see [Cameron]). - L. Edson Jeffery, Feb 18 2012
a(n) is the number of 4-tuples (w,x,y,z) with all terms in {0,...,n} and |w - x| < y. - Clark Kimberling, Jun 02 2012
Partial sums of A001105. - Omar E. Pol, Jan 12 2013
Total number of square diagonals (of any size) in an n X n square grid. - Wesley Ivan Hurt, Mar 24 2015
Number of diagonal attacks of two queens on (n+1) X (n+1) chessboard. - Antal Pinter, Sep 20 2015
a(n) is the minimum value obtainable by partitioning either the set {x in the natural numbers | 1 <= x <= 2n} or the set {x in the natural numbers | 0 <= x <= 2n+1} into pairs, taking the product of all such pairs, and taking the sum of all such products. - Thomas Anton, Oct 21 2020
a(n) is the irregularity of the n-th power of a path of length at least 3*n. (The irregularity of a graph is the sum of the differences between the degrees over all edges of the graph.) - Allan Bickle, Jun 16 2023
a(n) is the maximum possible total number of inversions in all rows and all columns of a Latin square of order n+1. - Ivaylo Kortezov, Jun 28 2025

Examples

			For n=2, a(2)=10 since there are 10 non-monotonic functions f from {0,1,2} to {0,1,2}, namely, functions f = <f(1),f(2),f(3)> given by <0,1,0>, <0,2,0>, <0,2,1>, <1,0,1>, <1,0,2>, <1,2,0>, <1,2,1>, <2,0,1>, <2,0,2>, and <2,1,2>. - _Dennis P. Walsh_, Apr 25 2011
Let n=4, 2*n+1 = 9. Since 9 = 1+8 = 3+6 = 5+4 = 7+2, a(4) = 1*8 + 3*6 + 5*4 + 7*2 = 60. - _Vladimir Shevelev_, May 11 2012
		

References

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

Crossrefs

A row of A132339.
Cf. A002378, A046092, A028896 (irregularities of maximal k-degenerate graphs).

Programs

  • Haskell
    a006331 n = sum $ zipWith (*) [2*n-1, 2*n-3 .. 1] [2, 4 ..]
    -- Reinhard Zumkeller, Feb 11 2012
  • Magma
    [n*(n+1)*(2*n+1)/3: n in [0..40]]; // Vincenzo Librandi, Aug 15 2011
    
  • Maple
    A006331 := proc(n)
        n*(n+1)*(2*n+1)/3 ;
    end proc:
    seq(A006331(n),n=0..80) ; # R. J. Mathar, Sep 27 2013
  • Mathematica
    Table[n(n+1)(2n+1)/3,{n,0,40}] (* or *) LinearRecurrence[{4,-6,4,-1},{0,2,10,28},50] (* Harvey P. Dale, Apr 12 2013 *)
  • PARI
    a(n)=if(n<0,0,n*(n+1)*(2*n+1)/3)
    

Formula

G.f.: 2*x*(1 + x)/(1 - x)^4. - Simon Plouffe (in his 1992 dissertation)
a(n) = 2*binomial(n+1,3) + 2*binomial(n+2,3).
a(n) = 2*A000330(n) = A002492(n)/2.
a(n) = Sum_{i=0..n} T(i,n-i), array T as in A048147. - N. J. A. Sloane, Dec 11 1999
From the formula for the sum of squares of positive integers 1^2 + 2^2 + 3^2 + ... + n^2 = n*(n+1)(2*n+1)/6, if we multiply both sides by 2 we get Sum_{k=0..n} 2*k^2 = n*(n+1)*(2*n+1)/3, which is an alternative formula for this sequence. - Mike Warburton, Sep 08 2007
10*a(n) = A016755(n) - A001845(n); since A016755 are odd cubes and A001845 centered octahedral numbers, 10*a(n) are the "odd cubes without their octahedral contents." - Damien Pras, Mar 19 2011
a(n) = sum(a*b), where the summing is over all unordered partitions 2*n+1=a+b. - Vladimir Shevelev, May 11 2012
a(n) = binomial(2*n+2, 3)/2. - Ronan Flatley, Dec 13 2012
a(n) = A000292(n) + A002411(n). - Omar E. Pol, Jan 11 2013
a(n) = 4*a(n-1) - 6*a(n-2) + 4*a(n-3) - a(n-4) for n>3, with a(0)=0, a(1)=2, a(2)=10, a(3)=28. - Harvey P. Dale, Apr 12 2013
a(n) = A208532(n+1,2). - Philippe Deléham, Dec 05 2013
Sum_{n>0} 1/a(n) = 9 - 12*log(2). - Enrique Pérez Herrero, Dec 03 2014
a(n) = A000292(n-1) + (n+1)*A000217(n). - J. M. Bergot, Sep 02 2015
a(n) = 2*(A000332(n+3) - A000332(n+1)). - Antal Pinter, Sep 20 2015
From Bruno Berselli, May 17 2018: (Start)
a(n) = n*A002378(n) - Sum_{k=0..n-1} A002378(k) for n>0, a(0)=0. Also:
A163102(n) = n*a(n) - Sum_{k=0..n-1} a(k) for n>0, A163102(0)=0. (End)
a(n) = A005900(n) - A000290(n) = A096000(n) - A000578(n+1) = A000578(n+1) - A084980(n+1) = A000578(n+1) - A077415(n)-1 = A112524(n) + 1 = A188475(n) - 1 = A061317(n) - A100178(n) = A035597(n+1) - A006331(n+1). - Bruce J. Nicholson, Jun 24 2018
E.g.f.: (1/3)*exp(x)*x*(6 + 9*x + 2*x^2). - Stefano Spezia, Jan 05 2020
Sum_{n>=1} (-1)^(n+1)/a(n) = 3*Pi - 9. - Amiram Eldar, Jan 04 2022

A358655 a(n) is the number of distinct scalar products which can be formed by pairs of signed permutations (V, W) of [n].

Original entry on oeis.org

1, 2, 7, 24, 61, 111, 183, 281, 409, 571, 771, 1013, 1301, 1639, 2031, 2481, 2993, 3571, 4219, 4941, 5741, 6623, 7591, 8649, 9801, 11051, 12403, 13861, 15429, 17111, 18911, 20833, 22881, 25059, 27371, 29821, 32413, 35151, 38039, 41081, 44281, 47643
Offset: 0

Views

Author

Thomas Scheuerle, Nov 25 2022

Keywords

Comments

Let V be an n-vector of the numbers 1 to n in order and let W be an n-vector of any signed permutation of these numbers. Numbers in W may be either positive or negative. a(n) is the number of different values for the scalar product V*W for all possible W. We allow all combinations of positive and negative signs in W.
Another interpretation of this sequence: A signed permutohedron is also called the Coxeter permutohedron of the family C_n and has A000165(n) vertices. If we choose a vector of one vertex of such a permutohedron to the origin, and cut this permutohedron in slices by hyperplanes which are orthogonal to this vector such that in each slice lies at least one vertex of this permutohedron, then a(n) is the count of such slices obtained by this process.
a(n) is odd if the plane through the origin is occupied by vertices, this means A358629(n) > 0.
For n > 3 all possible planes are occupied by vertices and thus a nice formula ( see formula section ) exists.
The permutohedra for small n are:
n = 2 Octagon.
n = 3 Truncated cuboctahedron.
n = 4 Omnitruncated tesseract.
n = 5 Omnitruncated 5-cube.

Examples

			a(2) = 7
Columns in the table below:
A: Result of the scalar product.
B: Count of combinations for this result.
C: An example.
    A  B      C
    5  1  [ 2,  1]*[ 2, 1]
    4  1  [ 1,  2]*[ 2, 1]
    3  1  [ 2, -1]*[ 2, 1]
    0  2  [ 1, -2]*[ 2, 1]
   -3  1  [-2,  1]*[ 2, 1]
   -4  1  [-1, -2]*[ 2, 1]
   -5  1  [-2, -1]*[ 2, 1]
We have 7 rows. The sum over B is A000165(2).
For a(2) all vectors C are part of the vertices of an octagon.
		

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{4, -6, 4, -1}, {1, 2, 7, 24, 61, 111, 183, 281}, 50] (* Paolo Xausa, Oct 02 2024 *)

Formula

a(n) = (2*n^3 + 3*n^2 + n + 3)/3 = A188475(n), for n > 3 (because valid if A000165(n)/2 > A188475(n)).
From Stefano Spezia, Nov 28 2022: (Start)
G.f.: (1 - 2*x + 5*x^2 + 4*x^3 - 15*x^5 + 16*x^6 - 5*x^7)/(1 - x)^4.
a(n) = 4*a(n-1) - 6*a(n-2) + 4*a(n-3) - a(n-4) for n > 7. (End)

A329523 a(n) = n * (binomial(n + 1, 3) + 1).

Original entry on oeis.org

0, 1, 4, 15, 44, 105, 216, 399, 680, 1089, 1660, 2431, 3444, 4745, 6384, 8415, 10896, 13889, 17460, 21679, 26620, 32361, 38984, 46575, 55224, 65025, 76076, 88479, 102340, 117769, 134880, 153791, 174624, 197505, 222564, 249935, 279756, 312169, 347320, 385359, 426440
Offset: 0

Views

Author

Ilya Gutkovskiy, Nov 15 2019

Keywords

Comments

The n-th centered n-gonal pyramidal number.

Examples

			Square array begins:
  (0), 1,  2,   3,   4,    5,  ... A001477
   0, (1), 3,   7,  14,   25,  ... A004006
   0,  1, (4), 11,  24,   45,  ... A006527
   0,  1,  5, (15), 34,   65,  ... A006003 (partial sums of A005448)
   0,  1,  6,  19, (44),  85,  ... A005900 (partial sums of A001844)
   0,  1,  7,  23,  54, (105), ... A004068 (partial sums of A005891)
...
This sequence is the main diagonal of the array.
		

References

  • E. Deza and M. M. Deza, Figurate numbers, World Scientific Publishing (2012), 142.

Crossrefs

Programs

  • Magma
    [ n*(Binomial(n+1,3)+1):n in [0..40]]; // Marius A. Burtea, Nov 15 2019
    
  • Magma
    R:=PowerSeriesRing(Integers(), 41); [0] cat Coefficients(R!(x*(1-x+5*x^2-x^3)/(1-x)^5)); // Marius A. Burtea, Nov 15 2019
  • Mathematica
    Table[n (Binomial[n + 1, 3] + 1), {n, 0, 40}]
    nmax = 40; CoefficientList[Series[x (1 - x + 5 x^2 - x^3)/(1 - x)^5, {x, 0, nmax}], x]
    LinearRecurrence[{5, -10, 10, -5, 1}, {0, 1, 4, 15, 44}, 41]

Formula

G.f.: x * (1 - x + 5*x^2 - x^3) / (1 - x)^5.
E.g.f.: exp(x) * x * (1 + x + x^2 + x^3 / 6).
a(n) = n * (n + 2) * (n^2 - 2*n + 3) / 6.
a(n) = n * (A000292(n-1) + 1).
a(n) = n + 2 * Sum_{k=1..n} A000330(k-1).
a(n) + a(-n) = 4 * A002415(n).
Showing 1-3 of 3 results.