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

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

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

A110730 Irregular triangle read by rows in which row n lists n 1's followed by (n-1) 2's followed by (n-3) 3's ... followed by 1 n.

Original entry on oeis.org

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

Views

Author

Amarnath Murthy, Aug 09 2005

Keywords

Comments

From Omar E. Pol, May 08 2021: (Start)
Row n has length A000217(n).
Row sums give A000292, n >= 1.
Row n lists the terms of the n-th row A333516 in nondecreasing order.
(End)

Examples

			From _Omar E. Pol_, May 08 2021: (Start)
Triangle begins:
  1;
  1, 1, 2;
  1, 1, 1, 2, 2, 3;
  1, 1, 1, 1, 2, 2, 2, 3, 3, 4;
  1, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 4, 4, 5;
  1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 5, 5, 6;
  ...
(End)
		

Crossrefs

Cf. A004736.
Cf. A000217, A000292, A333516, A345116 (mirror).

Programs

Extensions

Name clarified by Omar E. Pol, Jun 08 2021

A345116 Irregular triangle T(n,k) read by rows in which row n has length the n-th triangular number A000217(n) and every column k lists the positive integers A000027, n >= 1, k >= 1.

Original entry on oeis.org

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

Views

Author

Omar E. Pol, Jun 08 2021

Keywords

Comments

Row n lists the terms of the n-th row of A333516 in nonincreasing order.
The sum of the divisors of the terms of the n-th row of the triangle is equal to A175254(n), equaling the volume of the stepped pyramid with n levels described in A245092.

Examples

			Triangle begins:
1;
2, 1, 1;
3, 2, 2, 1, 1, 1;
4, 3, 3, 2, 2, 2, 1, 1, 1, 1;
5, 4, 4, 3, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 1;
6, 5, 5, 4, 4, 4, 3, 3, 3, 3, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1;
...
For n = 6 the divisors of the terms of the 6th row of triangle are:
6, 5, 5, 4, 4, 4, 3, 3, 3, 3, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1;
3, 1, 1, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1;
2,       1, 1, 1;
1;
The sum of these divisors is equal to A175254(6) = 82, equaling the volume of the stepped pyramid with six levels described in A245092.
		

Crossrefs

Mirror of A110730.
Row lengths gives A000217, n >= 1.
Row sums gives A000292, n >= 1.
Every column gives A000027.

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

A345272 Irregular triangle read by rows T(n,k) in which row n lists in nonincreasing order all divisors of the terms of the n-th row of triangle A110730, n >= 1, k >= 1.

Original entry on oeis.org

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

Views

Author

Omar E. Pol, Jun 12 2021

Keywords

Comments

Note that in the definition A110730 can be replaced with A333516 or with A345116 since these three triangles contain in every row the same terms but in distinct order.
The sum of n-th row is equal to A175254(n) equaling the volume (also the number of cubes) of the stepped pyramid with n levels described in A245092.

Examples

			Triangle begins:
1;
2, 1, 1, 1;
3, 2, 2, 1, 1, 1, 1, 1, 1;
4, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1;
5, 4, 4, 3, 3, 3, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1;
...
For n = 3 the third row of A110730 is [1, 1, 1, 2, 2, 3], so the divisors of these terms in nonincreasing order are [3, 2, 2, 1, 1, 1, 1, 1, 1], the same as the third row of triangle.
		

Crossrefs

Programs

  • PARI
    row(n) = my(v=[]); for (k=1, n, for (j=1, n-k+1, v = concat(v, divisors(k)))); vecsort(v,,4); \\ Michel Marcus, Jun 14 2021

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)).
Showing 1-8 of 8 results.