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

A015237 a(n) = (2*n - 1)*n^2.

Original entry on oeis.org

0, 1, 12, 45, 112, 225, 396, 637, 960, 1377, 1900, 2541, 3312, 4225, 5292, 6525, 7936, 9537, 11340, 13357, 15600, 18081, 20812, 23805, 27072, 30625, 34476, 38637, 43120, 47937, 53100, 58621, 64512
Offset: 0

Views

Author

Keywords

Comments

Structured hexagonal prism numbers. - James A. Record (james.record(AT)gmail.com), Nov 07 2004
Number of divisors of 60^(n-1) for n>0. - J. Lowell, Aug 30 2008
The sum of the 2*n+1 numbers between n*(n+1) and (n+1)*(n+2) gives a(n+1). - J. M. Bergot, Apr 17 2013
Partial sums of A080859. - J. M. Bergot, Jul 03 2013
a(n) = number of 2 X 2 matrices having all elements in {0..n} with determinant = permanent. - Indranil Ghosh, Dec 26 2016
Number of additions and multiplications needed to multiply two n X n matrices naively. - Charles R Greathouse IV, Jan 19 2018

Crossrefs

Cf. A100177 (structured prisms); A100145 (more on structured numbers).
Cf. A000578, A045991, A000384, A080859 (first diffs), A103220 (partial sums).
Cf. similar sequences, with the formula (k*n-k+2)*n^2/2, listed in A262000.

Programs

Formula

a(n) = A000578(n) + A045991(n). - Zerinvary Lajos, Jun 11 2008
a(n) = A199771(2*n-1) for n > 0. - Reinhard Zumkeller, Nov 23 2011
G.f.: x*(1+8*x+3*x^2)/(1-x)^4. - Colin Barker, Jun 08 2012
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3) + 12, a(0)=1, a(1)=1, a(2)=12. - G. C. Greubel, Jul 31 2015
E.g.f.: x*(2*x^2 + 5*x + 1)*exp(x). - G. C. Greubel, Jul 31 2015
a(n) = Sum_{i=0..n-1} n*(4*i+1) for n>0. - Bruno Berselli, Sep 08 2015
Sum_{n>=1} 1/a(n) = 4*log(2) - Pi^2/6. - Vaclav Kotesovec, Oct 04 2016
a(n) = Sum_{i=n^2-n+1..n^2+n-1} i. - Wesley Ivan Hurt, Dec 27 2016
From Peter Bala, Jan 30 2019: (Start)
Let a(n,x) = Product_{k = 0..n} (x - k)/(x + k). Then for positive integer x we have (2*x - 1)*x^2 = Sum_{n >= 0} ((n+1)^5 + n^5)*a(n,x) and (2*x - 1)*x = Sum_{n >= 0} ((n+1)^4 - n^4)*a(n,x). Both identities are also valid for complex x in the half-plane Re(x) > 2. See the Bala link in A036970. Cf. A272378. (End)
Sum_{n>=1} (-1)^(n+1)/a(n) = Pi - Pi^2/12 - 2*log(2). - Amiram Eldar, Jul 12 2020

A048395 Sum of consecutive nonsquares.

Original entry on oeis.org

0, 5, 26, 75, 164, 305, 510, 791, 1160, 1629, 2210, 2915, 3756, 4745, 5894, 7215, 8720, 10421, 12330, 14459, 16820, 19425, 22286, 25415, 28824, 32525, 36530, 40851, 45500, 50489, 55830, 61535, 67616, 74085, 80954, 88235, 95940, 104081
Offset: 0

Views

Author

Patrick De Geest, Mar 15 1999

Keywords

Comments

Relationship with natural numbers: a(4) = (first term + last term)*n = (10+15)*3 = (25)*3 = 75; a(5) = (17+24)*4 = (41)*4 = 164; ...
Also (X*Y*Z)/(X+Y+Z) of primitive Pythagorean triples (X,Y,Z=Y+1) as described in A046092 and A001844. - Lambert Herrgesell (zero815(AT)googlemail.com), Dec 13 2005
First differences are in A201279. - J. M. Bergot, Jun 22 2013 [Corrected by Omar E. Pol, Dec 26 2021]

Examples

			Between 3^2 and 4^2 we have 10+11+12+13+14+15 which is 75 or a(4).
		

Crossrefs

Programs

  • Haskell
    a048395 0 = 0
    a048395 n = a199771 (2 * n)  -- Reinhard Zumkeller, Oct 26 2015
  • Mathematica
    Table[n(1+2*n(1+n)),{n,0,40}] (* or *) LinearRecurrence[{4,-6,4,-1},{0,5,26,75},40] (* Harvey P. Dale, Nov 01 2013 *)
  • PARI
    v0=[1,0,1]; M=[1, 2, 2; -2, -1, -2; 2, 2, 3];
    g(v)=v[1]*v[2]*v[3]/(v[1]+v[2]+v[3]);
    a(n)=g(v0*M^n);
    for(i=0,50,print1(a(i),", ")) \\ Lambert Herrgesell (zero815(AT)googlemail.com), Dec 13 2005
    

Formula

a(n) = 2*n^3 + 2*n^2 + n.
a(n) = Sum_{j=0..n} ((n+j+2)^2 - j^2 + 1). - Zerinvary Lajos, Sep 13 2006
O.g.f.: x(x+5)(1+x)/(1-x)^4. - R. J. Mathar, Jun 12 2008
a(n) = A199771(2*n) for n > 0. - Reinhard Zumkeller, Nov 23 2011
a(n) = 4*a(n-1) - 6*a(n-2) + 4*a(n-3) - a(n-4); a(0)=0, a(1)=5, a(2)=26, a(3)=75. - Harvey P. Dale, Nov 01 2013
E.g.f.: exp(x)*x*(5 + 8*x + 2*x^2). - Stefano Spezia, Jun 25 2022

A207100 T(n,k)=Number of 0..k arrays x(0..n-1) of n elements with each no smaller than the sum of its two previous neighbors modulo (k+1).

Original entry on oeis.org

2, 3, 3, 4, 6, 5, 5, 10, 12, 8, 6, 15, 26, 26, 12, 7, 21, 45, 68, 55, 18, 8, 28, 75, 140, 176, 115, 27, 9, 36, 112, 274, 441, 458, 239, 40, 10, 45, 164, 462, 989, 1382, 1193, 498, 59, 11, 55, 225, 760, 1904, 3579, 4322, 3103, 1038, 87, 12, 66, 305, 1158, 3504, 7868
Offset: 1

Views

Author

R. H. Hardin Feb 15 2012

Keywords

Comments

Table starts
..2....3.....4......5......6.......7.......8........9.......10........11
..3....6....10.....15.....21......28......36.......45.......55........66
..5...12....26.....45.....75.....112.....164......225......305.......396
..8...26....68....140....274.....462.....760.....1158.....1720......2431
.12...55...176....441....989....1904....3504.....5925.....9652.....14850
.18..115...458...1382...3579....7868...16224....30390....54294.....90959
.27..239..1193...4322..12964...32531...75114...155922...305362....557095
.40..498..3103..13511..46952..134517..347794...800088..1717686...3412442
.59.1038..8069..42238.170076..556259.1610482..4105829..9663330..20904257
.87.2162.20982.132051.616065.2300219.7457403.21069969.54364034.128056753

Examples

			Some solutions for n=5 k=3
..2....2....0....0....0....1....0....3....2....2....3....1....0....0....2....0
..2....2....1....0....0....1....3....3....3....2....3....3....0....3....3....1
..1....2....3....0....3....3....3....3....1....2....2....1....2....3....2....3
..3....3....3....2....3....2....2....2....3....0....3....3....3....2....3....0
..1....1....3....2....3....1....3....3....2....3....3....3....3....2....2....3
		

Crossrefs

Column 1 is A020745(n-2)
Row 2 is A000217(n+1)
Row 3 is A199771(n+1)

A199332 Triangle read by rows, where even numbered rows contain the nonsquares (cf. A000037) and odd rows contain replicated squares.

Original entry on oeis.org

1, 2, 3, 4, 4, 4, 5, 6, 7, 8, 9, 9, 9, 9, 9, 10, 11, 12, 13, 14, 15, 16, 16, 16, 16, 16, 16, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 25, 25, 25, 25, 25, 25, 25, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 37, 38
Offset: 1

Views

Author

Reinhard Zumkeller, Nov 23 2011

Keywords

Comments

An approximation of the Euler-Mascheroni constant by rational numbers: the sum ((-1)^(n+1) * Sum_{k=1..n} (1/T(n,k))) converges to gamma, cf. Pólya-Szegő reference.

Examples

			1:                    1                           1
2:                  2   3                      2 .. 3
3:                4   4   4                       4
4:              5   6   7   8                  5 .. 8
5:            9   9   9   9   9                   9
6:         10  11  12  13  14  15             10 .. 15
7:       16  16  16  16  16  16  16              16
8:     17  18  19  20  21  22  23  24         17 .. 24
9:   25  25  25  25  25  25  25  25  25          25 .
		

References

  • G. Pólya and G. Szegő, Problems and Theorems in Analysis I (Springer 1924, reprinted 1972), Part Two, Chap. 1, sec. 2, Problem 19.2., page 51.

Crossrefs

Cf. A000037, A000290 & A002620 (central terms), A199771 (row sums).

Programs

  • Haskell
    a199332 n k = a199332_tabl !! (n-1) !! (k-1)
    a199332_row n = a199332_tabl !! (n-1)
    a199332_list = concat a199332_tabl
    a199332_tabl = f [1..] [1..] where
       f (x:xs) ys'@(y:ys) | odd x  = (replicate x y) : f xs ys
                           | even x = us : f xs vs
                           where (us,vs) = splitAt x ys'
  • Mathematica
    t[n_, k_] := If[OddQ[n], (n+1)^2/4, n^2/4 + k]; Flatten[ Table[ t[n, k], {n, 1, 12}, {k, 1, n}]](* Jean-François Alcover, Dec 05 2011 *)
    Flatten[Table[If[IntegerQ[Sqrt[n]],Table[n,{2*Sqrt[n]-1}],n],{n,40}]] (* Harvey P. Dale, Nov 11 2013 *)

A248011 Table T(n,k), n>=1, k>=1, read by antidiagonals: T(n,k) = number of equivalence classes of ways of placing three 1 X 1 tiles in an n X k rectangle under all symmetry operations of the rectangle.

Original entry on oeis.org

0, 0, 0, 1, 1, 1, 2, 6, 6, 2, 6, 14, 27, 14, 6, 10, 32, 60, 60, 32, 10, 19, 55, 129, 140, 129, 55, 19, 28, 94, 218, 294, 294, 218, 94, 28, 44, 140, 363, 506, 608, 506, 363, 140, 44, 60, 208, 536, 832, 1038, 1038, 832, 536, 208, 60, 85, 285, 785, 1240, 1695
Offset: 1

Views

Author

Keywords

Examples

			T(n,k) for 1<=n<=9 and 1<=k<=9 is:
   k    1     2     3     4     5     6     7     8     9 ...
n
1       0     0     1     2     6    10    19    28    44
2       0     1     6    14    32    55    94   140   208
3       1     6    27    60   129   218   363   536   785
4       2    14    60   140   294   506   832  1240  1802
5       6    32   129   294   608  1038  1695  2516  3642
6      10    55   218   506  1038  1785  2902  4324  6242
7      19    94   363   832  1695  2902  4703  6992 10075
8      28   140   536  1240  2516  4324  6992 10416 14988
9      44   208   785  1802  3642  6242 10075 14988 21544
		

Crossrefs

Programs

  • Maple
    b := proc (n::integer, k::integer)::integer;
    (4*k^3*n^3 - 12*k^2*n^2 + 2*k^3 + 6*k^2*n + 6*k*n^2 + 2*n^3 - 12*k^2 + 11*k*n - 12*n^2 + 4*k + 4*n - 3 - (2*k^3 + 6*k^2*n - 12*k^2 + 3*k*n + 4*k - 3)*(-1)^n - (6*k*n^2 + 2*n^3 + 3*k*n - 12*n^2 + 4*n - 3)*(-1)^k + (3*k*n - 3)*(-1)^k*(-1)^n)*(1/96);
    end proc;
    f := seq(seq(b(n, k - n + 1), n = 1 .. k), k = 1 .. 140);

Formula

Empirically,
T(n,k) = (4*k^3*n^3 - 12*k^2*n^2 + 2*k^3 + 6*k^2*n + 6*k*n^2 + 2*n^3 - 12*k^2 + 11*k*n - 12*n^2 + 4*k + 4*n - 3 - (2*k^3 + 6*k^2*n - 12*k^2 + 3*k*n + 4*k - 3)*(-1)^n - (6*k*n^2 + 2*n^3 + 3*k*n - 12*n^2 + 4*n - 3)*(-1)^k + (3*k*n - 3)*(-1)^k*(-1)^n)/96;
T(1,k) = A005993(k-3) = (k-1)*(2*(k-2)*k + 3*(1-(-1)^k))/24;
T(2,k) = A225972(k) = (k-1)*(2*k*(2*k-1) + 3*(1-(-1)^k))/12;
T(2,k) - T(1,k) = A199771(k-1) and A212561(k) = (k-1)*(6*k^2 + 3*(1-(-1)^k))/24.

Extensions

Terms corrected and extended by Christopher Hunt Gribble, Apr 01 2015

A200252 Number of 0..n arrays x(0..2) of 3 elements with each no smaller than the sum of its previous elements modulo (n+1).

Original entry on oeis.org

5, 12, 26, 45, 75, 112, 164, 225, 305, 396, 510, 637, 791, 960, 1160, 1377, 1629, 1900, 2210, 2541, 2915, 3312, 3756, 4225, 4745, 5292, 5894, 6525, 7215, 7936, 8720, 9537, 10421, 11340, 12330, 13357, 14459, 15600, 16820, 18081, 19425, 20812, 22286, 23805
Offset: 1

Views

Author

R. H. Hardin, Nov 15 2011

Keywords

Comments

Row 3 of A200251.
a(n) = A199771(n+1). - Reinhard Zumkeller, Nov 23 2011

Examples

			Some solutions for n=6:
  2  0  0  3  3  1  4  0  1  3  0  3  0  2  1  3
  6  5  3  6  3  1  5  2  4  6  6  5  0  5  2  4
  2  6  6  2  6  4  4  2  6  5  6  5  6  5  4  0
		

Formula

a(n) = 2*a(n-1) + a(n-2) - 4*a(n-3) + a(n-4) + 2*a(n-5) - a(n-6).
From Colin Barker, Feb 19 2018: (Start)
G.f.: x*(5 + 2*x - 3*x^2 + x^3 + 2*x^4 - x^5) / ((1 - x)^4*(1 + x)^2).
a(n) = (n^3 + 5*n^2 + 8*n + 4) / 4 for n even.
a(n) = (n^3 + 5*n^2 + 9*n + 5) / 4 for n odd.
(End)

A225972 The number of binary pattern classes in the (2,n)-rectangular grid with 3 '1's and (2n-3) '0's: two patterns are in same class if one of them can be obtained by a reflection or 180-degree rotation of the other.

Original entry on oeis.org

0, 0, 1, 6, 14, 32, 55, 94, 140, 208, 285, 390, 506, 656, 819, 1022, 1240, 1504, 1785, 2118, 2470, 2880, 3311, 3806, 4324, 4912, 5525, 6214, 6930, 7728, 8555, 9470, 10416, 11456, 12529, 13702, 14910, 16224, 17575, 19038, 20540, 22160, 23821, 25606, 27434, 29392
Offset: 0

Views

Author

Yosu Yurramendi, May 26 2013

Keywords

Comments

Also the edge count of the n X n black bishop graph. - Eric W. Weisstein, Jun 26 2017

Crossrefs

Cf. A289179 (edge count of white bishop graph).

Programs

  • Magma
    [(1/4)*(Binomial(2*(n-1),3)+2*Binomial(n-2,1)*(1/2)*(1+(-1)^n)): n in [1..50]]; // Vincenzo Librandi, Sep 04 2013
  • Maple
    A225972:=n->(n-1)*(4*n^2-2*n-3*(-1)^n+3)/12; seq(A225972(n), n=0..40); # Wesley Ivan Hurt, Mar 02 2014
  • Mathematica
    Table[(n - 1)*(4*n^2 - 2*n - 3*(-1)^n + 3)/12, {n, 0, 40}] (* Bruno Berselli, May 29 2013 *)
    CoefficientList[Series[x^2 (1 + 4 x + x^2 + 2 x^3) / ((1 + x)^2 (1 - x)^4), {x, 0, 50}], x] (* Vincenzo Librandi, Sep 04 2013 *)
    LinearRecurrence[{2, 1, -4, 1, 2, -1}, {0, 1, 6, 14, 32, 55}, 20] (* Eric W. Weisstein, Jun 27 2017 *)
  • R
    a <- vector()
        for(n in 0:40) a[n] <- (1/4)*(choose(2*(n-1),3) + 2*choose(n-2,1)*(1/2)*(1+(-1)^n))
        a  # Yosu Yurramendi and María Merino, Aug 21 2013
    

Formula

a(n) = A000330(n) + A142150(n) = (n-1)*(4*n^2 - 2*n - 3*(-1)^n + 3)/12.
a(n) = 2*a(n-1) + a(n-2) - 4*a(n-3) + a(n-4) + 2*a(n-5) - a(n-6) with n > 5, a(0)=0, a(1)=0, a(2)=1, a(3)=6, a(4)=14, a(5)=32.
a(n) = 4*a(n-1) - 6*a(n-2) + 4*a(n-3) - a(n-4) + 4*(n-4)*(-1)^n with n > 3, a(0)=0, a(1)=0, a(2)=1, a(3)=6.
G.f.: x^2*(1 + 4*x + x^2 + 2*x^3)/((1+x)^2*(1-x)^4). - Bruno Berselli, May 29 2013
a(n) = (1/4)*(binomial(2*(n-1),3) + 2*binomial(n-2,1)*(1/2)*(1+(-1)^n)). - Yosu Yurramendi and María Merino, Aug 21 2013
a(n) = A005993(n-2) + A199771(n-1), n >= 2. - Christopher Hunt Gribble, Mar 02 2014

Extensions

More terms from Vincenzo Librandi, Sep 04 2013

A212561 Number of (w,x,y,z) with all terms in {1,...,n} and w + x = 2y + 2z.

Original entry on oeis.org

0, 0, 1, 5, 12, 26, 45, 75, 112, 164, 225, 305, 396, 510, 637, 791, 960, 1160, 1377, 1629, 1900, 2210, 2541, 2915, 3312, 3756, 4225, 4745, 5292, 5894, 6525, 7215, 7936, 8720, 9537, 10421, 11340, 12330, 13357, 14459, 15600, 16820, 18081, 19425
Offset: 0

Views

Author

Clark Kimberling, May 21 2012

Keywords

Comments

Probably related to A199771 and A200252.
For a guide to related sequences, see A211795.
Except for the first term, a(n) is the number of undirected rook moves on an n X n chessboard, considered up to rotations but not reflections. - Hilko Koning, Aug 10 2025

Crossrefs

Cf. A211795.

Programs

  • Mathematica
    t = Compile[{{n, _Integer}}, Module[{s = 0},
    (Do[If[w + x == 2 y + 2 z, s = s + 1],
    {w, 1, #}, {x, 1, #}, {y, 1, #}, {z, 1, #}] &[n]; s)]];
    Map[t[#] &, Range[0, 40]]   (* A212561 *)
    LinearRecurrence[{2,1,-4,1,2,-1},{0,0,1,5,12,26},50] (* Harvey P. Dale, Dec 04 2016 *)
    a[n_Integer?NonNegative] := ((n - 1) (2 n^2 + 1 - (-1)^n))/8
    Table[a[n], {n, 0, 100}] (* Hilko Koning, Aug 10 2025 *)
  • PARI
    concat([0,0], Vec(x^2*(x^3+x^2+3*x+1)/((x-1)^4*(x+1)^2) + O(x^100))) \\ Colin Barker, Feb 17 2015

Formula

a(n) = 2*a(n-1)+a(n-2)-4*a(n-3)+a(n-4)+2*a(n-5)-a(n-6).
a(n) = (2*n^3-2*n^2+n-1-(n-1)*(-1)^n)/8 = (n-1)*(2*n^2+1-(-1)^n)/8. - Luce ETIENNE, Jul 26 2014
G.f.: x^2*(x^3+x^2+3*x+1) / ((x-1)^4*(x+1)^2). - Colin Barker, Feb 17 2015
Showing 1-8 of 8 results.