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

A339399 Pairwise listing of the partitions of k into two parts (s,t), with 0 < s <= t ordered by increasing values of s and where k = 2,3,... .

Original entry on oeis.org

1, 1, 1, 2, 1, 3, 2, 2, 1, 4, 2, 3, 1, 5, 2, 4, 3, 3, 1, 6, 2, 5, 3, 4, 1, 7, 2, 6, 3, 5, 4, 4, 1, 8, 2, 7, 3, 6, 4, 5, 1, 9, 2, 8, 3, 7, 4, 6, 5, 5, 1, 10, 2, 9, 3, 8, 4, 7, 5, 6, 1, 11, 2, 10, 3, 9, 4, 8, 5, 7, 6, 6, 1, 12, 2, 11, 3, 10, 4, 9, 5, 8, 6, 7, 1, 13, 2, 12, 3, 11
Offset: 1

Views

Author

Wesley Ivan Hurt, Dec 02 2020

Keywords

Comments

a(n-1) and a(n) are the lesser and greater of a twin prime pair if and only if a(n) = a(n-1) + 2 where a(n-1) and a(n) are prime.

Examples

			                                                                     [1,9]
                                                     [1,7]   [1,8]   [2,8]
                                     [1,5]   [1,6]   [2,6]   [2,7]   [3,7]
                     [1,3]   [1,4]   [2,4]   [2,5]   [3,5]   [3,6]   [4,6]
     [1,1]   [1,2]   [2,2]   [2,3]   [3,3]   [3,4]   [4,4]   [4,5]   [5,5]
   k   2       3       4       5       6       7       8       9      10
  --------------------------------------------------------------------------
   k   Nondecreasing partitions of k
  --------------------------------------------------------------------------
   2   1,1
   3   1,2
   4   1,3,2,2
   5   1,4,2,3
   6   1,5,2,4,3,3
   7   1,6,2,5,3,4
   8   1,7,2,6,3,5,4,4
   9   1,8,2,7,3,6,4,5
  10   1,9,2,8,3,7,4,6,5,5
  ...
		

Crossrefs

Bisections: A122197 (odd), A199474 (even).

Programs

  • Mathematica
    t[n_] := Flatten[Reverse /@ IntegerPartitions[n, {2}]]; Array[t, 14, 2] // Flatten (* Amiram Eldar, Dec 03 2020 *)
    Table[(1 + (-1)^n) (1 + Floor[Sqrt[2 n - 1 - (-1)^n]])/2 - ((2 n + 1 - (-1)^n)/2 - 2 Sum[Floor[(k + 1)/2], {k, -1 + Floor[Sqrt[2 n - 2 - (-1)^n]]}]) (-1)^n/2, {n, 100}] (* Wesley Ivan Hurt, Dec 04 2020 *)
  • PARI
    row(n) = vector(n\2, i, [i, n-i]);
    tabf(nn) = for (n=2, nn, print(row(n))); \\ Michel Marcus, Dec 03 2020

Formula

a(n) = (1+(-1)^n)*(1+floor(sqrt(2*n-1-(-1)^n)))/2-((2*n+1-(-1)^n)/2-2 *Sum_{k=1..floor(sqrt(2*n-2-(-1)^n)-1)} floor((k+1)/2))*(-1)^n/2.
a(n) = A339443(A103889(n)). - Wesley Ivan Hurt, May 09 2021

A082375 Irregular triangle read by rows: row n begins with n and decreases by 2 until 0 or 1 is reached, for n >= 0.

Original entry on oeis.org

0, 1, 2, 0, 3, 1, 4, 2, 0, 5, 3, 1, 6, 4, 2, 0, 7, 5, 3, 1, 8, 6, 4, 2, 0, 9, 7, 5, 3, 1, 10, 8, 6, 4, 2, 0, 11, 9, 7, 5, 3, 1, 12, 10, 8, 6, 4, 2, 0, 13, 11, 9, 7, 5, 3, 1, 14, 12, 10, 8, 6, 4, 2, 0, 15, 13, 11, 9, 7, 5, 3, 1, 16, 14, 12, 10, 8, 6, 4, 2, 0, 17, 15, 13, 11, 9, 7, 5, 3, 1, 18, 16, 14
Offset: 0

Views

Author

Michael Somos, Apr 09 2003

Keywords

Comments

As a sequence, a(n) = A025644(n+1) for n <= 142.
The length of row n is given by A008619(n) = 1 + floor(n/2).
From Wolfdieter Lang, Feb 17 2020: (Start)
This table T(n, m) can be used for the conversion identity
2*cos(Pi*k/N) = 2*sin((Pi/(2*N))*(N - 2*k)) = 2*sin((Pi/(2*N))*T(N-2, k-1)), here for N = n+2 >= 2, and k = m + 1 = 1, 2, ..., floor(N/2).
2*cos((Pi/N)*k) = R(k, rho(N)), where R is a monic Chebyshev polynomial from A127672 and rho(N) = 2*cos(Pi/N), gives part of the roots of the polynomial S(N-1, x), for k = 1, 2, ..., floor(N/2), with the Chebyshev S polynomials from A049310.
2*sin((Pi/(2*N))*q) = d^{(2*N)}_q/r, for q = 1, 2, ..., N, with the length ratio (q-th diagonal)/r, where r is the radius of the circle circumscribing a regular (2*N)-gon. The counting q starts with the diagonal d^{(2*N)}_1 = s(2*N) (in units of r), the side of the (2*N)-gon. The next diagonal is d^{(2*N)}_2 = rho(2*N)*s(2*N) (in units of r).
For the instances N = 4 (n = 2) and 5 (n = 3), we have:
N = n+2 = 4:
k = m+1 = 1, 2*cos(Pi*1/4) = 2*sin(Pi*2/8) = sqrt(2);
k = 2, 2*cos(Pi*2/4) = 2*sin(Pi*0/8) = 0.
N = 5 (n=3):
k=1 (m=0), 2*cos(Pi*1/5) = 2*sin(Pi*3/10) = (1 + sqrt(5))/2 = rho(5) = A001622;
k=2: 2*cos(Pi*2/5) = 2*sin(Pi*1/10) = rho(5) - 1. (End)
If b > 0 and c > 0 are the integer coefficients of a monic quadratic x^2 + b*x + c, it has integer roots if its discriminant d^2 = b^2 - 4c is a perfect square. This sequence is the values of d for increasing b sorted by b then c. The first pair of (b, c) = (2, 1) and has d = a(0) = 0. The n-th pair of (b, c) = (A027434(n), A350634(n)) and has d = a(n-1). - Frank M Jackson, Jan 20 2024
This sequence is related to an instance of Clark Kimberling's generic dispersion arrays; in this case the leader sequence is the square numbers A000290 (without 0), and the follower sequence is the nonsquare numbers A000037. This sequence gives the 0-origin column index of n in the resulting dispersion array. - Allan C. Wechsler, Feb 26 2025

Examples

			The irregular triangle T(n, m) begins:
  n\m  0 1 2 3 4 5 ...
  0:   0
  1:   1
  2:   2 0
  3:   3 1
  4:   4 2 0
  5:   5 3 1
  6:   6 4 2 0
  7:   7 5 3 1
  8:   8 6 4 2 0
  9:   9 7 5 3 1
  10: 10 8 6 4 2 0
  ...
		

Crossrefs

Programs

  • Mathematica
    Flatten[Table[Range[n,0,-2],{n,0,20}]] (* Harvey P. Dale, Apr 03 2019 *)
    lst = {}; Do[If[IntegerQ[d=Sqrt[b^2-4c]], AppendTo[lst, d]], {b, 1, 20}, {c, 1, b^2/4}]; lst (* Frank M Jackson, Jan 20 2024 *)
  • PARI
    a(n)=local(m); if(n<0,0,m=sqrtint(1+4*n); m-1-(1+4*n-m^2)\2)

Formula

T(n, m) = n - 2*m, m = 0, 1, ..., floor(n/2), n >= 0 (see the name and programs). - Wolfdieter Lang, Feb 17 2020
a(n) = A199474(n+1) - A122197(n+1). - Wesley Ivan Hurt, Jan 09 2022
a(n) = sqrt((A027434(n+1))^2 - 4*A350634(n+1)). - Frank M Jackson, Jan 20 2024

A339443 Pairwise listing of the partitions of k into two parts (s,t), with 0 < t <= s ordered by decreasing values of s and where k = 2,3,... .

Original entry on oeis.org

1, 1, 2, 1, 3, 1, 2, 2, 4, 1, 3, 2, 5, 1, 4, 2, 3, 3, 6, 1, 5, 2, 4, 3, 7, 1, 6, 2, 5, 3, 4, 4, 8, 1, 7, 2, 6, 3, 5, 4, 9, 1, 8, 2, 7, 3, 6, 4, 5, 5, 10, 1, 9, 2, 8, 3, 7, 4, 6, 5, 11, 1, 10, 2, 9, 3, 8, 4, 7, 5, 6, 6, 12, 1, 11, 2, 10, 3, 9, 4, 8, 5, 7, 6, 13, 1, 12, 2, 11
Offset: 1

Views

Author

Wesley Ivan Hurt, Dec 05 2020

Keywords

Examples

			                                                                     [9,1]
                                                     [7,1]   [8,1]   [8,2]
                                     [5,1]   [6,1]   [6,2]   [7,2]   [7,3]
                     [3,1]   [4,1]   [4,2]   [5,2]   [5,3]   [6,3]   [6,4]
     [1,1]   [2,1]   [2,2]   [3,2]   [3,3]   [4,3]   [4,4]   [5,4]   [5,5]
   k   2       3       4       5       6       7       8       9      10
  --------------------------------------------------------------------------
   k   Nonincreasing partitions of k
  --------------------------------------------------------------------------
   2   1,1
   3   2,1
   4   3,1,2,2
   5   4,1,3,2
   6   5,1,4,2,3,3
   7   6,1,5,2,4,3
   8   7,1,6,2,5,3,4,4
   9   8,1,7,2,6,3,5,4
  10   9,1,8,2,7,3,6,4,5,5
  ...
		

Crossrefs

Bisections: A199474, A122197.

Programs

  • Mathematica
    Table[(1 - (-1)^n) (1 + Floor[Sqrt[2 n - 1]])/2 - (((-1)^n - 2 n - 1)/2 + 2 Sum[Floor[(k + 1)/2], {k, -1 + Floor[Sqrt[2 n - 2 - (-1)^n]]}]) (-1)^n/2, {n, 100}]

Formula

a(n) = (1-(-1)^n)*(1+floor(sqrt(2*n-1)))/2-(((-1)^n-2*n-1)/2 + 2*Sum_{k=1..-1+floor(sqrt(2*n-2-(-1)^n))} floor((k+1)/2))*(-1)^n/2.
a(n) = A339399(A103889(n)). - Wesley Ivan Hurt, May 09 2021

A055087 Integers 0..n then 0..n then 0..n+1 then 0..n+1 etc.

Original entry on oeis.org

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

Views

Author

Michael Somos, Jun 13 2000

Keywords

Comments

Second column in the monotonic justified array of all positive generalized Fibonacci sequences (A160271). see also A199474. - Casey Mongoven, Nov 06 2011
Can also be seen as an irregular triangle with duplicated rows of A002262. - Reinhard Zumkeller, Jul 14 2015

Examples

			0; 0; 0,1; 0,1; 0,1,2; 0,1,2; 0,1,2,3; 0,1,2,3; ...
		

Crossrefs

Cf. A002262.

Programs

  • Haskell
    import Data.List (transpose)
    a055087 n k = a055087_tabf !! n !! k
    a055087_row n = a055087_tabf !! n
    a055087_tabf = concat $ transpose [a002262_tabl, a002262_tabl]
    a055087_list = concat a055087_tabf
    -- Reinhard Zumkeller, Jul 14 2015
  • Mathematica
    With[{nn=10},Flatten[Table[{Range[0,n],Range[0,n]},{n,0,nn}]]] (* Harvey P. Dale, May 30 2015 *)
  • PARI
    {a(n) = (1 + 4*n - sqr( floor( sqrt( 1 + 4*n)))) \ 4}
    

A350634 Products of the parts s,t in each partition of k (= 2,3,...) into two parts, ordered by increasing k and then by increasing values of s*t (see example).

Original entry on oeis.org

1, 2, 3, 4, 4, 6, 5, 8, 9, 6, 10, 12, 7, 12, 15, 16, 8, 14, 18, 20, 9, 16, 21, 24, 25, 10, 18, 24, 28, 30, 11, 20, 27, 32, 35, 36, 12, 22, 30, 36, 40, 42, 13, 24, 33, 40, 45, 48, 49, 14, 26, 36, 44, 50, 54, 56, 15, 28, 39, 48, 55, 60, 63, 64, 16, 30, 42, 52, 60, 66, 70, 72
Offset: 1

Views

Author

Wesley Ivan Hurt, Jan 09 2022

Keywords

Comments

If b > 0 and c > 0 are the integer coefficients of a monic quadratic x^2 + b*x + c, it has integer roots if its discriminant d^2 = b^2 - 4c is a perfect square. This sequence is the values of c for increasing b sorted by b then c. The first pair of (b, c) = (2, 1) and has d = 0. The n-th pair of (b, c) = (A027434(n),a(n)) and has d = A082375(n-1). - Frank M Jackson, Jan 22 2024

Examples

			---------------------------------------------------------------------------
The products of the parts start: 1*1, 1*2, 1*3, 2*2, 1*4, 2*3, etc., which are precisely the values of a(n): 1, 2, 3, 4, 4, 6, ...
                                                                     [1,9]
                                                     [1,7]   [1,8]   [2,8]
                                     [1,5]   [1,6]   [2,6]   [2,7]   [3,7]
                     [1,3]   [1,4]   [2,4]   [2,5]   [3,5]   [3,6]   [4,6]
     [1,1]   [1,2]   [2,2]   [2,3]   [3,3]   [3,4]   [4,4]   [4,5]   [5,5]
  k    2       3       4       5       6       7       8       9      10
---------------------------------------------------------------------------
		

Crossrefs

Programs

  • Mathematica
    Times@@@Flatten[Table[IntegerPartitions[k, {2}], {k, 2, 100}], 1] (* Frank M Jackson, Jan 22 2024 *)
    lst={}; Do[If[IntegerQ[d=Sqrt[b^2-4c]], AppendTo[lst, c]], {b, 1, 100}, {c, 1, b^2/4}]; lst (* Frank M Jackson, Jan 22 2024 *)

Formula

a(n) = A122197(n) * A199474(n).
a(n) = A339399(2n-1) * A339399(2n).
a(n) = ((A027434(n))^2 - (A082375(n))^2)/4. - Frank M Jackson, Jan 22 2024
Showing 1-5 of 5 results.