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 21 results. Next

A008732 Molien series for 3-dimensional group [2,n] = *22n.

Original entry on oeis.org

1, 2, 3, 4, 5, 7, 9, 11, 13, 15, 18, 21, 24, 27, 30, 34, 38, 42, 46, 50, 55, 60, 65, 70, 75, 81, 87, 93, 99, 105, 112, 119, 126, 133, 140, 148, 156, 164, 172, 180, 189, 198, 207, 216, 225, 235, 245, 255, 265
Offset: 0

Views

Author

Keywords

Examples

			From _Philippe Deléham_, Apr 05 2013: (Start)
Stored in five columns:
    1   2   3   4   5
    7   9  11  13  15
   18  21  24  27  30
   34  38  42  46  50
   55  60  65  70  75
   81  87  93  99 105
  112 119 126 133 140
(End)
		

Crossrefs

Cf. A130520.

Programs

  • GAP
    List([0..50], n-> Int((n+3)*(n+4)/10)); # G. C. Greubel, Jul 30 2019
  • Magma
    [Floor((n+3)*(n+4)/10): n in [0..50] ]; // Vincenzo Librandi, Aug 21 2011
    
  • Maple
    A092202 := proc(n) op(1+(n mod 5),[0,1,0,-1,0]) ; end proc:
    A010891 := proc(n) op(1+(n mod 5),[1,-1,0,0,0]) ; end proc:
    A008732 := proc(n) (n+2)*(n+5)/10+(A010891(n-1)+2*A092202(n-1))/5 ; end proc:
  • Mathematica
    LinearRecurrence[{2, -1, 0, 0, 1, -2, 1}, {1, 2, 3, 4, 5, 7, 9}, 50] (* Jean-François Alcover, Jan 18 2018 *)
  • PARI
    a(n)=(n+3)*(n+4)\10 \\ Charles R Greathouse IV, Oct 07 2015
    
  • Sage
    [floor((n+3)*(n+4)/10) for n in (0..50)] # G. C. Greubel, Jul 30 2019
    

Formula

a(n) = floor( (n+3)*(n+4)/10 ) = (n+2)*(n+5)/10 + b(n)/5 where b(n) = A010891(n-2) + 2*A092202(n-1) = 0, 1, 1, 0, -2, ... with period length 5.
G.f.: 1/((1-x)^2*(1-x^5)).
a(n) = a(n-5) + n + 1. - Paul Barry, Jul 14 2004
From Mitch Harris, Sep 08 2008: (Start)
a(n) = Sum_{j=0..n+5} floor(j/5).
a(n-5) = (1/2)floor(n/5)*(2*n - 3 - 5*floor(n/5)). (End)
a(n) = A130520(n+5). - Philippe Deléham, Apr 05 2013
a(5n) = A000566(n+1), a(5n+1) = A005476(n+1), a(5n+2) = A005475(n+1), a(5n+3) = A147875(n+2), a(5n+4) = A028895(n+1); these formulas correspond to the 5 columns of the array shown in example. - Philippe Deléham, Apr 05 2013

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

A241016 Triangle read by rows: T(n, k) = sum of k-th row of n X n square filled with the numbers 1 through n^2 reading across rows left-to-right.

Original entry on oeis.org

1, 3, 7, 6, 15, 24, 10, 26, 42, 58, 15, 40, 65, 90, 115, 21, 57, 93, 129, 165, 201, 28, 77, 126, 175, 224, 273, 322, 36, 100, 164, 228, 292, 356, 420, 484, 45, 126, 207, 288, 369, 450, 531, 612, 693, 55, 155, 255, 355, 455, 555, 655, 755, 855, 955, 66, 187, 308, 429, 550
Offset: 1

Views

Author

Kival Ngaokrajang, Aug 08 2014

Keywords

Comments

See illustration in links.
The corresponding triangle with column sums is found in A251630. - Wolfdieter Lang, Dec 09 2014

Examples

			The triangle T(n, k) begins:
n\k  1   2   3   4   5   6   7   8   9  10 ...
1:   1
2:   3   7
3:   6  15  24
4:  10  26  42  58
5:  15  40  65  90 115
6:  21  57  93 129 165 201
7:  28  77 126 175 224 273 322
8:  36 100 164 228 292 356 420 484
9:  45 126 207 288 369 450 531 612 693
10: 55 155 255 355 455 555 655 755 855 955
... reformatted - _Wolfdieter Lang_, Dec 08 2014
		

Crossrefs

Diagonals: A081436, A059270, ...
Row sums: A037270.

Programs

  • Mathematica
    Table[Sum[n*(k - 1) + j, {j,1,n}], {n,1,10}, {k,1,n}] // Flatten (* G. C. Greubel, Aug 23 2017 *)
  • PARI
    trg(nn) = {for (n=1, nn, mm = matrix(n, n, i, j, j + n*(i-1)); for (i=1, n, print1(sum(j=1, n, mm[i, j]), ", ");); print(););} \\ Michel Marcus, Sep 15 2014

Formula

T(n, k) = Sum_{j=1..n} (n*(k-1)+ j), for n >= k >= 1. See the Michel Marcus program. - Wolfdieter Lang, Dec 08 2014
T(n, k) = binomial(n+1, 2) + n^2*(k-1). - Wolfdieter Lang, Dec 09 2014

Extensions

Edited. - Wolfdieter Lang, Dec 08 2014

A195015 Main axis of the square spiral whose edges have length A195013 and whose vertices are the numbers A195014.

Original entry on oeis.org

0, 2, 12, 24, 44, 66, 96, 128, 168, 210, 260, 312, 372, 434, 504, 576, 656, 738, 828, 920, 1020, 1122, 1232, 1344, 1464, 1586, 1716, 1848, 1988, 2130, 2280, 2432, 2592, 2754, 2924, 3096, 3276, 3458, 3648, 3840, 4040, 4242, 4452, 4664, 4884
Offset: 0

Views

Author

Omar E. Pol, Sep 26 2011

Keywords

Comments

Sequence found by reading the line from 0, in the direction 0, 2, ..., and the same line from 0, in the direction 0, 12, ..., in the square spiral mentioned above. Axis perpendicular to A195016 in the same spiral.
Also four times A005475 and positives A152965 interleaved.

Crossrefs

Programs

  • Magma
    [(2*n*(5*n+2)+3*(-1)^n-3)/4: n in [0..50]]; // Vincenzo Librandi, Oct 28 2011
  • Mathematica
    LinearRecurrence[{2, 0, -2, 1}, {0, 2, 12, 24}, 50] (* Paolo Xausa, Feb 09 2024 *)

Formula

From Bruno Berselli, Oct 14 2011: (Start)
G.f.: 2*x*(1+4*x)/((1+x)*(1-x)^3).
a(n) = (2*n*(5*n+2) + 3*(-1)^n-3)/4.
a(n) = 2*a(n-1) - 2*a(n-3) + a(n-4).
a(n) + a(n-1) = A135706(n). (End)

A202803 a(n) = n*(5*n+1).

Original entry on oeis.org

0, 6, 22, 48, 84, 130, 186, 252, 328, 414, 510, 616, 732, 858, 994, 1140, 1296, 1462, 1638, 1824, 2020, 2226, 2442, 2668, 2904, 3150, 3406, 3672, 3948, 4234, 4530, 4836, 5152, 5478, 5814, 6160, 6516, 6882, 7258, 7644, 8040, 8446, 8862, 9288, 9724, 10170
Offset: 0

Views

Author

Jeremy Gardiner, Dec 24 2011

Keywords

Comments

First bisection of A219190. - Bruno Berselli, Nov 15 2012
a(n)*Pi is the total length of 5 points circle center spiral after n rotations. The spiral length at each rotation (L(n)) is A017341. The spiral length ratio rounded down [floor(L(n)/L(1))] is A032793. See illustration in links. - Kival Ngaokrajang, Dec 27 2013

Examples

			G.f. = 6*x + 22*x^2 + 48*x^3 + 84*x^4 + 130*x^5 +186*x^6 + 252*x^7 + 328*x^8 + ...
		

Crossrefs

Cf. sequences listed in A254963.

Programs

Formula

a(n) = 5*n^2 + n.
a(n) = A033429(n) + n. - Omar E. Pol, Dec 24 2011
G.f.: 2*x*(3+2*x)/(1-x)^3. - Philippe Deléham, Mar 27 2013
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3) with a(0) = 0, a(1) = 6, a(2) = 22. - Philippe Deléham, Mar 27 2013
a(n) = A131242(10n+5). - Philippe Deléham, Mar 27 2013
a(n) = 2*A005475(n). - Philippe Deléham, Mar 27 2013
a(n) = A168668(n) - n. - Philippe Deléham, Mar 27 2013
a(n) = (n+1)^3 - (1 + n + n*(n-1) + n*(n-1)*(n-2)). - Michael Somos, Aug 10 2014
E.g.f.: x*(6+5*x)*exp(x). - G. C. Greubel, Aug 22 2017
Sum_{n>=1} 1/a(n) = 5*(1-log(5)/4) - sqrt(1+2/sqrt(5))*Pi/2 -sqrt(5)*log(phi)/2, where phi is the golden ratio (A001622). - Amiram Eldar, Jul 19 2022

A306383 Number of ways to write n as x*(2x+1) + y*(2y+1) + z*(2z+1), where x,y,z are nonnegative integers with x <= y <= z.

Original entry on oeis.org

1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 2, 0, 0, 1, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 1, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 1, 0, 0, 0, 1, 0, 0, 2, 1, 0, 2, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 0, 2, 0, 1, 1, 0, 0, 1, 1, 1, 0
Offset: 0

Views

Author

Zhi-Wei Sun, Feb 11 2019

Keywords

Comments

Conjecture 1: a(n) > 0 for any integer n > 138158.
We have verified this for n up to 2*10^6. Note that n*(2n+1) (n = 0,1,...) are the second hexagonal numbers (A014105).
Conjecture 2: Any integer n > 146858 can be written as the sum of three hexagonal numbers (A000384).
Conjecture 3: Any integer n > 33066 can be written as the sum of three pentagonal numbers (A000326).
Conjecture 4: Any integer n > 24036 can be written as the sum of three second pentagonal numbers (A005449).
Conjecture 5: Let N(1) = 114862, N(-1) = 166897, N(3) = 196987 and N(-3) = 273118. Then, for any r among 1, -1, 3 and -3, each integer n > N(r) can be written as x*(5x+r)/2 + y*(5y+r)/2 + z*(5z+r)/2 with x,y,z nonnegative integers.
We have verified Conjectures 2-5 for n up to 10^6.

Examples

			a(223595) = 1 with 223595 = 95*(2*95+1) + 200*(2*200+1) + 250*(2*250+1).
a(290660) = 1 with 290660 = 136*(2*136+1) + 149*(2*149+1) + 323*(2*323+1).
		

Crossrefs

Programs

  • Mathematica
    QQ[n_]:=QQ[n]=IntegerQ[Sqrt[8n+1]]&&Mod[Sqrt[8n+1],4]==1;
    tab={};Do[r=0;Do[If[QQ[n-x(2x+1)-y(2y+1)],r=r+1],{x,0,(Sqrt[8n/3+1]-1)/4},{y,x,(Sqrt[4(n-x(2x+1))+1]-1)/4}];tab=Append[tab,r],{n,0,100}];Print[tab]

A144945 Number of ways to place 2 queens on an n X n chessboard so that they attack each other.

Original entry on oeis.org

0, 6, 28, 76, 160, 290, 476, 728, 1056, 1470, 1980, 2596, 3328, 4186, 5180, 6320, 7616, 9078, 10716, 12540, 14560, 16786, 19228, 21896, 24800, 27950, 31356, 35028, 38976, 43210, 47740, 52576, 57728, 63206, 69020, 75180, 81696, 88578, 95836, 103480, 111520
Offset: 1

Views

Author

Paolo Bonzini, Sep 26 2008

Keywords

Comments

a(n) gives the number of edges on a graph with n X n nodes where each node corresponds to a square on an n X n chessboard and there is an edge between two nodes if two queens placed on the corresponding squares attack each other.
In other words, number of edges in the n X n queen graph. - Eric W. Weisstein, Jun 19 2017
Number of ways to place two queens on the same row or column = A006002: b(n) = n*C(n,2) = n^2*(n-1)/2; number of ways to place two queens on the same diagonal (either SW-NE or NE-SW) = A000330 shifted by one: c(n) = n(n-1)*(2*n-1)/6; total: a(n) = 2*b(n)+2*c(n) = n*(5*n-1)*(n-1)/3.
Starting with "6" = binomial transform of [6, 22, 26, 10, 0, 0, 0, ...]. - Gary W. Adamson, Aug 12 2009
Also the Harary index of the n X n king graph. - Eric W. Weisstein, Jun 20 2017

Examples

			Example: For n=2 there are two rows, two columns and two diagonals. Each of these can be filled with two queens, giving a(2)=6.
For n=3 there are C(3,2) = 3 ways to place two queens on the same rows or column, giving C(3,2)*3 = 9 ways to place two queens on the same rows and 9 ways to place two queens on the same column. There are three nontrivial SW-NE diagonals, two of length two (each giving 1 way to place two attacking queens) and one of length three (giving 3 ways to place two attacking queens): total 3+1+1=5. There are also 5 ways to place two queens on the same NW-SE diagonal, giving a total of 9+9+5+5 = 28.
		

Crossrefs

Programs

Formula

a(n) = (n-1)*n*(5*n-1)/3.
From Bruno Berselli, Sep 27 2011: (Start)
G.f.: 2*x^2*(3+2*x)/(1-x)^4.
a(-n) = -A174814(n).
a(n) = a(n-1) + 2*A005475(n-1).
Sum_{i=1..n} a(i) = (n-1)*n*(n+1)*(5*n+2)/12. (End)
a(n) = 4*a(n-1) - 6*a(n-2) + 4*a(n-3) - a(n-4) for n>4; a(1)=0, a(2)=6, a(3)=28, a(4)=76. - Harvey P. Dale, Oct 15 2011
a(n) = Sum_{i=1..n-1} i*(5*i+1), with a(0)=0, a(1)=6. - Bruno Berselli, Feb 10 2014
E.g.f.: x^2*(9+5*x)*exp(x)/3. - Robert Israel, Nov 02 2014

Extensions

More terms from Harvey P. Dale, Oct 15 2011

A238738 Expansion of (1 + 2*x + 2*x^2)/(1 - x - 2*x^3 + 2*x^4 + x^6 - x^7).

Original entry on oeis.org

1, 3, 5, 7, 11, 15, 18, 24, 30, 34, 42, 50, 55, 65, 75, 81, 93, 105, 112, 126, 140, 148, 164, 180, 189, 207, 225, 235, 255, 275, 286, 308, 330, 342, 366, 390, 403, 429, 455, 469, 497, 525, 540, 570, 600, 616, 648, 680, 697, 731, 765, 783, 819, 855, 874
Offset: 0

Views

Author

Bruno Berselli, Mar 04 2014

Keywords

Comments

Subsequence of A008732: a(n) = A008732(A047212(n+1)).
See also Deléham's example in A008732: these numbers are in the first (A000566), third (A005475) and fifth (A028895) column.

Examples

			G.f.: 1 + 3*x + 5*x^2 + 7*x^3 + 11*x^4 + 15*x^5 + 18*x^6 + 24*x^7 + ...
		

Crossrefs

Cf. A000212 (see illustration above), A000217, A008732, A211538.

Programs

  • Magma
    m:=60; R:=PowerSeriesRing(Integers(), m); Coefficients(R!((1+2*x+2*x^2)/(1-x-2*x^3+2*x^4+x^6-x^7)));
    
  • Mathematica
    CoefficientList[Series[(1 + 2 x + 2 x^2)/(1 - x - 2 x^3 + 2 x^4 + x^6 - x^7), {x, 0, 60}], x]
  • Maxima
    makelist(coeff(taylor((1+2*x+2*x^2)/(1-x-2*x^3+2*x^4+x^6-x^7), x, 0, n), x, n), n, 0, 60);
    
  • PARI
    Vec((1+2*x+2*x^2)/(1-x-2*x^3+2*x^4+x^6-x^7)+O(x^60))
    
  • Sage
    m = 60; L. = PowerSeriesRing(ZZ, m); f = (1+2*x+2*x^2)/(1-x-2*x^3+2*x^4+x^6-x^7); print(f.coefficients())

Formula

G.f.: (1 + 2*x + 2*x^2) / ((1 - x)^3*(1 + x + x^2)^2).
a(n) = a(n-1) + 2*a(n-3) - 2*a(n-4) - a(n-6) + a(n-7), with n>6.
a(3k) = k*(5*k + 7)/2 + 1 (A000566);
a(3k+1) = k*(5*k + 11)/2 + 3 (A005475);
a(3k+2) = k*(5*k + 15)/2 + 5 (A028895).
a(n) = (floor(n/3)+1)*(4*n-7*floor(n/3)+2)/2. [Luce ETIENNE, Jun 14 2014]

A343053 Table read by ascending antidiagonals: T(k, n) is the maximum vertex sum in a perimeter-magic k-gon of order n.

Original entry on oeis.org

15, 24, 24, 40, 42, 33, 54, 65, 56, 42, 77, 93, 90, 74, 51, 96, 126, 126, 115, 88, 60, 126, 164, 175, 165, 140, 106, 69, 150, 207, 224, 224, 198, 165, 120, 78, 187, 255, 288, 292, 273, 237, 190, 138, 87, 216, 308, 350, 369, 352, 322, 270, 215, 152, 96, 260, 366, 429, 455, 450, 420, 371, 309, 240, 170, 105
Offset: 3

Views

Author

Stefano Spezia, Apr 03 2021

Keywords

Examples

			The table begins:
k\n|   3    4    5    6    7 ...
---+------------------------
3  |  15   24   33   42   51 ...
4  |  24   42   56   74   88 ...
5  |  40   65   90  115  140 ...
6  |  54   93  126  165  198 ...
7  |  77  126  175  224  273 ...
...
		

Crossrefs

Cf. A005475 (n = 4), A022267 (n = 6), A059270, A179805 (k = 3), A343052 (minimum).

Programs

  • Mathematica
    T[k_,n_]:=k(1+k(2n-3)-Mod[n,2](1-Mod[k,2]))/2; Table[T[k+3-n,n],{k,3,14},{n,3,k}]//Flatten

Formula

T(k, n) = k*(1 + k*(2n - 3) - (n mod 2)*(1 - (k mod 2)))/2.
T(n, n) = A059270(n-1).

A382818 Square array A(n,k), n > 0, k > 0, read by downward antidiagonals: A(n,k) is the number of columns in all k-compositions of n.

Original entry on oeis.org

1, 2, 3, 3, 11, 8, 4, 24, 52, 20, 5, 42, 163, 227, 48, 6, 65, 372, 1017, 944, 112, 7, 93, 710, 3019, 6030, 3800, 256, 8, 126, 1208, 7095, 23256, 34563, 14944, 576, 9, 164, 1897, 14340, 67251, 173076, 193392, 57748, 1280, 10, 207, 2808, 26082, 161394, 615630, 1256936, 1062756, 220128, 2816
Offset: 1

Views

Author

John Tyler Rascoe, Apr 05 2025

Keywords

Comments

A k-composition of n is a rectangular array of nonnegative integers with k rows, at least one nonzero entry in each column, and having the sum of all entries equal to n.

Examples

			Square array begins:
   1,   2,    3,     4,     5,      6, ...
   3,  11,   24,    42,    65,     93, ...
   8,  52,  163,   372,   710,   1208, ...
  20, 227, 1017,  3019,  7095,  14340, ...
  48, 944, 6030, 23256, 67251, 161394, ...
  ...
A(2,2) = 11 counts the columns in the 2-compositions of 2:
 [2]   [0]   [1]   [1,0]   [0,1]   [0,0]   [1,1]
 [0],  [2],  [1],  [0,1],  [1,0],  [1,1],  [0,0].
		

Crossrefs

C.f. A001792 (column k=1), A005475 (row n=2), A145839, A181289, A181290 (column k=2), A382820 (main diagonal).

Programs

  • PARI
    A382818_Column(k,N) = {my(x='x+O('x^N)); Vec(-(((1 - x)^k - 1)*(1 - x)^k)/( ((1 - x)^k - 1) + (1 - x)^k)^2)}
    A382818_array(max_row) = {my(m=matrix(0)); for(n=1,max_row, m=matconcat([m,A382818_Column(n,max_row)~])); m}
    A382818_array(10)

Formula

Column k has g.f.: -((1 - x)^k - 1)*(1 - x)^k/(((1 - x)^k - 1) + (1 - x)^k)^2.
Previous Showing 11-20 of 21 results. Next