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

A353654 Numbers whose binary expansion has the same number of trailing 0 bits as other 0 bits.

Original entry on oeis.org

1, 3, 7, 10, 15, 22, 26, 31, 36, 46, 54, 58, 63, 76, 84, 94, 100, 110, 118, 122, 127, 136, 156, 172, 180, 190, 204, 212, 222, 228, 238, 246, 250, 255, 280, 296, 316, 328, 348, 364, 372, 382, 392, 412, 428, 436, 446, 460, 468, 478, 484, 494, 502, 506, 511, 528, 568
Offset: 1

Views

Author

Mikhail Kurkov, Jul 15 2022

Keywords

Comments

Numbers k such that A007814(k) = A086784(k).
To reproduce the sequence through itself, use the following rule: if binary 1xyz is a term then so are 11xyz and 10xyz0 (except for 1 alone where 100 is not a term).
The number of terms with bit length k is equal to Fibonacci(k-1) for k > 1.
Conjecture: 2*A247648(n-1) + 1 with rewrite 1 -> 1, 01 -> 0 applied to binary expansion is the same as a(n) without trailing 0 bits in binary.
Odd terms are positive Mersenne numbers (A000225), because there is no 0 in their binary expansion. - Bernard Schott, Oct 12 2022

Crossrefs

Cf. A356385 (first differences).
Subsequences with same number k of trailing 0 bits and other 0 bits: A000225 (k=0), 2*A190620 (k=1), 4*A357773 (k=2), 8*A360573 (k=3).

Programs

  • Maple
    N:= 10: # for terms <= 2^N
    S:= {1};
    for d from 1 to N do
      for k from 0 to d/2-1 do
        B:= combinat:-choose([$k+1..d-2],k);
        S:= S union convert(map(proc(t) local s; 2^d - 2^k - add(2^(s),s=t) end proc,B),set);
    od od:
    sort(convert(S,list)); # Robert Israel, Sep 21 2023
  • Mathematica
    Join[{1}, Select[Range[2, 600], IntegerExponent[#, 2] == Floor[Log2[# - 1]] - DigitCount[# - 1, 2, 1] &]] (* Amiram Eldar, Jul 16 2022 *)
  • PARI
    isok(k) = if (k==1, 1, (logint(k-1, 2)-hammingweight(k-1) == valuation(k, 2))); \\ Michel Marcus, Jul 16 2022
    
  • Python
    from itertools import islice, count
    def A353654_gen(startvalue=1): # generator of terms >= startvalue
        return filter(lambda n:(m:=(~n & n-1).bit_length()) == bin(n>>m)[2:].count('0'),count(max(startvalue,1)))
    A353654_list = list(islice(A353654_gen(),30)) # Chai Wah Wu, Oct 14 2022

Formula

a(n) = a(n-1) + A356385(n-1) for n > 1 with a(1) = 1.
Conjectured formulas: (Start)
a(n) = 2^g(n-1)*(h(n-1) + 2^A000523(h(n-1))*(2 - g(n-1))) for n > 2 with a(1) = 1, a(2) = 3 where f(n) = n - A130312(n), g(n) = [n > 2*f(n)] and where h(n) = a(f(n) + 1).
a(n) = 1 + 2^r(n-1) + Sum_{k=1..r(n-1)} (1 - g(s(n-1, k)))*2^(r(n-1) - k) for n > 1 with a(1) = 1 where r(n) = A072649(n) and where s(n, k) = f(s(n, k-1)) for n > 0, k > 1 with s(n, 1) = n.
a(n) = 2*(2 + Sum_{k=1..n-2} 2^(A213911(A280514(k)-1) + 1)) - 2^A200650(n) for n > 1 with a(1) = 1.
A025480(a(n)-1) = A348366(A343152(n-1)) for n > 1.
a(A000045(n)) = 2^(n-1) - 1 for n > 1. (End)

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

A360574 Binary expansions of odd numbers with three zeros in their binary expansion.

Original entry on oeis.org

10001, 100011, 100101, 101001, 110001, 1000111, 1001011, 1001101, 1010011, 1010101, 1011001, 1100011, 1100101, 1101001, 1110001, 10001111, 10010111, 10011011, 10011101, 10100111, 10101011, 10101101, 10110011, 10110101, 10111001, 11000111, 11001011, 11001101, 11010011, 11010101, 11011001, 11100011
Offset: 1

Views

Author

Bernard Schott, Feb 18 2023

Keywords

Comments

For m >= 5, there are A000292(m-4) terms with m digits.

Examples

			1010101 has three digits 0 and is the binary expansion of the odd integer 85, so 1010101 is a term.
		

Crossrefs

Similar, but with k zeros in their binary expansion: A000042 (k=0), A190619 (k=1), A357774 (k=2).

Programs

  • Mathematica
    FromDigits[IntegerDigits[#, 2]] & /@ Select[Range[1, 250, 2], DigitCount[#, 2, 0] == 3 &] (* Amiram Eldar, Feb 18 2023 *)
  • Python
    from itertools import count, islice
    from sympy.utilities.iterables import multiset_permutations
    def A360574_gen(): # generator of terms
        yield from (int('1'+''.join(d)+'1') for l in count(0) for d in  multiset_permutations('000'+'1'*l))
    A360574_list = list(islice(A360574_gen(),30)) # Chai Wah Wu, Feb 18 2023

Formula

a(n) = A007088(A360573(n)).

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