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

A056560 Tetrahedron with T(t,n,k)=n-k; succession of growing finite triangles with increasing values towards bottom left.

Original entry on oeis.org

0, 0, 1, 0, 0, 1, 0, 2, 1, 0, 0, 1, 0, 2, 1, 0, 3, 2, 1, 0, 0, 1, 0, 2, 1, 0, 3, 2, 1, 0, 4, 3, 2, 1, 0, 0, 1, 0, 2, 1, 0, 3, 2, 1, 0, 4, 3, 2, 1, 0, 5, 4, 3, 2, 1, 0, 0, 1, 0, 2, 1, 0, 3, 2, 1, 0, 4, 3, 2, 1, 0, 5, 4, 3, 2, 1, 0, 6, 5, 4, 3, 2, 1, 0, 0, 1, 0, 2, 1, 0, 3, 2, 1, 0, 4, 3, 2, 1, 0, 5, 4, 3, 2, 1, 0
Offset: 0

Views

Author

Henry Bottomley, Jun 26 2000

Keywords

Examples

			First triangle: [0]; second triangle: [0; 1 0]; third triangle: [0; 1 0; 2 1 0]; ...
		

Crossrefs

Together with A056558 and A056559 might enable reading "by antidiagonals" of cube arrays as 3-dimensional analog of A002262 and A025581 with square arrays.

Formula

a(n) = A056557(n) - A056558(n).

A127322 Second 4-dimensional hyper-tetrahedral coordinate; 4-D analog of A056557.

Original entry on oeis.org

0, 0, 1, 1, 1, 0, 1, 1, 1, 2, 2, 2, 2, 2, 2, 0, 1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 0, 1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4
Offset: 0

Views

Author

Graeme McRae, Jan 10 2007

Keywords

Comments

If {(W,X,Y,Z)} are 4-tuples of nonnegative integers with W>=X>=Y>=Z ordered by W, X, Y and Z, then W=A127321(n), X=A127322(n), Y=A127323(n) and Z=A127324(n). These sequences are the four-dimensional analog of the three-dimensional A056556, A056557 and A056558.

Examples

			a(23)=2 because a(A000332(2+3)+A000292(2)) = a(A000332(2+3)+A000292(3)-1) = 2, so a(19) = a(24) = 2.
See A127321 for a table of A127321, A127322, A127323, A127324.
		

Crossrefs

Formula

For W>=X>=0, a(A000332(W+3)+A000292(X)) = a(A000332(W+3)+A000292(X+1)-1) = X A127322(n+1) = A127321(n)==A127324(n) ? 0 : A127322(n)==A127324(n) ? A127322(n)+1 : A127322(n)

A127323 Third 4-dimensional hyper-tetrahedral coordinate; 4-D analog of A056557.

Original entry on oeis.org

0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 1, 1, 2, 2, 2, 0, 0, 1, 1, 0, 1, 1, 2, 2, 2, 0, 1, 1, 2, 2, 2, 3, 3, 3, 3, 0, 0, 1, 1, 0, 1, 1, 2, 2, 2, 0, 1, 1, 2, 2, 2, 3, 3, 3, 3, 0, 1, 1, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 0, 0, 1, 1, 0, 1, 1, 2, 2, 2, 0, 1, 1, 2, 2, 2, 3, 3, 3, 3, 0, 1, 1, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4
Offset: 0

Views

Author

Graeme McRae, Jan 10 2007

Keywords

Comments

If {(W,X,Y,Z)} are 4-tuples of nonnegative integers with W>=X>=Y>=Z ordered by W, X, Y and Z, then W=A127321(n), X=A127322(n), Y=A127323(n) and Z=A127324(n). These sequences are the four-dimensional analogs of the three-dimensional A056556, A056557 and A056558.

Examples

			a(23)=2 because a(A000332(2+3)+A000292(2)+A000217(2)) = a(A000332(2+3)+A000292(2)+A000217(2+1)-1) = 2, so a(22) = a(24) = 2.
See A127321 for a table of A127321, A127322, A127323, A127324.
		

Crossrefs

Formula

For W>=X>=0, a(A000332(W+3)+A000292(X)+A000217(Y)) = a(A000332(W+3)+A000292(X)+A000217(Y+1)-1) = Y A127322(n+1) = A127321(n)==A127324(n) ? 0 : A127322(n)==A127324(n) ? 0 : A127323(n)==A127324(n) ? A127323(n)+1 : A127323(n)

A127321 First 4-dimensional hyper-tetrahedral coordinate; repeat m C(m+3,3) times; 4-D analog of A056556.

Original entry on oeis.org

0, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5
Offset: 0

Views

Author

Graeme McRae, Jan 10 2007

Keywords

Comments

If {(W,X,Y,Z)} are 4-tuples of nonnegative integers with W>=X>=Y>=Z ordered by W, X, Y and Z, then W=A127321(n), X=A127322(n), Y=A127323(n) and Z=A127324(n). These sequences are the four-dimensional analogs of the three-dimensional A056556, A056557 and A056558.

Examples

			a(23)=3 because a(A000332(3+3)) = a(A000332(3+4)-1) = 3, so a(15) = a(34) = 3.
Table of A127321, A127322, A127323, A127324:
  n W,X,Y,Z
  0 0,0,0,0
  1 1,0,0,0
  2 1,1,0,0
  3 1,1,1,0
  4 1,1,1,1
  5 2,0,0,0
  6 2,1,0,0
  7 2,1,1,0
  8 2,1,1,1
  9 2,2,0,0
 10 2,2,1,0
 11 2,2,1,1
 12 2,2,2,0
 13 2,2,2,1
 14 2,2,2,2
 15 3,0,0,0
 16 3,1,0,0
 17 3,1,1,0
 18 3,1,1,1
 19 3,2,0,0
 20 3,2,1,0
 21 3,2,1,1
 22 3,2,2,0
 23 3,2,2,1
		

Crossrefs

Programs

  • Mathematica
    Array[Floor[Sqrt[5/4 + Sqrt[24*# + 1]] - 3/2] &, 105, 0] (* or *)
    Flatten@ Array[ConstantArray[#, Binomial[# + 3, 3]] &, 6, 0] (* Michael De Vlieger, Oct 21 2021 *)
  • Python
    from math import comb
    from sympy import integer_nthroot
    def A127321(n): return (m:=integer_nthroot(24*(n+2),4)[0]-2)+(n>=comb(m+4,4)) # Chai Wah Wu, Nov 04 2024

Formula

For W>=0, a(A000332(W+3)) = a(A000332(W+4)-1) = W A127321(n+1) = A127321(n)==A127324(n) ? A127321(n)+1 : A127321(n).
a(n) = floor(sqrt(5/4 + sqrt(24*n+1)) - 3/2). - Ridouane Oudra, Oct 21 2021
a(n) = m-2 if nChai Wah Wu, Nov 04 2024

Extensions

Name corrected by Ridouane Oudra, Oct 21 2021

A331195 Three-column table read by rows: triples (i,j,k) in order sorted from the left.

Original entry on oeis.org

0, 0, 0, 1, 0, 0, 1, 1, 0, 1, 1, 1, 2, 0, 0, 2, 1, 0, 2, 1, 1, 2, 2, 0, 2, 2, 1, 2, 2, 2, 3, 0, 0, 3, 1, 0, 3, 1, 1, 3, 2, 0, 3, 2, 1, 3, 2, 2, 3, 3, 0, 3, 3, 1, 3, 3, 2, 3, 3, 3, 4, 0, 0, 4, 1, 0, 4, 1, 1, 4, 2, 0, 4, 2, 1, 4, 2, 2, 4, 3, 0, 4, 3, 1, 4, 3, 2, 4, 3, 3, 4, 4, 0, 4, 4, 1, 4, 4, 2, 4, 4, 3, 4, 4, 4, 5, 0, 0
Offset: 0

Views

Author

Mehmet A. Ates, Jun 08 2020

Keywords

Examples

			For n=[0,1,2] to n=[12,13,14], a[n,n+1,n+2] counts up as such: [0,0,0], [1,0,0], [1,1,0], [1,1,1], [2,0,0], etc.
		

Crossrefs

See A372667 for the norms of these triples.

Programs

  • Mathematica
    ThreeDVectors = List[];
    SeqSize = 10;
    For[i = 0, i <= SeqSize, i++,
      For[j = 0, j <= i, j++,
        For[k = 0, k <= j, k++,
          AppendTo[ThreeDVectors, {i, j, k}]
        ]
      ]
    ];
    Flatten[ThreeDVectors]
  • Python
    from math import comb, isqrt
    from sympy import integer_nthroot
    def A331195(n): return (m:=integer_nthroot((n<<1)+6,3)[0])-(n<3*comb(m+2,3)) if not (a:=n%3) else (k:=isqrt(r:=(b:=n//3)+1-comb((m:=integer_nthroot((n<<1)-1,3)[0])-(b=comb(m+2,3))+1,3))-comb((k:=isqrt(m:=r+1<<1))+(m>k*(k+1)),2) # Chai Wah Wu, Nov 23 2024

Formula

a(3*n) = A056556(n).
a(3*n+1) = A056557(n).
a(3*n+2) = A056558(n).

A360010 First part of the n-th weakly decreasing triple of positive integers sorted lexicographically. Each n > 0 is repeated A000217(n) times.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Feb 11 2023

Keywords

Examples

			Triples begin: (1,1,1), (2,1,1), (2,2,1), (2,2,2), (3,1,1), (3,2,1), (3,2,2), (3,3,1), (3,3,2), (3,3,3), ...
		

Crossrefs

For pairs instead of triples we have A002024.
Positions of first appearances are A050407(n+2) = A000292(n)+1.
The zero-based version is A056556.
The triples have sums A070770.
The second instead of first part is A194848.
The third instead of first part is A333516.
Concatenating all the triples gives A360240.

Programs

  • Mathematica
    nn=9;First/@Select[Tuples[Range[nn],3],GreaterEqual@@#&]
  • Python
    from math import comb
    from sympy import integer_nthroot
    def A360010(n): return (m:=integer_nthroot(6*n,3)[0])+(n>comb(m+2,3)) # Chai Wah Wu, Nov 04 2024

Formula

a(n) = A056556(n) + 1 = A331195(3n) + 1.
Sum_{n>=1} (-1)^(n+1)/a(n) = Pi/8 + log(2)/4. - Amiram Eldar, Feb 18 2024
a(n) = m+1 if n>binomial(m+2,3) and a(n) = m otherwise where m = floor((6n)^(1/3)). - Chai Wah Wu, Nov 04 2024

A070770 b + c + d where b >= c >= d >= 0 ordered by b then c then d.

Original entry on oeis.org

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

Views

Author

Henry Bottomley, May 06 2002

Keywords

Examples

			Triangle begins:
  0,
  ;
  1;
  2, 3;
  ;
  2;
  3, 4;
  4, 5, 6;
  ;
  3;
  4, 5,
  5, 6, 7;
  6, 7, 8, 9;
  ;
  4;
  5, 6;
  6, 7,  8;
  7, 8,  9, 10;
  8, 9, 10, 11, 12;
  ;
  ...
		

Crossrefs

Cf. A001477, A051162, A070771, A070772 for similar sequences with different numbers of terms summed.

Programs

  • Maple
    seq(seq(seq(b+c+d,d=0..c),c=0..b),b=0..10); # Robert Israel, Jun 21 2018
  • PARI
    for(x=0,5,for(y=0,x,for(z=0,y,print1(x+y+z", ")))) \\ Charles R Greathouse IV, Sep 17 2015
    
  • Python
    from math import isqrt, comb
    from sympy import integer_nthroot
    def A070770(n): return (m:=integer_nthroot(6*(n+1),3)[0])+(a:=n>=comb(m+2,3))+(k:=isqrt(b:=(c:=n+1-comb(m+a+1,3))<<1))-((b<<2)<=(k<<2)*(k+1)+1)+c-2-comb(k+(b>k*(k+1)),2) # Chai Wah Wu, Dec 11 2024

Formula

a(n) = A056556(n) + A056557(n) + A056558(n).

A194882 Write n = C(i,4)+C(j,3)+C(k,2)+C(l,1) with i>j>k>l>=0; sequence gives i values.

Original entry on oeis.org

3, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8
Offset: 0

Views

Author

N. J. A. Sloane, Sep 04 2011

Keywords

Comments

Each n >= 0 has a unique representation as n = C(i,4)+C(j,3)+C(k,2)+C(l.1) with i>j>k>l>=0. This is the combinatorial number system of degree t = 4, where we get [A194882, A194883, A194884, A127324]. For degree t = 3 see A194847.

References

  • D. E. Knuth, The Art of Computer Programming, vol. 4A, Combinatorial Algorithms, Section 7.2.1.3, Eq. (20), p. 360.

Crossrefs

Programs

  • Python
    from math import comb
    from sympy import integer_nthroot
    def A194882(n): return (m:=integer_nthroot(24*(n+2),4)[0]+1)+(n>=comb(m+1,4)) # Chai Wah Wu, Dec 10 2024

Formula

a(n) = m if n < binomial(m+1,4) and a(n) = m+1 otherwise where m = 1+floor((24*(n+2))^(1/4)). - Chai Wah Wu, Dec 10 2024

A194883 Write n = C(i,4)+C(j,3)+C(k,2)+C(l,1) with i>j>k>l>=0; sequence gives j values.

Original entry on oeis.org

2, 2, 3, 3, 3, 2, 3, 3, 3, 4, 4, 4, 4, 4, 4, 2, 3, 3, 3, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 2, 3, 3, 3, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 2, 3, 3, 3, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7
Offset: 0

Views

Author

N. J. A. Sloane, Sep 04 2011

Keywords

Comments

Each n >= 0 has a unique representation as n = C(i,4)+C(j,3)+C(k,2)+C(l.1) with i>j>k>l>=0. This is the combinatorial number system of degree t = 4, where we get [A194882, A194883, A194884, A127324]. For degree t = 3 see A194847.

References

  • D. E. Knuth, The Art of Computer Programming, vol. 4A, Combinatorial Algorithms, Section 7.2.1.3, Eq. (20), p. 360.

Crossrefs

A194884 Write n = C(i,4)+C(j,3)+C(k,2)+C(l,1) with i>j>k>l>=0; sequence gives k values.

Original entry on oeis.org

1, 1, 1, 2, 2, 1, 1, 2, 2, 1, 2, 2, 3, 3, 3, 1, 1, 2, 2, 1, 2, 2, 3, 3, 3, 1, 2, 2, 3, 3, 3, 4, 4, 4, 4, 1, 1, 2, 2, 1, 2, 2, 3, 3, 3, 1, 2, 2, 3, 3, 3, 4, 4, 4, 4, 1, 2, 2, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 5, 1, 1, 2, 2, 1, 2, 2, 3, 3, 3, 1, 2, 2, 3, 3, 3, 4, 4, 4, 4, 1, 2, 2, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 5, 1, 2, 2, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5
Offset: 0

Views

Author

N. J. A. Sloane, Sep 04 2011

Keywords

Comments

Each n >= 0 has a unique representation as n = C(i,4)+C(j,3)+C(k,2)+C(l.1) with i>j>k>l>=0. This is the combinatorial number system of degree t = 4, where we get [A194882, A194883, A194884, A127324]. For degree t = 3 see A194847.

References

  • D. E. Knuth, The Art of Computer Programming, vol. 4A, Combinatorial Algorithms, Section 7.2.1.3, Eq. (20), p. 360.

Crossrefs

Previous Showing 11-20 of 28 results. Next