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

A228273 T(n,k) is the number of s in {1,...,n}^n having longest ending contiguous subsequence with the same value of length k; triangle T(n,k), n>=0, 0<=k<=n, read by rows.

Original entry on oeis.org

1, 0, 1, 0, 2, 2, 0, 18, 6, 3, 0, 192, 48, 12, 4, 0, 2500, 500, 100, 20, 5, 0, 38880, 6480, 1080, 180, 30, 6, 0, 705894, 100842, 14406, 2058, 294, 42, 7, 0, 14680064, 1835008, 229376, 28672, 3584, 448, 56, 8, 0, 344373768, 38263752, 4251528, 472392, 52488, 5832, 648, 72, 9
Offset: 0

Views

Author

Alois P. Heinz, Aug 19 2013

Keywords

Examples

			T(0,0) = 1: [].
T(1,1) = 1: [1].
T(2,1) = 2: [1,2], [2,1].
T(2,2) = 2: [1,1], [2,2].
T(3,1) = 18: [1,1,2], [1,1,3], [1,2,1], [1,2,3], [1,3,1], [1,3,2], [2,1,2], [2,1,3], [2,2,1], [2,2,3], [2,3,1], [2,3,2], [3,1,2], [3,1,3], [3,2,1], [3,2,3], [3,3,1], [3,3,2].
T(3,2) = 6: [1,2,2], [1,3,3], [2,1,1], [2,3,3], [3,1,1], [3,2,2].
T(3,3) = 3: [1,1,1], [2,2,2], [3,3,3].
Triangle T(n,k) begins:
  1;
  0,        1;
  0,        2,       2;
  0,       18,       6,      3;
  0,      192,      48,     12,     4;
  0,     2500,     500,    100,    20,    5;
  0,    38880,    6480,   1080,   180,   30,   6;
  0,   705894,  100842,  14406,  2058,  294,  42,  7;
  0, 14680064, 1835008, 229376, 28672, 3584, 448, 56,  8;
		

Crossrefs

Row sums give: A000312.
Columns k=0-4 give: A000007, A066274(n) = 2*A081131(n) for n>1, A053506(n) for n>2, A055865(n-1) = A085389(n-1) for n>3, A085390(n-1) for n>4.
Main diagonal gives: A028310.
Lower diagonals include (offsets may differ): A002378, A045991, A085537, A085538, A085539.

Programs

  • Maple
    T:= (n, k)-> `if`(n=0 and k=0, 1, `if`(k<1 or k>n, 0,
                 `if`(k=n, n, (n-1)*n^(n-k)))):
    seq(seq(T(n,k), k=0..n), n=0..12);
  • Mathematica
    f[0,0]=1;
    f[n_,k_]:=Which[1<=k<=n-1,n^(n-k)*(n-1),k<1,0,k==n,n,k>n,0];
    Table[Table[f[n,k],{k,0,n}],{n,0,10}]//Grid (* Geoffrey Critzer, May 19 2014 *)

Formula

T(0,0) = 1, else T(n,k) = 0 for k<1 or k>n, else T(n,n) = n, else T(n,k) = (n-1)*n^(n-k).
Sum_{k=0..n} T(n,k) = A000312(n).
Sum_{k=0..n} k*T(n,k) = A031972(n).

A334705 Triangle read by rows: T(n,k) (1 <= k <= n) = number of ways to choose three points from an n X k grid of points which are the vertices of a triangle of nonzero area.

Original entry on oeis.org

0, 0, 4, 0, 18, 76, 0, 48, 200, 516, 0, 100, 412, 1056, 2148, 0, 180, 738, 1884, 3820, 6768, 0, 294, 1200, 3052, 6176, 10922, 17600, 0, 448, 1824, 4628, 9352, 16516, 26588, 40120, 0, 648, 2632, 6668, 13456, 23740, 38192, 57588, 82608, 0, 900, 3650, 9232, 18612, 32812, 52758, 79508, 114000, 157252
Offset: 1

Views

Author

N. J. A. Sloane, Jun 13 2020

Keywords

Comments

It follows from the definitions that T(n,k) + A334704(n,k) = A334703(n,k) for 1 <= k <= n.

Examples

			Triangle begins:
0,
0, 4,
0, 18, 76,
0, 48, 200, 516,
0, 100, 412, 1056, 2148,
0, 180, 738, 1884, 3820, 6768,
0, 294, 1200, 3052, 6176, 10922, 17600,
0, 448, 1824, 4628, 9352, 16516, 26588, 40120,
0, 648, 2632, 6668, 13456, 23740, 38192, 57588, 82608,
0, 900, 3650, 9232, 18612, 32812, 52758, 79508, 114000, 157252,
0, 1210, 4900, 12380, 24940, 43934, 70608, 106364, 152456, 210234, 280988,
...
This is the lower half of a symmetric array. The full symmetric array begins:
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
0, 4, 18, 48, 100, 180, 294, 448, 648, 900, 1210, 1584, ...
0, 18, 76, 200, 412, 738, 1200, 1824, 2632, 3650, 4900, 6408, ...
0, 48, 200, 516, 1056, 1884, 3052, 4628, 6668, 9232, 12380, 16176, ...
0, 100, 412, 1056, 2148, 3820, 6176, 9352, 13456, 18612, 24940, 32568, ...
0, 180, 738, 1884, 3820, 6768, 10922, 16516, 23740, 32812, 43934, 57336, ...
0, 294, 1200, 3052, 6176, 10922, 17600, 26588, 38192, 52758, 70608, 92112, ...
0, 448, 1824, 4628, 9352, 16516, 26588, 40120, 57588, 79508, 106364, 138708, ...
0, 648, 2632, 6668, 13456, 23740, 38192, 57588, 82608, 114000, 152456, 198760, ...
0, 900, 3650, 9232, 18612, 32812, 52758, 79508, 114000, 157252, 210234, 274016 , ...
0, 1210, 4900, 12380, 24940, 43934, 70608, 106364, 152456, 210234, 280988, 366152, ...
...
		

Crossrefs

This is a companion to the triangles A334703 and A334704.
Rows (or columns) 2,3,4,5 of the full array are A045991, A262402, A296367, A334707. The main diagonal is A045996.

Extensions

Rows 6 onwards from Tom Duff (see the Duff link in A334704). - N. J. A. Sloane, Jun 19 2020

A133070 a(n) = n^5 - n^3 - n^2.

Original entry on oeis.org

0, -1, 20, 207, 944, 2975, 7524, 16415, 32192, 58239, 98900, 159599, 246960, 368927, 534884, 755775, 1044224, 1414655, 1883412, 2468879, 3191600, 4074399, 5142500, 6423647, 7948224, 9749375, 11863124, 14328495, 17187632, 20485919, 24272100, 28598399, 33520640, 39098367, 45394964
Offset: 0

Views

Author

Omar E. Pol, Nov 01 2007

Keywords

Comments

Exponents are prime numbers in decreasing order.

Examples

			a(7)=16415 because 7^5=16807, 7^3=343, 7^2=49 and we can write 16807-343-49=16415.
		

Crossrefs

Programs

  • Magma
    [n^5-n^3-n^2: n in [0..50]]; // Vincenzo Librandi, Dec 15 2010
    
  • Mathematica
    Table[n^5-n^3-n^2,{n,0,40}] (* or *) LinearRecurrence[ {6,-15,20,-15,6,-1},{0,-1,20,207,944,2975},41] (* Harvey P. Dale, Jul 23 2011 *)
  • PARI
    for(n=0,50, print1(n^5 - n^3 - n^2, ", ")) \\ G. C. Greubel, Oct 20 2017

Formula

a(n) = n^5 - n^3 - n^2.
G.f.: x*(-1 +26*x + 72*x^2 + 22*x^3 + x^4)/(1-x)^6. - R. J. Mathar, Nov 14 2007
a(n) = 6*a(n-1) -15*a(n-2) +20*a(n-3) -15*a(n-4) +6*a(n-5) -a(n-6), with a(0)=0, a(1)=-1, a(2)=20, a(3)=207, a(4)=944, a(5)=2975. - Harvey P. Dale, Jul 23 2011

Extensions

More terms from Vincenzo Librandi, Dec 15 2010

A133071 a(n) = n^5 - n^3 + n^2.

Original entry on oeis.org

0, 1, 28, 225, 976, 3025, 7596, 16513, 32320, 58401, 99100, 159841, 247248, 369265, 535276, 756225, 1044736, 1415233, 1884060, 2469601, 3192400, 4075281, 5143468, 6424705, 7949376, 9750625, 11864476, 14329953, 17189200, 20487601, 24273900, 28600321, 33522688, 39100545, 45397276
Offset: 0

Views

Author

Omar E. Pol, Nov 01 2007

Keywords

Comments

Exponents are prime numbers in decreasing order.

Examples

			a(7)=16513 because 7^5=16807, 7^3=343, 7^2=49 and we can write 16807-343+49=16513.
		

Crossrefs

Programs

  • Magma
    [n^5-n^3+n^2: n in [0..50]]; // Vincenzo Librandi, Dec 15 2010
    
  • Mathematica
    Table[n^5 - n^3 + n^2, {n,0,50}] (* G. C. Greubel, Oct 20 2017 *)
  • PARI
    for(n=0,50, print1(n^5 - n^3 + n^2, ", ")) \\ G. C. Greubel, Oct 20 2017

Formula

a(n) = n^5 - n^3 + n^2.
G.f.: x*(1 + 22*x + 72*x^2 + 26*x^3 - x^4)/(1-x)^6. - R. J. Mathar, Nov 14 2007

Extensions

More terms from Vincenzo Librandi, Dec 15 2010

A133072 a(n) = n^5 + n^3 - n^2.

Original entry on oeis.org

0, 1, 36, 261, 1072, 3225, 7956, 17101, 33216, 59697, 100900, 162261, 250416, 373321, 540372, 762525, 1052416, 1424481, 1895076, 2482597, 3207600, 4092921, 5163796, 6447981, 7975872, 9780625, 11898276, 14367861, 17231536, 20534697, 24326100, 28657981, 33586176, 39170241, 45473572
Offset: 0

Views

Author

Omar E. Pol, Nov 01 2007

Keywords

Comments

Exponents are the prime numbers in decreasing order.

Examples

			a(7)=17101 because 7^5=16807, 7^3=343, 7^2=49 and we can write 16807+343-49=17101.
		

Crossrefs

Programs

  • Magma
    [n^5+n^3-n^2: n in [0..50]]; // Vincenzo Librandi, Dec 15 2010
    
  • Mathematica
    Table[n^5 + n^3 - n^2, {n, 0, 50}] (* G. C. Greubel, Oct 20 2017 *)
  • PARI
    for(n=0,50, print1(n^5 + n^3 - n^2, ", ")) \\ G. C. Greubel, Oct 20 2017

Formula

a(n) = n^5 + n^3 - n^2.
G.f.: x*(1 + 30*x + 60*x^2 + 26*x^3 + 3*x^4)/(1-x)^6. - R. J. Mathar, Nov 14 2007

Extensions

More terms from Vincenzo Librandi, Dec 15 2010

A133073 a(n) = n^5 + n^3 + n^2.

Original entry on oeis.org

0, 3, 44, 279, 1104, 3275, 8028, 17199, 33344, 59859, 101100, 162503, 250704, 373659, 540764, 762975, 1052928, 1425059, 1895724, 2483319, 3208400, 4093803, 5164764, 6449039, 7977024, 9781875, 11899628, 14369319, 17233104, 20536379, 24327900, 28659903, 33588224, 39172419, 45475884
Offset: 0

Views

Author

Omar E. Pol, Nov 01 2007

Keywords

Comments

Exponents are prime numbers in decreasing order.

Examples

			a(7) = 17199 because 7^5 = 16807, 7^3 = 343, 7^2 = 49 and we can write 16807 + 343 + 49 = 17199.
		

Crossrefs

Programs

  • Magma
    [n^5+n^3+n^2: n in [0..50]]; // Vincenzo Librandi, Dec 15 2010
    
  • Mathematica
    Total[#^{5,3,2}]&/@Range[0,40]  (* Harvey P. Dale, Jan 18 2011 *)
    LinearRecurrence[{6,-15,20,-15,6,-1},{0,3,44,279,1104,3275},35] (* James C. McMahon, Mar 10 2025 *)
  • PARI
    for(n=0,50, print1(n^5 + n^3 + n^2, ", ")) \\ G. C. Greubel, Oct 20 2017

Formula

G.f.: x*(3 + 26*x + 60*x^2 + 30*x^3 + x^4)/(1-x)^6. - R. J. Mathar, Nov 14 2007
a(n) = n^2*(n^3 + n + 1). - Wesley Ivan Hurt, Mar 02 2023

Extensions

More terms from Vincenzo Librandi, Dec 15 2010

A152416 Decimal expansion of 2 - Pi^2/6.

Original entry on oeis.org

3, 5, 5, 0, 6, 5, 9, 3, 3, 1, 5, 1, 7, 7, 3, 5, 6, 3, 5, 2, 7, 5, 8, 4, 8, 3, 3, 3, 5, 3, 9, 7, 4, 8, 1, 0, 7, 8, 1, 0, 5, 0, 0, 9, 8, 7, 9, 3, 2, 0, 1, 5, 6, 2, 2, 6, 4, 4, 4, 1, 7, 7, 0, 6, 2, 9, 9, 9, 2, 5, 2, 9, 5, 9, 6, 7, 9, 9, 1, 2, 6, 1, 6, 6, 3, 7, 1, 0, 9, 9, 3, 8, 0, 2, 4, 1, 2, 9, 4, 6, 9, 5, 9, 9, 5
Offset: 0

Views

Author

R. J. Mathar, Dec 03 2008

Keywords

Comments

Essentially the 9's complement of the digits of A013661, starting with the second. Consider the constants N(s) = Sum_{n >= 2} 1/(n^s*(n-1)) = s - Sum_{k=2..s} Zeta(k), where Zeta is Riemann's zeta function. N(1)=1 and this constant here is N(2).
The proportion of triangles formed by random lines in a plane (see Theorem 6 in Miles link). - Michel Marcus, Sep 04 2015

Examples

			Equals 0.355065933151773563527584833353974810781050098793201562264441770...
		

Crossrefs

Programs

  • Maple
    evalf(2-Pi^2/6);
  • Mathematica
    First@ RealDigits[N[2 - Pi^2/6, 120]] (* Michael De Vlieger, Sep 04 2015 *)
  • PARI
    2 - Pi^2/6 \\ Michel Marcus, Jan 06 2017

Formula

Equals 2 - A013661.
Equals lim_{n->oo} (1/n^2)*Sum_{k=2..n^2-1} (fractional_part(n/sqrt(k))). See Mathematical Reflections link. - Michel Marcus, Jan 06 2017
From Amiram Eldar, Aug 09 2020: (Start)
Equals Sum_{k>=1} 1/(k*(k+1)^2) = Sum_{k>=2} 1/A045991(k).
Equals Integral_{x=0..1} log(x)*log(1-x) dx. (End)
Equals Sum_{i, j >= 1} 1/((i + 1)^2*binomial(i+j+1, i)). - Peter Bala, Aug 05 2025

A153257 a(n) = n^3 - (n+1)^2.

Original entry on oeis.org

-1, -3, -1, 11, 39, 89, 167, 279, 431, 629, 879, 1187, 1559, 2001, 2519, 3119, 3807, 4589, 5471, 6459, 7559, 8777, 10119, 11591, 13199, 14949, 16847, 18899, 21111, 23489, 26039, 28767, 31679, 34781, 38079, 41579, 45287, 49209, 53351, 57719, 62319, 67157, 72239
Offset: 0

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    Table[n^3-(n+1)^2,{n,0,40}] (* Harvey P. Dale, Oct 05 2022 *)
  • PARI
    my(x='x+O('x^43)); Vec((x^3+5*x^2+x-1)/(x-1)^4) \\ Elmo R. Oliveira, Aug 27 2025

Formula

From Elmo R. Oliveira, Aug 27 2025: (Start)
G.f.: (-1 + x + 5*x^2 + x^3)/(1 - x)^4.
E.g.f.: (-1 + x)*(1 + 3*x + x^2)*exp(x).
a(n) = 4*a(n-1) - 6*a(n-2) + 4*a(n-3) - a(n-4). (End)

Extensions

More terms from Elmo R. Oliveira, Aug 27 2025

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

Original entry on oeis.org

0, 18, 96, 300, 720, 1470, 2688, 4536, 7200, 10890, 15840, 22308, 30576, 40950, 53760, 69360, 88128, 110466, 136800, 167580, 203280, 244398, 291456, 345000, 405600, 473850, 550368, 635796, 730800, 836070, 952320, 1080288, 1220736
Offset: 2

Views

Author

Keywords

Comments

There are 5 ways to put parentheses in the expression a - b - c - d: (a - (b - c)) - d, ((a - b) - c) - d, (a - b) - (c - d), a - (b - (c - d)), a - ((b - c) - d). This sequence describes how many sets of natural numbers [a,b,c,d] can be produced with the numbers {0,1,2,3,...,n} such that all the distinct expressions take different values. A045991 describes the similar process for a - b - c. For example, no sets can be produced with only 0's or only 0's and 1's; with {0,1,2,3}, 18 such sets can be produced. - Asher Auel, Jan 26 2000
For n >= 3, a(n)/6 is the number of permutations of n symbols that 3-commute with an n-cycle (see A233440 for definition). - Luis Manuel Rivera Martínez, Feb 24 2014

Crossrefs

Programs

Formula

a(n) = A004320(n-2)*6.
G.f.: 6*x^3*(3 + x)/(1 - x)^5. - Stefano Spezia, May 20 2021
a(n) = 5*a(n-1) - 10*a(n-2) + 10*a(n-3) - 5*a(n-4) + a(n-5). - Wesley Ivan Hurt, May 22 2021
From Amiram Eldar, May 25 2021: (Start)
Sum_{n>=3} 1/a(n) = (Pi^2 - 9)/12.
Sum_{n>=3} (-1)^(n+1)/a(n) = Pi^2/24 + 2*log(2) - 7/4. (End)

A133280 Triangle formed by: 1 even, 2 odd, 3 even, 4 odd, ... starting with zero.

Original entry on oeis.org

0, 1, 3, 4, 6, 8, 9, 11, 13, 15, 16, 18, 20, 22, 24, 25, 27, 29, 31, 33, 35, 36, 38, 40, 42, 44, 46, 48, 49, 51, 53, 55, 57, 59, 61, 63, 64, 66, 68, 70, 72, 74, 76, 78, 80, 81, 83, 85, 87, 89, 91, 93, 95, 97, 99, 100, 102, 104, 106, 108, 110, 112, 114, 116, 118, 120
Offset: 0

Views

Author

Omar E. Pol, Aug 27 2008

Keywords

Comments

This sequence is related to the Connell sequence (A001614).
First member of every row is a square (A000290).
A127366(T(n,k)) mod 2 = 0 or equal parity of T(n,k) and A000196(T(n,k)); complement of A195437. - Reinhard Zumkeller, Oct 12 2011
Written as a square array the main diagonal gives A002943. - Omar E. Pol, Aug 13 2013
Last member of every row is one less than a square (A005563). - Harvey P. Dale, Oct 02 2013

Examples

			Written as a triangle the sequence begins:
    0;
    1,   3;
    4,   6,   8;
    9,  11,  13,  15;
   16,  18,  20,  22,  24;
   25,  27,  29,  31,  33,  35;
   36,  38,  40,  42,  44,  46,  48;
   49,  51,  53,  55,  57,  59,  61,  63;
   64,  66,  68,  70,  72,  74,  76,  78,  80;
   81,  83,  85,  87,  89,  91,  93,  95,  97,  99;
  100, 102, 104, 106, 108, 110, 112, 114, 116, 118, 120;
		

Crossrefs

Column 1 is A000290. Right border gives A005563.
Cf. A001614.
Cf. A045991 (row sums). - R. J. Mathar, Jul 20 2009

Programs

  • Haskell
    a133280 n k = a133280_tabl !! n !! k
    a133280_tabl = f 0 1 [0..] where
       f m j xs = (filter ((== m) . (`mod` 2)) ys) : f (1 - m) (j + 2) xs'
         where (ys,xs') = splitAt j xs
    b133280 = bFile' "A133280" (concat $ take 101 a133280_tabl) 0
    -- Reinhard Zumkeller, Oct 12 2011
    
  • Mathematica
    Flatten[Table[Range[(n-1)^2,n^2-1,2],{n,20}]] (* Harvey P. Dale, Oct 02 2013 *)
  • PARI
    T(n,k) = n^2 + 2*k;
    for(n=0,10,for(k=0,n,print1(T(n,k),", "))); \\ Joerg Arndt, Aug 13 2013
    
  • Python
    from math import isqrt
    def A133280(n): return (m:=(n<<1)+1)-((isqrt(m+1<<2)+1)>>1) # Chai Wah Wu, Aug 01 2022

Formula

a(n) = A005408(n) - A002024(n+1). - Ivan N. Ianakiev, Aug 13 2013
T(n,k) = n^2 + 2*k. - Joerg Arndt, Aug 13 2013
Previous Showing 11-20 of 65 results. Next