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-9 of 9 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

A099903 Sum of all matrix elements of n X n matrix M(i,j) = i^3+j^3, (i,j = 1..n). a(n) = n^3*(n+1)^2/2.

Original entry on oeis.org

2, 36, 216, 800, 2250, 5292, 10976, 20736, 36450, 60500, 95832, 146016, 215306, 308700, 432000, 591872, 795906, 1052676, 1371800, 1764000, 2241162, 2816396, 3504096, 4320000, 5281250, 6406452, 7715736, 9230816, 10975050, 12973500
Offset: 1

Views

Author

Alexander Adamchuk, Oct 29 2004

Keywords

Comments

Numerator of a(n)/n! is A099904(n).

Examples

			a(3) = (1/2) * (2^3)*(2+1)^2 = 36.
  (or)
a(3) = (1^3+1^3) + (1^3+2^3) + (2^3+1^3) + (2^3+2^3) = 36.
		

Crossrefs

Programs

Formula

a(n) = Sum_{i=1..n, j=1..n} (i^3 + j^3).
a(n) = 2*n*Sum_{k=1..n} k^3. - Gary Detlefs, Oct 26 2011
a(n) = (n^5 + 2*n^4 + n^3)/2. - Charles R Greathouse IV, Oct 27 2011
G.f.: 2*x*(1+12*x+15*x^2+2*x^3)/(1-x)^6. - Colin Barker, May 04 2012
From Amiram Eldar, Nov 02 2021: (Start)
Sum_{n>=1} 1/a(n) = 2*zeta(3) - Pi^2 + 8.
Sum_{n>=1} (-1)^(n+1)/a(n) = 3*zeta(3)/2 + 12*log(2) - Pi^2/6 - 8. (End)

A198063 Triangle read by rows (n >= 0, 0 <= k <= n, m = 3); T(n,k) = Sum{j=0..m} Sum{i=0..m} (-1)^(j+i)*C(i,j)*n^j*k^(m-j).

Original entry on oeis.org

0, 1, 1, 8, 4, 8, 27, 15, 15, 27, 64, 40, 32, 40, 64, 125, 85, 65, 65, 85, 125, 216, 156, 120, 108, 120, 156, 216, 343, 259, 203, 175, 175, 203, 259, 343, 512, 400, 320, 272, 256, 272, 320, 400, 512, 729, 585, 477, 405, 369, 369, 405, 477, 585, 729
Offset: 0

Views

Author

Peter Luschny, Oct 26 2011

Keywords

Comments

Read as an infinite symmetric square array, this is the table A(n,k)=(n+k)(n^2+k^2), cf. A321500 for the triangle with k <= n. - M. F. Hasler, Nov 22 2018

Examples

			[0]                   0
[1]                  1, 1
[2]                8, 4, 8
[3]             27, 15, 15, 27
[4]           64, 40, 32, 40, 64
[5]        125, 85, 65, 65, 85, 125
[6]   216, 156, 120, 108, 120, 156, 216
[7] 343, 259, 203, 175, 175, 203, 259, 343
From _M. F. Hasler_, Nov 22 2018: (Start)
Can also be seen as the square array A(n,k)=(n+k)*(n^2 + k^2) read by antidiagonals:
n | k: 0   1   2   3 ...
--+----------------------
0 |    0   1   8  27 ...
1 |    1   4  15  40 ...
2 |    8  15  32  65 ...
3 |   27  40  65 108 ...
...      ...     ...
(End)
		

Crossrefs

Programs

  • Magma
    [[2*k^2*n-2*k*n^2+n^3: k in [0..n]]: n in [0..12]]; // G. C. Greubel, Nov 23 2018
    
  • Maple
    A198063 := (n,k) -> 2*k^2*n-2*k*n^2+n^3:
  • Mathematica
    t[n_, k_] := 2 k^2*n - 2 k*n^2 + n^3; Table[t[n, k], {n, 0, 10}, {k, 0, n}] // Flatten (* Amiram Eldar, Nov 22 2018 *)
  • PARI
    A198063(n,k)=2*k^2*n-2*k*n^2+n^3 \\ See also A321500. - M. F. Hasler, Nov 22 2018
    
  • Sage
    [[ 2*k^2*n-2*k*n^2+n^3 for k in range(n+1)] for n in range(12)] # G. C. Greubel, Nov 23 2018

Formula

T(n,k) = 2*k^2*n - 2*k*n^2 + n^3.
T(n,0) = T(n,n) = n^m = n^3 = A000578(n).
T(2*n,n) = (m+1)n^m = 4*n^3 = A033430(n).
T(2*n+1,n+1) = (n+1)^(m+1) - n^(m+1) = (n+1)^4 - n^4 = A005917(n).
Sum{k=0..n} T(n,k) = (2*n^4 + 3*n^3 + n^2)/3 = A098077(n).
T(n+1,k+1)*C(n,k)^4/(k+1)^3 = A197653(n,k).

A108678 a(n) = (n+1)^2*(n+2)*(2*n+3)/6.

Original entry on oeis.org

1, 10, 42, 120, 275, 546, 980, 1632, 2565, 3850, 5566, 7800, 10647, 14210, 18600, 23936, 30345, 37962, 46930, 57400, 69531, 83490, 99452, 117600, 138125, 161226, 187110, 215992, 248095, 283650, 322896, 366080, 413457, 465290, 521850, 583416, 650275, 722722
Offset: 0

Views

Author

Emeric Deutsch, Jun 17 2005

Keywords

Comments

Kekulé numbers for certain benzenoids.

References

  • S. J. Cyvin and I. Gutman, Kekulé structures in benzenoid hydrocarbons, Lecture Notes in Chemistry, No. 46, Springer, New York, 1988 (p. 232, # 44).

Crossrefs

Programs

  • Magma
    [(n+1)^2*(n+2)*(2*n+3)/6: n in [0..60]]; // G. C. Greubel, Apr 09 2023
    
  • Maple
    a:=n->(n+1)^2*(n+2)*(2*n+3)/6: seq(a(n),n=0..42);
    a:=n->sum(n*j^2, j=1..n): seq(a(n), n=1..36); # Zerinvary Lajos, Apr 29 2007
  • Mathematica
    Table[(n+1)^2*(n+2)(2n+3)/6,{n,0,100}] (* Vladimir Joseph Stephan Orlovsky, Jun 03 2011 *)
  • SageMath
    [(n+1)^2*(n+2)*(2*n+3)/6 for n in range(61)] # G. C. Greubel, Apr 09 2023

Formula

G.f.: (1 + 5*x + 2*x^2)/(1-x)^5.
a(n) = A098077(n+1)/2. - Alexander Adamchuk, Apr 12 2006
From Amiram Eldar, May 31 2022: (Start)
Sum_{n>=0} 1/a(n) = Pi^2 + 48*log(2) - 42.
Sum_{n>=0} (-1)^n/a(n) = Pi^2/2 - 12*Pi - 12*log(2) + 42. (End)
From G. C. Greubel, Apr 09 2023: (Start)
a(n) = (1/3)*binomial(n+2, 2)*binomial(2*n+3, 2).
a(n) = (1/3)*A000217(n+1)*A014105(n+1)
a(n) = (1/8)*A100431(n).
E.g.f.: (1/6)*(6 + 54*x + 69*x^2 + 23*x^3 + 2*x^4)*exp(x). (End)
a(n) = (n+1)*A000330(n+1). - Olivier Gérard, Jan 13 2024

A100431 Bisection of A002417.

Original entry on oeis.org

8, 80, 336, 960, 2200, 4368, 7840, 13056, 20520, 30800, 44528, 62400, 85176, 113680, 148800, 191488, 242760, 303696, 375440, 459200, 556248, 667920, 795616, 940800, 1105000, 1289808, 1496880, 1727936, 1984760, 2269200, 2583168, 2928640, 3307656, 3722320
Offset: 0

Views

Author

N. J. A. Sloane, Nov 20 2004

Keywords

Crossrefs

Programs

Formula

a(n) = (4/3)*(2*n^4 + 11*n^3 + 22*n^2 + 19*n + 6). - Ralf Stephan, May 15 2007
G.f.: 8*(1 + 5*x + 2*x^2)/(1 - x)^5. - Ilya Gutkovskiy, Feb 24 2017
From G. C. Greubel, Apr 09 2023: (Start)
a(n) = (8/3)*binomial(n+2, 2)*binomial(2*n+3, 2).
a(n) = (8/3)*A000217(n+1)*A014105(n+1).
a(n) = 8*A108678(n).
a(n) = 4*A098077(n+1).
E.g.f.: (4/3)*(6 + 54*x + 69*x^2 + 23*x^3 + 2*x^4)*exp(x). (End)

Extensions

More terms from Hugo Pfoertner, Nov 26 2004

A198061 Array read by antidiagonals, m>=0, n>=0, A(m,n) = sum{k=0..n} sum{j=0..m} sum{i=0..m} (-1)^(j+i)*C(i,j)*n^j*k^(m-j).

Original entry on oeis.org

1, 0, 2, 0, 2, 3, 0, 2, 6, 4, 0, 2, 11, 12, 5, 0, 2, 20, 32, 20, 6, 0, 2, 37, 84, 70, 30, 7, 0, 2, 70, 224, 240, 130, 42, 8, 0, 2, 135, 612, 834, 550, 217, 56, 9, 0, 2, 264, 1712, 2968, 2354, 1092, 336, 72, 10, 0, 2, 521, 4884, 10826, 10310, 5551, 1960, 492
Offset: 0

Views

Author

Peter Luschny, Nov 02 2011

Keywords

Examples

			m\n  [0] [1]  [2]   [3]    [4]     [5]    [6]
----------------------------------------------
[0]   1   2    3     4      5       6       7    A000027
[1]   0   2    6    12     20      30      42    A002378
[2]   0   2   11    32     70     130     217    A033994
[3]   0   2   20    84    240     550    1092    A098077
[4]   0   2   37   224    834    2354    5551
[5]   0   2   70   612   2968   10310   28854
		

Crossrefs

Cf. A198060.

Programs

  • Maple
    A198061 := proc(m, n) local i,j,k,pow;
    pow := (a,b) -> if a=0 and b=0 then 1 else a^b fi;
    add(add(add((-1)^(j+i)*binomial(i,j)*pow(n,j)*pow(k,m-j),i=0..m),j=0..m),k=0..n) end:
    for m from 0 to 8 do lprint(seq(A198061(m,n), n=0..6)) od;
  • Mathematica
    Unprotect[Power]; 0^0 = 1; Protect[Power]; a[m_, n_] :=  Sum[(-1)^(j+i)*Binomial[i, j]*n^j*k^(m-j) , {i, 0, m}, {j, 0, m}, {k, 0, n}]; Table[a[m-n, n], {m, 0, 10}, {n, 0, m}] // Flatten (* Jean-François Alcover, Jul 26 2013 *)

Formula

A198061(n,2) = A006127(n+1)

A123608 Numbers k such that k, k+1 and 2*k+1 are composite.

Original entry on oeis.org

24, 25, 27, 32, 34, 38, 45, 49, 55, 57, 62, 64, 76, 77, 80, 84, 85, 87, 91, 92, 93, 94, 104, 110, 115, 117, 118, 121, 122, 123, 124, 129, 132, 133, 142, 143, 144, 145, 147, 152, 154, 159, 160, 161, 164, 169, 170, 171, 175, 177, 182, 184, 185, 187, 188, 195, 201
Offset: 1

Views

Author

Alexander Adamchuk, Nov 15 2006

Keywords

Comments

Also numbers n such that A098735(n) = 1. Also numbers n such that A098077(n) divides n!. Note that n, n+1 and 2n+1 are all primes only for n = 2.

Crossrefs

Programs

  • Mathematica
    Select[Range[500],!PrimeQ[ # ]&&!PrimeQ[ #+1]&&!PrimeQ[2#+1]&]
    Select[Range[250],AllTrue[{#,#+1,2#+1},CompositeQ]&] (* Harvey P. Dale, Jun 02 2025 *)

A098735 Numerator of sum of all matrix elements M(i,j) = i^2 + j^2 (i,j = 1..n) divided by n!.

Original entry on oeis.org

2, 10, 14, 10, 55, 91, 7, 17, 19, 11, 253, 13, 13, 29, 31, 17, 17, 703, 19, 41, 43, 23, 1081, 1, 1, 53, 1, 29, 1711, 1891, 31, 1, 67, 1, 71, 2701, 37, 1, 79, 41, 3403, 43, 43, 89, 1, 47, 47, 97, 1, 101, 103, 53, 5671, 109, 1, 113, 1, 59, 59, 61, 61, 1, 127, 1, 131, 67, 67, 137
Offset: 1

Views

Author

Alexander Adamchuk, Oct 28 2004

Keywords

Comments

This is a highly irregular sequence with high points belonging to hexagonal numbers A000384(n) = n*(2n-1) or second hexagonal numbers A014105(n) = n*(2n+1). All other elements of this sequence are equal to 1, n, (n+1) or (2n+1).
Numbers n such that a(n) = 1 are {24, 25, 27, 32, 34, 38, 45, 49, 55, 57, 62, 64, 76, 77, 80, 84, 85, 87, 91, 92, 93, 94, ...}. a(n) = n only iff n is prime such that 2n+1 is composite. Such primes (non-Sophie Germain primes) are listed in A053176(n) = {7, 13, 17, 19, 31, 37, 43, 47, 59, 61, 67, 71, 73, 79, 97, ...}. a(n) = n+1 for n = {1, 10, 12, 16, 22, 28, 40, 42, 46, 52, 58, 60, 66, 70, 72, 82, 88, 100, ...}, which coincides with one exception (4) with A109274(n) = {1, 4, 10, 12, 16, 22, 28, 40, 42, 46, 52, 58, 60, ...} Numbers n such that n+1 is prime, 2n+1 composite. a(n) = 2n+1 for n = {8, 9, 14, 15, 20, 21, 26, 33, 35, 39, 44, 48, 50, 51, 54, 56, 63, 65, 68, 69, 74, 75, 81, 86, 90, 95, 98, 99, ...} = A096784(n) Numbers n such that both n and n+1 are composite numbers that sum up to a prime. a(n) = n*(2n+1) for n = {2, 5, 11, 23, 29, 41, 53, 83, 89, 113, 131, 173, 179, 191, ...}, which coincides with one exception (3) with A005384(n) = {2, 3, 5, 11, 23, 29, 41, 53, 83, 89, 113, 131, 173, 179, 191, ...} Sophie Germain primes p: 2p+1 is also prime. a(n) = (n+1)*(2n+1) for n = 6k, where k = {1, 3, 5, 6, 13, 16, 23, 26, 33, 35, 38, 45, 51, 55, 56, 61, 63, 73, 83, 91, 96, 100, ...}. - Alexander Adamchuk, Nov 15 2006
Numbers n such that a(n) = 1 are listed in A123608(n) = {24, 25, 27, 32, 34, 38, 45, 49, 55, 57, 62, 64, 76, 77, 80, 84, 85, 87, 91, 92, 93, 94, ...} Numbers n such that n, n+1 and 2n+1 are composite. - Alexander Adamchuk, Jan 05 2007

Examples

			1/n!*A098077(n) begins 2, 10, 14, 10, 55/12, 91/60, 7/18, 17/210, 19/1344, ... So a(6) = 91.
		

Crossrefs

Cf. A098077.
Cf. A123608 (numbers n such that n, n+1 and 2n+1 are composite).

Programs

  • Mathematica
    Numerator[Table[1/n!*Sum[Sum[(i^2+j^2), {i, 1, n}], {j, 1, n}], {n, 1, 100}]]
    Table[ Numerator[ n*(n+1)*(2n+1)/3/(n-1)! ], {n,1,100} ] (* Alexander Adamchuk, Nov 15 2006 *)
  • PARI
    a(n) = numerator(sum(i=1, n, sum(j=1, n, i^2 + j^2))/n!); \\ Michel Marcus, May 31 2022

Formula

a(n) = numerator(A098077(n)/n!).
a(n) = numerator(n*(n+1)*(2n+1)/3/(n-1)!). - Alexander Adamchuk, Nov 15 2006

A099904 Numerator of sum of all matrix elements of N X N matrix M(i,j) = i^3+j^3, (i,j = 1..n) divided by n!.

Original entry on oeis.org

2, 18, 36, 100, 75, 147, 98, 18, 45, 605, 121, 169, 1183, 7, 1, 289, 289, 361, 361, 1, 11, 5819, 529, 1, 13, 13, 1, 841, 841, 961, 961, 1, 17, 17, 1, 1369, 26011, 19, 1, 1681, 1681, 1849, 1849, 1, 23, 50807, 2209, 1, 1, 1, 1, 2809, 2809, 1, 1, 1, 29, 100949, 3481, 3721
Offset: 1

Views

Author

Alexander Adamchuk, Oct 29 2004

Keywords

Comments

Sum M(i,j) (i,j = 1..n) is A099903(n). a(n) is an irregular sequence with highest champions belonging to Pentagonal pyramidal numbers n^2*(n+1)/2 (A002411) and n/2*(n+1)^2 (A006002).

Examples

			A099903(n)/n! begins 2, 18, 36, 100/3, 75/4, 147/20, 98/45, 18/35, 45/448, ... So a(6) = 147.
		

Crossrefs

Programs

  • Mathematica
    Table[ Numerator[ Sum[(i^3 + j^3), {i, n}, {j, n}]/n! ], {n, 60}]

Formula

a(n) = Numerator[1/n!*Sum[Sum[(i^3+j^3), {i, 1, n}], {j, 1, n}]] a(n) = Numerator[1/2 * (n^3)*(n+1)^2 /n! ].
Showing 1-9 of 9 results.