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.

Previous Showing 11-20 of 47 results. Next

A074279 n appears n^2 times.

Original entry on oeis.org

1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6
Offset: 1

Views

Author

Jon Perry, Sep 21 2002

Keywords

Comments

Since the last occurrence of n comes one before the first occurrence of n+1 and the former is at Sum_{i=0..n} i^2 = A000330(n), we have a(A000330(n)) = a(n*(n+1)*(2n+1)/6) = n and a(1+A000330(n)) = a(1+(n*(n+1)*(2n+1)/6)) = n+1. So the current sequence is, loosely speaking, the inverse function of the square pyramidal sequence A000330. A000330 has many alternative formulas, thus yielding many alternative formulas for the current sequence. - Jonathan Vos Post, Mar 18 2006
Partial sums of A253903. - Jeremy Gardiner, Jan 14 2018

Examples

			This can be viewed also as an irregular table consisting of successively larger square matrices:
  1;
  2, 2;
  2, 2;
  3, 3, 3;
  3, 3, 3;
  3, 3, 3;
  4, 4, 4, 4;
  4, 4, 4, 4;
  4, 4, 4, 4;
  4, 4, 4, 4;
  etc.
When this is used with any similarly organized sequence, a(n) is the index of the matrix in whose range n is. A121997(n) (= A237451(n)+1) and A238013(n) (= A237452(n)+1) would then yield the index of the column and row within that matrix.
		

Crossrefs

Programs

  • Mathematica
    Table[n, {n, 0, 6}, {n^2}] // Flatten (* Arkadiusz Wesolowski, Jan 13 2013 *)
  • PARI
    A074279_vec(N=9)=concat(vector(N,i,vector(i^2,j,i))) \\ Note: This creates a vector; use A074279_vec()[n] to get the n-th term. - M. F. Hasler, Feb 17 2014
    
  • PARI
    a(n) = my(k=sqrtnint(3*n,3)); k + (6*n > k*(k+1)*(2*k+1)); \\ Kevin Ryde, Sep 03 2025
    
  • Python
    from sympy import integer_nthroot
    def A074279(n): return (m:=integer_nthroot(3*n,3)[0])+(6*n>m*(m+1)*((m<<1)+1)) # Chai Wah Wu, Nov 04 2024

Formula

For 1 <= n <= 650, a(n) = floor((3n)^(1/3)+1/2). - Mikael Aaltonen, Jan 05 2015
a(n) = 1 + floor( t(n) + 1 / ( 12 * t(n) ) - 1/2 ), where t(n) = (sqrt(3888*(n-1)^2-1) / (8*3^(3/2)) + 3 * (n-1)/2 ) ^(1/3). - Mikael Aaltonen, Mar 01 2015
a(n) = floor(t + 1/(12*t) + 1/2), where t = (3*n - 1)^(1/3). - Ridouane Oudra, Oct 30 2023
a(n) = m+1 if n > m(m+1)(2m+1)/6 and a(n) = m otherwise where m = floor((3n)^(1/3)). - Chai Wah Wu, Nov 04 2024
Sum_{n>=1} (-1)^(n+1)/a(n) = Pi/4 (A003881). - Amiram Eldar, Jun 30 2025

Extensions

Offset corrected from 0 to 1 by Antti Karttunen, Feb 08 2014

A035597 Number of points of L1 norm 3 in cubic lattice Z^n.

Original entry on oeis.org

0, 2, 12, 38, 88, 170, 292, 462, 688, 978, 1340, 1782, 2312, 2938, 3668, 4510, 5472, 6562, 7788, 9158, 10680, 12362, 14212, 16238, 18448, 20850, 23452, 26262, 29288, 32538, 36020, 39742, 43712, 47938, 52428, 57190, 62232, 67562
Offset: 0

Views

Author

Keywords

Comments

Sums of the first n terms > 0 of A001105 in palindromic arrangement. a(n) = Sum_{i=1 .. n} A001105(i) + Sum_{i=1 .. n-1} A001105(i), e.g. a(3) = 38 = 2 + 8 + 18 + 8 + 2; a(4) = 88 = 2 + 8 + 18 + 32 + 18 + 8 + 2. - Klaus Purath, Jun 19 2020
Apart from multiples of 3, all divisors of n are also divisors of a(n), i.e. if n is not divisible by 3, a(n) is divisible by n. All divisors d of a(n) for d !== 0 (mod) 3 are also divisors of a(abs(n-d)) and a(n+d). For all n congruent to 0,2,7 (mod 9) a(n) is divisible by 3. If n is divisible by 3^k, a(n) is divisible by 3^(k-1). - Klaus Purath, Jul 24 2020

Crossrefs

Partial sums of A069894.
Column 3 of A035607, A266213, A343599.
Row 3 of A113413, A119800, A122542.

Programs

  • Magma
    [(4*n^3 + 2*n)/3: n in [0..40]]; // Vincenzo Librandi, Sep 19 2011
  • Maple
    f := proc(n,m) local i; sum( 2^i*binomial(n,i)*binomial(m-1,i-1),i=1..min(n,m)); end; # n=dimension, m=norm
  • Mathematica
    Table[(4n^3+2n)/3,{n,0,40}] (* or *) LinearRecurrence[{4,-6,4,-1},{0,2,12,38},41] (* Harvey P. Dale, Sep 18 2011 *)

Formula

a(n) = (4*n^3 + 2*n)/3.
a(n) = 2*A005900(n). - R. J. Mathar, Dec 05 2009
a(0)=0, a(1)=2, a(2)=12, a(3)=38, a(n)=4*a(n-1)-6*a(n-2)+4*a(n-3)-a(n-4). G.f.: (2*x*(x+1)^2)/(x-1)^4. - Harvey P. Dale, Sep 18 2011
a(n) = -a(-n), a(n+1) = A097869(4n+3) = A084570(2n+1). - Bruno Berselli, Sep 20 2011
a(n) = 2*n*Hypergeometric2F1(1-n,1-k,2,2), where k=3. Also, a(n) = A001845(n) - A001844(n). - Shel Kaphan, Feb 26 2023
a(n) = A005899(n)*n/3. - Shel Kaphan, Feb 26 2023
a(n) = A006331(n)+A006331(n-1). - R. J. Mathar, Aug 12 2025

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

Original entry on oeis.org

2, 20, 84, 240, 550, 1092, 1960, 3264, 5130, 7700, 11132, 15600, 21294, 28420, 37200, 47872, 60690, 75924, 93860, 114800, 139062, 166980, 198904, 235200, 276250, 322452, 374220, 431984, 496190, 567300, 645792, 732160, 826914, 930580, 1043700
Offset: 1

Views

Author

Alexander Adamchuk, Oct 24 2004

Keywords

Comments

Sum of all matrix elements M(i,j) = i^2 + j^2 (i,j = 1,...,n).
From Torlach Rush, Jan 05 2020: (Start)
a(n) = n * A006331(n).
tr(M(n)) = A006331(n).
The sum of the antidiagonal of M(n) equals tr(M(n)).
M(n) = M(n)' (Symmetric).
M(1,) = M(,1) = A002522(n), n > 0.
M(2,) = M(,2) = A087475(n), n > 0.
M(3,) = M(,3) = A189834(n), n > 0.
M(4,) = M(,4) = A241751(n), n > 0.
(End)
Consider the partitions of 2n into two parts (p,q) where p <= q. Then a(n) is the total volume of the family of rectangular prisms with dimensions p, p and p+q. - Wesley Ivan Hurt, Apr 15 2018

Examples

			a(2) = (1^2 + 1^2) + (1^2 + 2^2) + (2^2 + 1^2) + (2^2 + 2^2) = 2 + 5 + 5 + 8 = 20.
		

Crossrefs

Programs

  • Magma
    [n^2*(n+1)*(2*n+1)/3: n in [1..40]]; // G. C. Greubel, Apr 09 2023
    
  • Mathematica
    Table[ Sum[i^2 + j^2, {i, n}, {j, n}], {n, 35}]
    LinearRecurrence[{5, -10, 10, -5, 1}, {2, 20, 84, 240, 550}, 40] (* Vincenzo Librandi, Apr 16 2018 *)
  • PARI
    a(n)=n^2*(n+1)*(2*n+1)/3 \\ Charles R Greathouse IV, Oct 07 2015
    
  • SageMath
    [n^2*(n+1)*(2*n+1)/3 for n in range(1,41)] # G. C. Greubel, Apr 09 2023

Formula

a(n) = Sum_{j=1..n} Sum_{i=1..n} (i^2 + j^2).
G.f.: 2*x*(1 + 5*x + 2*x^2)/(1-x)^5. - Colin Barker, May 04 2012
E.g.f.: (1/3)*exp(x)*x*(6 + 24*x + 15*x^2 + 2*x^3) . - Stefano Spezia, Jan 06 2020
a(n) = a(n-1) + (8*n^3 - 3*n^2 + n)/3. - Torlach Rush, Jan 07 2020
From Amiram Eldar, May 31 2022: (Start)
Sum_{n>=1} 1/a(n) = Pi^2/2 + 24*log(2) - 21.
Sum_{n>=1} (-1)^(n+1)/a(n) = Pi^2/4 - 6*Pi - 6*log(2) + 21. (End)
From G. C. Greubel, Apr 09 2023: (Start)
a(n) = (1/4)*A100431(n-1).
a(n) = 2*A108678(n-1). (End)

Extensions

More terms from Robert G. Wilson v, Nov 01 2004
New definition from Ralf Stephan, Dec 01 2004

A132124 a(n) = n*(n+1)*(8*n + 1)/6.

Original entry on oeis.org

0, 3, 17, 50, 110, 205, 343, 532, 780, 1095, 1485, 1958, 2522, 3185, 3955, 4840, 5848, 6987, 8265, 9690, 11270, 13013, 14927, 17020, 19300, 21775, 24453, 27342, 30450, 33785, 37355, 41168, 45232, 49555, 54145, 59010, 64158, 69597, 75335, 81380, 87740, 94423
Offset: 0

Views

Author

Reinhard Zumkeller, Aug 12 2007

Keywords

Comments

Convolution of the sequences (0,3,5,0,0,0,...) and (binomial(n+3, 3)), n >= 0. - Emeric Deutsch, Aug 30 2007

Crossrefs

Programs

  • Maple
    seq((1/6)*n*(n+1)*(8*n+1),n=0..40); # Emeric Deutsch, Aug 30 2007
  • Mathematica
    a[n_] := n*(n + 1)*(8*n + 1)/6; Array[a, 42, 0] (* Amiram Eldar, May 20 2023 *)

Formula

a(n) = A132121(n,2) for n > 1.
G.f.: x*(3+5*x)/(1-x)^4. - Emeric Deutsch, Aug 30 2007
From Bruno Berselli, Nov 25 2010: (Start)
a(n) = n*A014105(n) - A016061(n-1), since A016061(n-1) = Sum_{k=0..n-1} A014105(k) (n > 0).
Also a(n) = A002412(n) + A006331(n) = A007585(n) + A002378(n). (End)
Sum_{n>=1} 1/a(n) = 54 - 24*(sqrt(2)+1)*Pi/7 - 24*(sqrt(2)+8)*log(2)/7 + 48*sqrt(2)*log(2-sqrt(2))/7. - Amiram Eldar, May 20 2023
E.g.f.: exp(x)*x*(18 + 33*x + 8*x^2)/6. - Stefano Spezia, Feb 21 2024

A162147 a(n) = n*(n+1)*(5*n + 4)/6.

Original entry on oeis.org

0, 3, 14, 38, 80, 145, 238, 364, 528, 735, 990, 1298, 1664, 2093, 2590, 3160, 3808, 4539, 5358, 6270, 7280, 8393, 9614, 10948, 12400, 13975, 15678, 17514, 19488, 21605, 23870, 26288, 28864, 31603, 34510, 37590, 40848, 44289, 47918, 51740, 55760
Offset: 0

Views

Author

Keywords

Comments

Partial sums of A005475.
Suppose we extend the triangle in A215631 to a symmetric array by reflection about the main diagonal. The array is defined by m(i,j) = i^2 + i*j + j^2: 3, 7, 13, ...; 7, 12, 19, ...; 13, 19, 27, .... Then a(n) is the sum of the n-th antidiagonal. Examples: 3, 7 + 7, 13 + 12 + 13, 21 + 19 + 19 + 21, etc. - J. M. Bergot, Jun 25 2013
Binomial transform of [0,3,8,5,0,0,0,...]. - Alois P. Heinz, Mar 10 2015

Examples

			For n=4, a(4) = 0*(5+0) + 1*(5+1) + 2*(5+2) + 3*(5+3) + 4*(5+4) = 80. - _Bruno Berselli_, Mar 17 2016
		

Crossrefs

Programs

Formula

From R. J. Mathar, Jun 27 2009: (Start)
a(n) = 4*a(n-1) - 6*a(n-2) + 4*a(n-3) - a(n-4)
a(n) = A033994(n) + A000217(n).
G.f.: x*(3+2*x)/(1-x)^4. (End)
a(n) = A035005(n+1)/4. - Johannes W. Meijer, Feb 04 2010
a(n) = Sum_{i=0..n} i*(n + 1 + i). - Bruno Berselli, Mar 17 2016
E.g.f.: x*(18 + 24*x + 5*x^2)*exp(x)/6. - G. C. Greubel, Apr 01 2021

Extensions

Definition rephrased by R. J. Mathar, Jun 27 2009

A255211 a(n) = n*(n+1)*(7*n+2)/6.

Original entry on oeis.org

0, 3, 16, 46, 100, 185, 308, 476, 696, 975, 1320, 1738, 2236, 2821, 3500, 4280, 5168, 6171, 7296, 8550, 9940, 11473, 13156, 14996, 17000, 19175, 21528, 24066, 26796, 29725, 32860, 36208, 39776, 43571, 47600, 51870, 56388, 61161, 66196, 71500, 77080, 82943
Offset: 0

Views

Author

Luce ETIENNE, Feb 17 2015

Keywords

Comments

a(n) is the number of triangles of all sizes in a polyiamond of trapezoid shape with 3 sides of length n and the base of length 2*n. The number of triangular cells in the trapezoid is 3*n^2. This is half of a regular hexagon with side lengths n.
The number of triangles oriented with their bases aligned with the base of the trapezoid is n*(n+1)*(2*n+1)/3 and the number oriented in the opposite direction is n^2*(n+1)/2. a(n) is the sum of these two.

Examples

			From the second comment: a(1)= 2+1, a(2)= 10+6, a(3)= 28+18, a(4)= 60+40.
		

Crossrefs

Partial sums of A022264.

Programs

  • Magma
    [n*(n+1)*(7*n+2)/6 : n in [0..50]]; // Wesley Ivan Hurt, Apr 11 2021
  • Mathematica
    Table[n (n + 1) (7 n + 2)/6, {n, 0, 50}] (* Bruno Berselli, Feb 17 2015 *)
  • PARI
    concat(0, Vec(x*(4*x+3)/(x-1)^4 + O(x^100))) \\ Colin Barker, Feb 17 2015
    
  • PARI
    vector(50, n, n--; n*(n+1)*(7*n+2)/6) \\ Bruno Berselli, Feb 17 2015
    

Formula

G.f.: x*(3 + 4*x) / (1 - x)^4. - Colin Barker, Feb 17 2015
a(n) = Sum_{j=0..n-1} (n-j)*(3*n-2*j) = Sum_{j=1..n} j*(n+2*j) for n>0.
a(n) = A000292(2*n) - A000292(n). - Bruno Berselli, Sep 22 2016
Sum_{n>=1} 1/a(n) = 21*HarmonicNumber(2/7)/5 - 6/5 = 0.44513027538601361333... . - Vaclav Kotesovec, Sep 22 2016
E.g.f.: exp(x)*x*(18 + 30*x + 7*x^2)/6. - Stefano Spezia, Mar 02 2025

Extensions

Edited and extended by Bruno Berselli, Dec 01 2016

A048147 Array T read by diagonals; T(i,j) = i^2 + j^2.

Original entry on oeis.org

0, 1, 1, 4, 2, 4, 9, 5, 5, 9, 16, 10, 8, 10, 16, 25, 17, 13, 13, 17, 25, 36, 26, 20, 18, 20, 26, 36, 49, 37, 29, 25, 25, 29, 37, 49, 64, 50, 40, 34, 32, 34, 40, 50, 64, 81, 65, 53, 45, 41, 41, 45, 53, 65, 81, 100, 82, 68, 58, 52, 50, 52, 58, 68
Offset: 0

Views

Author

Keywords

Comments

For any i,j >=0 a(i)*a(j) is a member of this sequence, since (a^2 + b^2)*(c^2 + d^2) = (a*c + b*d)^2 + (a*d - b*c)^2. - Boris Putievskiy, May 05 2013

Examples

			Diagonals (each starting on row 1): {0}; {1,1}; {4,2,4}; ...
		

Crossrefs

Cf. A006331.

A067046 a(n) = lcm(n, n+1, n+2)/6.

Original entry on oeis.org

1, 2, 10, 10, 35, 28, 84, 60, 165, 110, 286, 182, 455, 280, 680, 408, 969, 570, 1330, 770, 1771, 1012, 2300, 1300, 2925, 1638, 3654, 2030, 4495, 2480, 5456, 2992, 6545, 3570, 7770, 4218, 9139, 4940, 10660, 5740, 12341, 6622, 14190, 7590, 16215, 8648, 18424, 9800
Offset: 1

Views

Author

Amarnath Murthy, Dec 30 2001

Keywords

Examples

			a(6) = 28 as lcm(6,7,8)/6 = 168/6 = 28.
		

Crossrefs

Cf. A000447 (bisection), A006331 (bisection), A033931.

Programs

Formula

G.f.: (x^4 + 2x^3 + 6x^2 + 2x + 1)/(1 - x^2)^4.
a(n) = binomial(n+2,3)*(3-(-1)^n)/4. - Gary Detlefs, Apr 13 2011
Quasipolynomial: a(n) = n(n+1)(n+2)/6 when n is odd and n(n+1)(n+2)/12 otherwise. - Charles R Greathouse IV, Feb 27 2012
a(n) = A033931(n) / 6. - Reinhard Zumkeller, Jul 04 2012
From Amiram Eldar, Sep 29 2022: (Start)
Sum_{n>=1} 1/a(n) = 6*(1 - log(2)).
Sum_{n>=1} (-1)^(n+1)/a(n) = 6*(3*log(2) - 2). (End)

A162148 a(n) = n*(n+1)*(5*n+7)/6.

Original entry on oeis.org

0, 4, 17, 44, 90, 160, 259, 392, 564, 780, 1045, 1364, 1742, 2184, 2695, 3280, 3944, 4692, 5529, 6460, 7490, 8624, 9867, 11224, 12700, 14300, 16029, 17892, 19894, 22040, 24335, 26784, 29392, 32164, 35105, 38220, 41514, 44992, 48659, 52520, 56580
Offset: 0

Views

Author

Keywords

Comments

Partial sums of A147875.
Equals the fourth right hand column of A175136 for n>=1. - Johannes W. Meijer, May 06 2011
a(n) is the number of triples (w,x,y) havingt all terms in {0,...,n} and x+y>w. - Clark Kimberling, Jun 14 2012

Crossrefs

Programs

Formula

a(n) = A162147(n) + A000217(n).
From Johannes W. Meijer, May 06 2011: (Start)
G.f.: x*(4+x)/(1-x)^4.
a(n) = 4*binomial(n+2,3) + binomial(n+1,3).
a(n) = A091894(3,0)*binomial(n+2,3) + A091894(3,1)*binomial(n+1,3). (End)
a(n) = (n+1)*A000290(n+1) - Sum_{i=1..n+1} A000217(i).
a(n) = 4*a(n-1) -6*a(n-2) +4*a(n-3) -a(n-4), a(0)=0, a(1)=4, a(2)=17, a(3)=44. - Harvey P. Dale, May 20 2014
E.g.f.: x*(24 +27*x +5*x^2)*exp(x)/6. - G. C. Greubel, Mar 31 2021

Extensions

Definition rephrased by R. J. Mathar, Jun 27 2009

A132339 Array T(n, k) = (-1)^(n+k)*(n+k-2)!*(2*n+2*k-2)!/(n!*k!*(2*n-1)!*(2*k-1)!), with T(0, 0) = 1, T(0, 1) = T(1, 0) = -1, read by antidiagonals.

Original entry on oeis.org

1, -1, -1, 0, 2, 0, 0, -2, -2, 0, 0, 2, 10, 2, 0, 0, -2, -28, -28, -2, 0, 0, 2, 60, 168, 60, 2, 0, 0, -2, -110, -660, -660, -110, -2, 0, 0, 2, 182, 2002, 4290, 2002, 182, 2, 0, 0, -2, -280, -5096, -20020, -20020, -5096, -280, -2, 0, 0, 2, 408, 11424, 74256, 136136, 74256, 11424, 408, 2, 0
Offset: 0

Views

Author

N. J. A. Sloane, Nov 08 2007

Keywords

Examples

			Array (T(n,k)) begins:
   1, -1,    0,     0,       0,       0,         0 ... A154955(k)
  -1,  2,   -2,     2,      -2,       2,        -2 ... (-1)^(k+1)*A040000(k)
   0, -2,   10,   -28,      60,    -110,       182 ... (-1)^k*A006331(k)
   0,  2,  -28,   168,    -660,    2002,     -5096 ... (-1)^k*A006332(k)
   0, -2,   60,  -660,    4290,  -20020,     74256 ... (-1)^k*A006333(k)
   0,  2, -110,  2002,  -20020,  136136,   -705432 ... (-1)^k*A006334(k)
   0, -2,  182, -5096,   74256, -705432,   4938024 ...
   0,  2, -280, 11424, -232560, 2984520, -27457584 ...
Antidiagonal (A(n,k)) triangle begins as:
   1;
  -1, -1;
   0,  2,    0;
   0, -2,   -2,     0;
   0,  2,   10,     2,      0;
   0, -2,  -28,   -28,     -2,      0;
   0,  2,   60,   168,     60,      2,     0;
   0, -2, -110,  -660,   -660,   -110,    -2,     0;
   0,  2,  182,  2002,   4290,   2002,   182,     2,   0;
   0, -2, -280, -5096, -20020, -20020, -5096,  -280,  -2,   0;
   0,  2,  408, 11424,  74256, 136136, 74256, 11424, 408,   2,   0;
		

Crossrefs

Programs

  • Mathematica
    Flatten[{{1}, {-1, -1}}~Join~Table[(2(-1)^(#+k)*(#+k-1)!*(2#+2k-3)!)/(#!*k!*(2# - 1)!*(2k-1)!) &@(n-k), {n,2,12}, {k,0,n}]] (* Michael De Vlieger, Mar 26 2016 *)
  • Sage
    f=factorial
    def T(n,k):
        if (k==0): return bool(n==0) - bool(n==1)
        elif (n==0): return bool(k==0) - bool(k==1)
        else: return (-1)^(n+k)*f(n+k-2)*f(2*n+2*k-2)/(f(n)*f(k)*f(2*n-1)*f(2*k-1))
    flatten([[T(n-k, k) for k in (0..n)] for n in (0..12)]) # G. C. Greubel, Dec 14 2021

Formula

T(n, k) = (-1)^(n+k)*(n+k-2)!*(2*n+2*k-2)!/(n!*k!*(2*n-1)!*(2*k-1)!), with T(0, 0) = 1, T(0, 1) = T(1, 0) = -1.
A(n, k) = T(n-k, k) (antidiagonals).
A(n, n-k) = A(n, k).
A(2*n, n) = A132341(n).

Extensions

More terms from Max Alekseyev, Sep 12 2009
Previous Showing 11-20 of 47 results. Next