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

A262000 a(n) = n^2*(7*n - 5)/2.

Original entry on oeis.org

0, 1, 18, 72, 184, 375, 666, 1078, 1632, 2349, 3250, 4356, 5688, 7267, 9114, 11250, 13696, 16473, 19602, 23104, 27000, 31311, 36058, 41262, 46944, 53125, 59826, 67068, 74872, 83259, 92250, 101866, 112128, 123057, 134674, 147000, 160056, 173863, 188442, 203814, 220000
Offset: 0

Views

Author

Bruno Berselli, Sep 08 2015

Keywords

Comments

Also, structured enneagonal prism numbers.

Examples

			For n=8, a(8) = 8*(7*0+1)+8*(7*1+1)+8*(7*2+1)+8*(7*3+1)+8*(7*4+1)+8*(7*5+1)+8*(7*6+1)+8*(7*7+1) = 1632.
		

Crossrefs

Cf. similar sequences with the formula n^2*(k*n - k + 2)/2: A000290 (k=0), A002411 (k=1), A000578 (k=2), A050509 (k=3), A015237 (k=4), A006597 (k=5), A100176 (k=6), this sequence (k=7), A103532 (k=8).

Programs

  • Magma
    [n^2*(7*n-5)/2: n in [0..40]];
  • Mathematica
    Table[n^2 (7 n - 5)/2, {n, 0, 40}]
    LinearRecurrence[{4,-6,4,-1},{0,1,18,72},50] (* Harvey P. Dale, Oct 04 2016 *)
  • PARI
    vector(40, n, n--; n^2*(7*n-5)/2)
    
  • Sage
    [n^2*(7*n-5)/2 for n in (0..40)]
    

Formula

G.f.: x*(1 + 14*x + 6*x^2)/(1 - x)^4.
a(n) = Sum_{i=0..n-1} n*(7*i+1) for n>0, a(0)=0.
a(n+1) + a(-n) = A069125(n+1).
Sum_{i>0} 1/a(i) = 1.082675669875907610300284768825... = (42*(log(14) + 2*(cos(Pi/7)*log(cos(3*Pi/14)) + log(sin(Pi/7))*sin(Pi/14) - log(cos(Pi/14)) * sin(3*Pi/14))) + 21*Pi*tan(3*Pi/14))/75 - Pi^2/15. - Vaclav Kotesovec, Oct 04 2016
From Elmo R. Oliveira, Aug 06 2025: (Start)
E.g.f.: exp(x)*x*(2 + 16*x + 7*x^2)/2.
a(n) = 4*a(n-1) - 6*a(n-2) + 4*a(n-3) - a(n-4). (End)

A257238 Triangle T(n, k) = n^3 - k^3, 0 <= k < = n.

Original entry on oeis.org

0, 1, 0, 8, 7, 0, 27, 26, 19, 0, 64, 63, 56, 37, 0, 125, 124, 117, 98, 61, 0, 216, 215, 208, 189, 152, 91, 0, 343, 342, 335, 316, 279, 218, 127, 0, 512, 511, 504, 485, 448, 387, 296, 169, 0, 729, 728, 721, 702, 665, 604, 513, 386, 217, 0, 1000, 999, 992, 973, 936, 875, 784, 657, 488, 271, 0
Offset: 0

Views

Author

Wolfdieter Lang, May 12 2015

Keywords

Comments

See the comments in A025581 and A079904 on a problem by François Viète (Vieta)(1593). Regarding that problem, note the simple identity: n^3 - k^3 = (n - k)^3 + 3*n*k*(n - k), for n > = k >= 0.
Row sums give A126274(n-1) for n >= 1, and 0 for n=0.
Alternating row sums are ars(2*n) = ars(2*n-1) = (4*n-3)*n^2 = A103532(n-1), for n >= 1, and ars(0) = 0.

Examples

			The triangle T(n, k) begins:
  n\k    0   1   2   3   4   5   6   7   8   9  10
   0:    0
   1:    1   0
   2:    8   7   0
   3:   27  26  19   0
   4:   64  63  56  37   0
   5:  125 124 117  98  61   0
   6:  216 215 208 189 152  91   0
   7:  343 342 335 316 279 218 127   0
   8:  512 511 504 485 448 387 296 169   0
   9:  729 728 721 702 665 604 513 386 217   0
  10: 1000 999 992 973 936 875 784 657 488 271   0
  ...
		

Crossrefs

Programs

  • Maple
    for n from 0 to 10 do seq(n^3-k^3,k=0..n) od; # Robert Israel, May 10 2018
  • Mathematica
    Table[n^3-k^3,{n,0,10},{k,0,n}]//Flatten (* Harvey P. Dale, Jan 02 2021 *)

Formula

T(n, k) = A025581(n, k)*(A025581(n, k)^2 + 3* A079904(n, k)) (see the identity mentioned in a comment).
Columns (with one leading zero and offset 0): k=0: l^3 = A000578(l), k=1: (l+1)^3 - 1 = A068601(l+1), k=2: l*(l^2 + 6*l + 12), k=3: l*(l^2 + 9*l + 27), k=4: l*(l^2 + 12*l + 48), k=5: l*(l^2 + 15*l + 75), ...
G.f. for T(n,k): (1+4*x+4*x*y+x^2-14*x^2*y+x^2*y^2-2*x^3*y-2*x^3*y^2+7*x^4*y^2)*x/((1-x*y)^3*(1-x)^4). - Robert Israel, May 10 2018

A340242 Square array read by upward antidiagonals: T(n,k) is the number of n-ary strings of length k containing 000.

Original entry on oeis.org

1, 1, 3, 1, 5, 8, 1, 7, 21, 20, 1, 9, 40, 81, 47, 1, 11, 65, 208, 295, 107, 1, 13, 96, 425, 1021, 1037, 238, 1, 15, 133, 756, 2621, 4831, 3555, 520, 1, 17, 176, 1225, 5611, 15569, 22276, 11961, 1121, 1, 19, 225, 1856, 10627, 40091, 90085, 100768, 39667, 2391
Offset: 2

Views

Author

Robert P. P. McKone, Jan 01 2021

Keywords

Examples

			For n = 4 and k = 5, there are 40 strings: {00000, 00001, 00002, 00003, 00010, 00011, 00012, 00013, 00020, 00021, 00022, 00023, 00030, 00031, 00032, 00033, 01000, 02000, 03000, 10000, 10001, 10002, 10003, 11000, 12000, 13000, 20000, 20001, 20002, 20003, 21000, 22000, 23000, 30000, 30001, 30002, 30003, 31000, 32000, 33000}.
Square table T(n,k):
      k=3: k=4:  k=5:   k=6:    k=7:     k=8:
n=2:    1    3     8     20      47      107
n=3:    1    5    21     81     295     1037
n=4:    1    7    40    208    1021     4831
n=5:    1    9    65    425    2621    15569
n=6:    1   11    96    756    5611    40091
n=7:    1   13   133   1225   10627    88717
n=8:    1   15   176   1856   18425   175967
n=9:    1   17   225   2673   29881   321281
		

Crossrefs

Rows: A050231 (n=2), A231430 (n=3).
Columns: A000567 (k=5), A103532 (k=6).
Cf. A340156 (containing 00).
Cf. A341050.

Programs

  • Mathematica
    m[r_] := Normal[With[{p = 1/n}, SparseArray[{Band[{1, 2}] -> p, {i_, 1} /; i <= r -> 1 - p, {r + 1, r + 1} -> 1}]]];
    T[n_, k_, r_] := MatrixPower[m[r], k][[1, r + 1]]*n^k;
    Reverse[Table[T[n, k - n + 3, 3], {k, 2, 11}, {n, 2, k}], 2] // Flatten
  • PARI
    my(x2='x^2+'x+1); T(n,k) = n^k - polcoeff(lift(x2*Mod('x, 'x^3-(n-1)*x2)^k), 2); \\ Kevin Ryde, Jan 02 2021

Formula

m(3) = [1 - 1/n, 1/n, 0, 0; 1 - 1/n, 0, 1/n, 0; 1 - 1/n, 0, 0, 1/n; 0, 0, 0, 1], is the probability/transition matrix for three consecutive "0" -> "containing 000".

A341050 Cube array read by upward antidiagonals ignoring zero and empty terms: T(n, k, r) is the number of n-ary strings of length k, containing r consecutive 0's.

Original entry on oeis.org

1, 1, 1, 3, 1, 1, 3, 1, 5, 8, 1, 1, 3, 1, 5, 8, 1, 7, 21, 19, 1, 1, 3, 1, 5, 8, 1, 7, 21, 20, 1, 9, 40, 81, 43, 1, 1, 3, 1, 5, 8, 1, 7, 21, 20, 1, 9, 40, 81, 47, 1, 11, 65, 208, 295, 94, 1, 1, 3, 1, 5, 8, 1, 7, 21, 20, 1, 9, 40, 81, 48, 1, 11, 65, 208, 297, 107, 1, 13, 96, 425, 1024, 1037, 201
Offset: 2

Views

Author

Robert P. P. McKone, Feb 04 2021

Keywords

Examples

			For n = 5, k = 6 and r = 4, there are 65 strings: {000000, 000001, 000002, 000003, 000004, 000010, 000011, 000012, 000013, 000014, 000020, 000021, 000022, 000023, 000024, 000030, 000031, 000032, 000033, 000034, 000040, 000041, 000042, 000043, 000044, 010000, 020000, 030000, 040000, 100000, 100001, 100002, 100003, 100004, 110000, 120000, 130000, 140000, 200000, 200001, 200002, 200003, 200004, 210000, 220000, 230000, 240000, 300000, 300001, 300002, 300003, 300004, 310000, 320000, 330000, 340000, 400000, 400001, 400002, 400003, 400004, 410000, 420000, 430000, 440000}
The first seven slices of the tetrahedron (or pyramid) are:
-----------------Slice 1-----------------
  1
-----------------Slice 2-----------------
    1
  1  3
-----------------Slice 3-----------------
      1
    1  3
  1  5  8
-----------------Slice 4-----------------
        1
      1  3
    1  5   8
  1  7  21  19
-----------------Slice 5-----------------
          1
        1  3
      1  5   8
    1  7  21  20
  1  9  40  81  43
-----------------Slice 6-----------------
              1
           1    3
        1    5     8
      1   7    21    20
    1   9   40    81    47
  1  11  65   208   295   94
-----------------Slice 7-----------------
                 1
              1     3
           1     5     8
         1    7     21    20
      1    9    40     81      48
    1   11   65    208     297     107
  1  13   96   425    1024    1037    201
		

Crossrefs

Cf. A340156 (r=2), A340242 (r=3).
Cf. A008466 (n=2, r=2), A186244 (n=3, r=2), A050231 (n=2, r=3), A231430 (n=3, r=3).
Cf. A000567 [(k=4, r=2),(k=5, r=3),(k=6, r=4),...,(k=x, r=x-2)].
Cf. A103532 [(k=6, r=3),(k=7, r=4),(k=8, r=5),...,(k=x, r=x-3)].

Programs

  • Mathematica
    m[r_, n_] := Normal[With[{p = 1/n}, SparseArray[{Band[{1, 2}] -> p, {i_, 1} /; i <= r -> 1 - p, {r + 1, r + 1} -> 1}]]]; T[n_, k_, r_] := MatrixPower[m[r, n], k][[1, r + 1]]*n^k; DeleteCases[Transpose[PadLeft[Reverse[Table[T[n, k, r], {k, 2, 8}, {r, 2, k}, {n, 2, r}], 2]], 2 <-> 3], 0, 3] // Flatten

A268644 a(n) = 4*n^3 - 3*n^2 - 2*n - 1.

Original entry on oeis.org

-1, -2, 15, 74, 199, 414, 743, 1210, 1839, 2654, 3679, 4938, 6455, 8254, 10359, 12794, 15583, 18750, 22319, 26314, 30759, 35678, 41095, 47034, 53519, 60574, 68223, 76490, 85399, 94974, 105239, 116218, 127935, 140414, 153679, 167754, 182663, 198430, 215079, 232634, 251119
Offset: 0

Views

Author

Ilya Gutkovskiy, Feb 09 2016

Keywords

Comments

In general, the ordinary generating function for the values of cubic polynomial p*n^3 + q*n^2 + k*n + m is (m + (p + q + k - 3*m)*x + (4*p - 2*k + 3*m)*x^2 + (p - q + k - m)*x^3)/(1 - x)^4.
Primes in this sequence: 199, 743, 15583, 105239, 435359, 620999, 770239, 853079, 1738423, 3511103, 7580119, 8737039, 10006063, ...
If a(n) is a positive prime then n is congruent to 0 or 4 (mod 6).

Crossrefs

Programs

  • Magma
    [4*n^3-3*n^2-2*n-1: n in [0..40]]; // Vincenzo Librandi, Feb 10 2016
    
  • Mathematica
    Table[4 n^3 - 3 n^2 - 2 n - 1, {n, 0, 40}]
    LinearRecurrence[{4, -6, 4, -1}, {-1, -2, 15, 74}, 41]
    CoefficientList[Series[(-1 + 2 x + 17 x^2 + 6 x^3) / (1 - x)^4, {x, 0, 40}], x] (* Vincenzo Librandi, Feb 10 2016 *)
  • PARI
    a(n)=4*n^3-3*n^2-2*n-1 \\ Charles R Greathouse IV, Jul 26 2016

Formula

G.f.: (-1 + 2*x + 17*x^2 + 6*x^3)/(1 - x)^4.
a(n) = A103532(n - 1) - A005408(n), n>0.
a(n) = 4*a(n - 1) - 6*a(n - 2) + 4*a(n - 3) - a(n - 4).
Sum_{n>=0} 1/a(n) = -1.407823506818026589265...
E.g.f.: exp(x)*(-1 - x + 9*x^2 + 4*x^3). - Stefano Spezia, Nov 17 2024

A380747 Array read by ascending antidiagonals: A(n,k) = [x^n] (1 - x)/(1 - k*x)^2.

Original entry on oeis.org

1, -1, 1, 0, 1, 1, 0, 1, 3, 1, 0, 1, 8, 5, 1, 0, 1, 20, 21, 7, 1, 0, 1, 48, 81, 40, 9, 1, 0, 1, 112, 297, 208, 65, 11, 1, 0, 1, 256, 1053, 1024, 425, 96, 13, 1, 0, 1, 576, 3645, 4864, 2625, 756, 133, 15, 1, 0, 1, 1280, 12393, 22528, 15625, 5616, 1225, 176, 17, 1
Offset: 0

Views

Author

Stefano Spezia, Jan 31 2025

Keywords

Examples

			The array begins as:
   1, 1,   1,    1,     1,     1, ...
  -1, 1,   3,    5,     7,     9, ...
   0, 1,   8,   21,    40,    65, ...
   0, 1,  20,   81,   208,   425, ...
   0, 1,  48,  297,  1024,  2625, ...
   0, 1, 112, 1053,  4864, 15625, ...
   0, 1, 256, 3645, 22528, 90625, ...
   ...
		

Crossrefs

Cf. A000012 (k=1 or n=0), A000567 (n=2), A001792 (k=2), A007778, A060747 (n=1), A081038 (k=3), A081039 (k=4), A081040 (k=5), A081041 (k=6), A081042 (k=7), A081043 (k=8), A081044 (k=9), A081045 (k=10), A103532, A154955, A380748 (antidiagonal sums).

Programs

  • Mathematica
    A[0,0]:=1; A[1,0]:=-1; A[n_,k_]:=((k-1)*n+k)k^(n-1); Table[A[n-k,k],{n,0,10},{k,0,n}]//Flatten (* or *)
    A[n_,k_]:=SeriesCoefficient[(1-x)/(1-k*x)^2,{x,0,n}]; Table[A[n-k,k],{n,0,10},{k,0,n}]//Flatten (* or *)
    A[n_,k_]:=n!SeriesCoefficient[Exp[k*x](1+(k-1)*x),{x,0,n}]; Table[A[n-k,k],{n,0,10},{k,0,n}]//Flatten

Formula

A(n,k) = ((k - 1)*n + k)*k^(n-1) with A(0,0) = 1.
A(n,k) = n! * [x^n] exp(k*x)*(1 + (k - 1)*x).
A(n,0) = A154955(n+1).
A(3,n) = A103532(n-1) for n > 0.
A(n,n) = A007778(n) for n > 0.
Showing 1-6 of 6 results.