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 20 results.

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).

A194849 Write n = C(i,3)+C(j,2)+C(k,1) with i>j>k>=0; let L[n] = [i,j,k]; sequence gives list of triples L[n], n >= 0.

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, Sep 03 2011

Keywords

Examples

			List of triples begins:
[2, 1, 0]
[3, 1, 0]
[3, 2, 0]
[3, 2, 1]
[4, 1, 0]
[4, 2, 0]
[4, 2, 1]
[4, 3, 0]
[4, 3, 1]
[4, 3, 2]
...
		

References

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

Crossrefs

The three columns are [A194847, A194848, A056558], or equivalently [A056556+2, A056557+1, A056558]. See A194847 for further information.

A360573 Odd numbers with exactly three zeros in their binary expansion.

Original entry on oeis.org

17, 35, 37, 41, 49, 71, 75, 77, 83, 85, 89, 99, 101, 105, 113, 143, 151, 155, 157, 167, 171, 173, 179, 181, 185, 199, 203, 205, 211, 213, 217, 227, 229, 233, 241, 287, 303, 311, 315, 317, 335, 343, 347, 349, 359, 363, 365, 371, 373, 377, 399, 407, 411, 413
Offset: 1

Views

Author

Bernard Schott, Feb 12 2023

Keywords

Comments

If m is a term then 2*m+1 is another term, since if M is the binary expansion of m, then M.1 where . stands for concatenation is the binary expansion of 2*m+1.
A052996 \ {1,3,8} is a subsequence, since for m >= 3, A052996(m) = 9*2^(m-2) - 1 has 100011..11 with m-2 trailing 1 for binary expansion.
A171389 \ {20} is a subsequence, since for m >= 1, A171389(m) = 21*2^m - 1 has 1010011..11 with m trailing 1 for binary expansion.
A198276 \ {18} is a subsequence, since for m >= 1, A198276(m) = 19*2^m - 1 has 1001011..11 with m trailing 1 for binary expansion.
Binary expansion of a(n) is A360574(n).
{8*a(n), n>0} form a subsequence of A353654 (numbers with three trailing 0 bits and three other 0 bits).
Numbers of the form 2^(a+1) - 2^b - 2^c - 2^d - 1 where a > b > c > d > 0. - Robert Israel, Feb 13 2023

Examples

			35_10 = 100011_2, so 35 is a term.
		

Crossrefs

Subsequences: A052996 \ {1,3,8}, A171389 \ {20}, A198276 \ {18}.
Odd numbers with k zeros in their binary expansion: A000225 (k=0), A190620 (k=1), A357773 (k=2), this sequence (k=3).

Programs

  • Maple
    q:= n-> n::odd and add(1-i, i=Bits[Split](n))=3:
    select(q, [$1..575])[];  # Alois P. Heinz, Feb 12 2023
    # Alternative:
    [seq(seq(seq(seq(2^(a+1) - 2^b - 2^c - 2^d - 1, d = c-1..1,-1), c=b-1..2,-1),b=a-1..3,-1),a=4..12)]; # Robert Israel, Feb 13 2023
  • Mathematica
    Select[Range[1, 500, 2], DigitCount[#, 2, 0] == 3 &] (* Amiram Eldar, Feb 12 2023 *)
  • PARI
    isok(m) = (m%2) && #select(x->(x==0), binary(m)) == 3; \\ Michel Marcus, Feb 13 2023
  • Python
    def ok(n): return n&1 and bin(n)[2:].count("0") == 3
    print([k for k in range(414) if ok(k)]) # Michael S. Branicky, Feb 12 2023
    
  • Python
    from itertools import count, islice
    from sympy.utilities.iterables import multiset_permutations
    def A360573_gen(): # generator of terms
        yield from (int('1'+''.join(d)+'1',2) for l in count(0) for d in  multiset_permutations('000'+'1'*l))
    A360573_list = list(islice(A360573_gen(),54)) # Chai Wah Wu, Feb 18 2023
    
  • Python
    from itertools import combinations, count, islice
    def agen(): yield from ((1<Michael S. Branicky, Feb 18 2023
    
  • Python
    from math import comb, isqrt
    from sympy import integer_nthroot
    def A056557(n): return (k:=isqrt(r:=n+1-comb((m:=integer_nthroot(6*(n+1), 3)[0])-(nA333516(n): return (r:=n-1-comb((m:=integer_nthroot(6*n, 3)[0])+(n>comb(m+2, 3))+1, 3))-comb((k:=isqrt(m:=r+1<<1))+(m>k*(k+1)), 2)+1
    def A360010(n): return (m:=integer_nthroot(6*n, 3)[0])+(n>comb(m+2, 3))
    def A360573(n):
        a = (a2:=integer_nthroot(24*n, 4)[0])+(n>comb(a2+2, 4))+3
        j = comb(a-1,4)-n
        b, c, d = A360010(j+1)+2, A056557(j)+2, A333516(j+1)
        return (1<Chai Wah Wu, Dec 18 2024
    

Formula

A023416(a(n)) = 3.
Let a = floor((24n)^(1/4))+4 if n>binomial(floor((24n)^(1/4))+2,4) and a = floor((24n)^(1/4))+3 otherwise. Let j = binomial(a-1,4)-n. Then a(n) = 2^a-1-2^(A360010(j+1)+2)-2^(A056557(j)+2)-2^(A333516(j+1)). - Chai Wah Wu, Dec 18 2024

A360240 Weakly decreasing triples of positive integers sorted lexicographically and concatenated.

Original entry on oeis.org

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, 4, 1, 1, 4, 2, 1, 4, 2, 2, 4, 3, 1, 4, 3, 2, 4, 3, 3, 4, 4, 1, 4, 4, 2, 4, 4, 3, 4, 4, 4, 5, 1, 1, 5, 2, 1, 5, 2, 2, 5, 3, 1, 5, 3, 2, 5, 3, 3, 5, 4, 1, 5, 4, 2, 5, 4, 3
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

The triples have sums A070770.
Positions of first appearances are A158842.
For pairs instead of triples we have A330709 + 1.
The zero-based version is A331195.
- The first part is A360010 = A056556 + 1.
- The second part is A194848 = A056557 + 1.
- The third part is A333516 = A056558 + 1.

Programs

  • Mathematica
    nn=9;Join@@Select[Tuples[Range[nn],3],GreaterEqual@@#&]
  • Python
    from math import isqrt, comb
    from sympy import integer_nthroot
    def A360240(n): return (m:=integer_nthroot((n-1<<1)+6,3)[0])+(n>3*comb(m+2,3)) if (a:=n%3)==1 else (k:=isqrt(r:=(b:=(n-1)//3)+1-comb((m:=integer_nthroot((n-1<<1)-1,3)[0])-(b(k<<2)*(k+1)+1) if a==2 else 1+(r:=(b:=(n-1)//3)-comb((m:=integer_nthroot((n-1<<1)-3,3)[0])+(b>=comb(m+2,3))+1,3))-comb((k:=isqrt(m:=r+1<<1))+(m>k*(k+1)),2) # Chai Wah Wu, Jun 07 2025

Formula

a(n) = A331195(n-1) + 1.

A379269 Numbers whose binary representation has exactly three zeros.

Original entry on oeis.org

8, 17, 18, 20, 24, 35, 37, 38, 41, 42, 44, 49, 50, 52, 56, 71, 75, 77, 78, 83, 85, 86, 89, 90, 92, 99, 101, 102, 105, 106, 108, 113, 114, 116, 120, 143, 151, 155, 157, 158, 167, 171, 173, 174, 179, 181, 182, 185, 186, 188, 199, 203, 205, 206, 211, 213, 214, 217
Offset: 1

Views

Author

Chai Wah Wu, Dec 19 2024

Keywords

Crossrefs

Programs

  • Mathematica
    Select[Range[2^8],Count[IntegerDigits[#,2],0]==3&] (* James C. McMahon, Dec 20 2024 *)
  • Python
    from math import comb, isqrt
    from sympy import integer_nthroot
    def A056557(n): return (k:=isqrt(r:=n+1-comb((m:=integer_nthroot(6*(n+1), 3)[0])-(nA333516(n): return (r:=n-1-comb((m:=integer_nthroot(6*n, 3)[0])+(n>comb(m+2, 3))+1, 3))-comb((k:=isqrt(m:=r+1<<1))+(m>k*(k+1)), 2)+1
    def A360010(n): return (m:=integer_nthroot(6*n, 3)[0])+(n>comb(m+2, 3))
    def A379269(n):
        a = (a2:=integer_nthroot(24*n, 4)[0])+(n>comb(a2+2, 4))+2
        j = comb(a,4)-n
        b, c, d = A360010(j+1)+1, A056557(j)+1, A333516(j+1)-1
        return (1<
    				

Formula

a(n) = (A360573(n)-1)/2.
A023416(a(n)) = 3.
Let a = floor((24n)^(1/4))+3 if n>binomial(floor((24n)^(1/4))+2,4) and a = floor((24n)^(1/4))+2 otherwise. Let j = binomial(a,4)-n. Then a(n) = 2^a-1-2^(A360010(j+1)+1)-2^(A056557(j)+1)-2^(A333516(j+1)-1).
Sum_{n>=1} 1/a(n) = 1.3949930090659130972172214185888677947877214389482588641632435250211546702139813215203065255971026537... (calculated using Baillie's irwinSums.m, see Links). - Amiram Eldar, Dec 21 2024

A332616 a(n) = value of the cubic form A^3 + B^3 + C^3 - 3ABC evaluated at row n of the table in A331195.

Original entry on oeis.org

0, 1, 2, 0, 8, 9, 4, 16, 5, 0, 27, 28, 20, 35, 18, 7, 54, 28, 8, 0, 64, 65, 54, 72, 49, 32, 91, 56, 27, 10, 128, 81, 40, 11, 0, 125, 126, 112, 133, 104, 81, 152, 108, 70, 44, 189, 130, 77, 36, 13, 250, 176, 108, 52, 14, 0, 216, 217, 200, 224, 189, 160, 243
Offset: 0

Views

Author

Mehmet A. Ates, Jun 08 2020

Keywords

Comments

No term in the sequence is congruent to 3 or 6 (mod 9).

Examples

			For n=3, a(n) = f[1,1,0] = 1^3 + 1^3 + 0^3 - 3*1*1*0 = 2.
		

Crossrefs

Cf. A074232 (in ascending order, strictly positive & without duplicates).

Programs

  • Mathematica
    SeqSize = 30;
    ListSize = 120;
    F3List = List[];
    f3[a_, b_, c_] := a^3 + b^3 + c^3 - 3*a*b*c
    For[i = 0, i <= SeqSize, i++, For[j = 0, j <= i, j++, For[k = 0, k <= j, k++, AppendTo[F3List, f3[i, j, k]]]]]
    ListPlot[F3List, PlotLabel -> "a(n)"]
    Print["First ", ListSize, " elements of a(n): ", Take[F3List, ListSize]]

Formula

a(n) = A056556(n)^3 + A056557(n)^3 + A056558(n)^3 - 3*A056556(n)*A056557(n)*A056558(n).

Extensions

Edited by N. J. A. Sloane, Aug 06 2020

A379270 Numbers with only digits "1" and three digits "0".

Original entry on oeis.org

1000, 10001, 10010, 10100, 11000, 100011, 100101, 100110, 101001, 101010, 101100, 110001, 110010, 110100, 111000, 1000111, 1001011, 1001101, 1001110, 1010011, 1010101, 1010110, 1011001, 1011010, 1011100, 1100011, 1100101, 1100110, 1101001, 1101010, 1101100
Offset: 1

Views

Author

Chai Wah Wu, Dec 19 2024

Keywords

Comments

Binary representation of A379269.
Numbers in A007088 with three 0 digits.

Crossrefs

Programs

  • Mathematica
    Select[Range[10^7],Count[IntegerDigits[#],0]==3&&Max[IntegerDigits[#]]==1&] (* James C. McMahon, Dec 20 2024 *)
  • Python
    from math import isqrt, comb
    from sympy import integer_nthroot
    def A056557(n): return (k:=isqrt(r:=n+1-comb((m:=integer_nthroot(6*(n+1), 3)[0])-(nA333516(n): return (r:=n-1-comb((m:=integer_nthroot(6*n, 3)[0])+(n>comb(m+2, 3))+1, 3))-comb((k:=isqrt(m:=r+1<<1))+(m>k*(k+1)), 2)+1
    def A360010(n): return (m:=integer_nthroot(6*n, 3)[0])+(n>comb(m+2, 3))
    def A379270(n):
        a = (a2:=integer_nthroot(24*n, 4)[0])+(n>comb(a2+2, 4))+2
        j = comb(a,4)-n
        b, c, d = A360010(j+1)+1, A056557(j)+1, A333516(j+1)-1
        return (10**a-1)//9-10**b-10**c-10**d

Formula

a(n) = A007088(A379269(n)).
Previous Showing 11-20 of 20 results.