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

A368533 Numbers whose binary indices are all squarefree.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 16, 17, 18, 19, 20, 21, 22, 23, 32, 33, 34, 35, 36, 37, 38, 39, 48, 49, 50, 51, 52, 53, 54, 55, 64, 65, 66, 67, 68, 69, 70, 71, 80, 81, 82, 83, 84, 85, 86, 87, 96, 97, 98, 99, 100, 101, 102, 103, 112, 113, 114, 115, 116, 117, 118, 119, 512
Offset: 1

Views

Author

Gus Wiseman, Mar 23 2024

Keywords

Comments

The complement first differs from A115419 in having 128.
A binary index of n is any position of a 1 in its reversed binary expansion. The binary indices of n are row n of A048793.

Examples

			The terms together with their binary expansions and binary indices begin:
    0:       0 ~ {}
    1:       1 ~ {1}
    2:      10 ~ {2}
    3:      11 ~ {1,2}
    4:     100 ~ {3}
    5:     101 ~ {1,3}
    6:     110 ~ {2,3}
    7:     111 ~ {1,2,3}
   16:   10000 ~ {5}
   17:   10001 ~ {1,5}
   18:   10010 ~ {2,5}
   19:   10011 ~ {1,2,5}
   20:   10100 ~ {3,5}
   21:   10101 ~ {1,3,5}
   22:   10110 ~ {2,3,5}
   23:   10111 ~ {1,2,3,5}
   32:  100000 ~ {6}
   33:  100001 ~ {1,6}
   34:  100010 ~ {2,6}
   35:  100011 ~ {1,2,6}
   36:  100100 ~ {3,6}
   37:  100101 ~ {1,3,6}
   38:  100110 ~ {2,3,6}
		

Crossrefs

Set multipartitions: A049311, A050320, A089259, A116540.
For prime indices instead of binary indices we have A302478.
The case of prime binary indices is A326782.
The case of squarefree product is A371289.
For prime-power product we have A371290.
For nonprime binary indices we have A371443, composite A371444.
The semiprime case is A371453, squarefree case of A371454.
A005117 lists squarefree numbers.
A048793 lists binary indices, A000120 length, A272020 reverse, A029931 sum.
A070939 gives length of binary expansion.
A096111 gives product of binary indices.

Programs

  • Mathematica
    bpe[n_]:=Join@@Position[Reverse[IntegerDigits[n,2]],1];
    Select[Range[0,100],And@@SquareFreeQ/@bpe[#]&]
  • Python
    from math import isqrt
    from sympy import mobius
    def A368533(n):
        def f(x,n): return int(n+x-sum(mobius(k)*(x//k**2) for k in range(1, isqrt(x)+1)))
        def A005117(n):
            m, k = n, f(n,n)
            while m != k: m, k = k, f(k,n)
            return m
        return sum(1<<A005117(i)-1 for i, j in enumerate(bin(n-1)[:1:-1],1) if j=='1') # Chai Wah Wu, Oct 24 2024

A371453 Numbers whose binary indices are all squarefree semiprimes.

Original entry on oeis.org

32, 512, 544, 8192, 8224, 8704, 8736, 16384, 16416, 16896, 16928, 24576, 24608, 25088, 25120, 1048576, 1048608, 1049088, 1049120, 1056768, 1056800, 1057280, 1057312, 1064960, 1064992, 1065472, 1065504, 1073152, 1073184, 1073664, 1073696, 2097152, 2097184
Offset: 1

Views

Author

Gus Wiseman, Apr 02 2024

Keywords

Comments

A binary index of n is any position of a 1 in its reversed binary expansion. The binary indices of n are row n of A048793.

Examples

			The terms together with their binary expansions and binary indices begin:
       32:                 100000 ~ {6}
      512:             1000000000 ~ {10}
      544:             1000100000 ~ {6,10}
     8192:         10000000000000 ~ {14}
     8224:         10000000100000 ~ {6,14}
     8704:         10001000000000 ~ {10,14}
     8736:         10001000100000 ~ {6,10,14}
    16384:        100000000000000 ~ {15}
    16416:        100000000100000 ~ {6,15}
    16896:        100001000000000 ~ {10,15}
    16928:        100001000100000 ~ {6,10,15}
    24576:        110000000000000 ~ {14,15}
    24608:        110000000100000 ~ {6,14,15}
    25088:        110001000000000 ~ {10,14,15}
    25120:        110001000100000 ~ {6,10,14,15}
  1048576:  100000000000000000000 ~ {21}
		

Crossrefs

Partitions of this type are counted by A002100, squarefree case of A101048.
For primes instead of squarefree semiprimes we get A326782.
For prime indices instead of binary indices we have A339113, A339112.
Allowing any squarefree numbers gives A368533.
This is the squarefree case of A371454.
A001358 lists squarefree semiprimes, squarefree A006881.
A005117 lists squarefree numbers.
A048793 lists binary indices, reverse A272020, length A000120, sum A029931.
A070939 gives length of binary expansion.
A096111 gives product of binary indices.

Programs

  • Maple
    M:= 26: # for terms < 2^M
    P:= select(isprime, [$2..(M+1)/2]): nP:= nops(P):
    S:= select(`<`,{seq(seq(P[i]*P[j],i=1..j-1),j=1..nP)},M+1):
    R:= map(proc(s) local i; add(2^(i-1),i=s) end proc, combinat:-powerset(S) minus {{}}):
    sort(convert(R,list)); # Robert Israel, Apr 04 2024
  • Mathematica
    bix[n_]:=Join@@Position[Reverse[IntegerDigits[n,2]],1];
    sqfsemi[n_]:=SquareFreeQ[n]&&PrimeOmega[n]==2;
    Select[Range[10000],And@@sqfsemi/@bix[#]&]
  • Python
    def A371453(n): return sum(1<<A006881(i)-1 for i, j in enumerate(bin(n)[:1:-1],1) if j=='1')
    
  • Python
    from math import isqrt
    from sympy import primepi, primerange
    def A371453(n):
        def f(x,n): return int(n+x+(t:=primepi(s:=isqrt(x)))+(t*(t-1)>>1)-sum(primepi(x//k) for k in primerange(1, s+1)))
        def A006881(n):
            m, k = n, f(n,n)
            while m != k:
                m, k = k, f(k,n)
            return m
        return sum(1<<A006881(i)-1 for i, j in enumerate(bin(n)[:1:-1],1) if j=='1') # Chai Wah Wu, Aug 16 2024

A371454 Numbers whose binary indices are all semiprimes.

Original entry on oeis.org

8, 32, 40, 256, 264, 288, 296, 512, 520, 544, 552, 768, 776, 800, 808, 8192, 8200, 8224, 8232, 8448, 8456, 8480, 8488, 8704, 8712, 8736, 8744, 8960, 8968, 8992, 9000, 16384, 16392, 16416, 16424, 16640, 16648, 16672, 16680, 16896, 16904, 16928, 16936, 17152
Offset: 1

Views

Author

Gus Wiseman, Apr 02 2024

Keywords

Comments

A binary index of n is any position of a 1 in its reversed binary expansion. The binary indices of n are row n of A048793.

Examples

			The terms together with their binary expansions and binary indices begin:
     8:           1000 ~ {4}
    32:         100000 ~ {6}
    40:         101000 ~ {4,6}
   256:      100000000 ~ {9}
   264:      100001000 ~ {4,9}
   288:      100100000 ~ {6,9}
   296:      100101000 ~ {4,6,9}
   512:     1000000000 ~ {10}
   520:     1000001000 ~ {4,10}
   544:     1000100000 ~ {6,10}
   552:     1000101000 ~ {4,6,10}
   768:     1100000000 ~ {9,10}
   776:     1100001000 ~ {4,9,10}
   800:     1100100000 ~ {6,9,10}
   808:     1100101000 ~ {4,6,9,10}
		

Crossrefs

Partitions of this type are counted by A101048, squarefree case A002100.
For primes instead of semiprimes we get A326782.
For prime indices instead of binary indices we have A339112, A339113.
The squarefree case is A371453.
A001358 lists semiprimes, squarefree A006881.
A005117 lists squarefree numbers.
A048793 lists binary indices, reverse A272020, length A000120, sum A029931.
A070939 gives length of binary expansion.
A096111 gives product of binary indices.

Programs

  • Mathematica
    bix[n_]:=Join@@Position[Reverse[IntegerDigits[n,2]],1];
    semi[n_]:=PrimeOmega[n]==2;
    Select[Range[10000],And@@semi/@bix[#]&]
  • Python
    from math import isqrt
    from sympy import primepi, primerange
    def A371454(n):
        def f(x,n): return int(n+x+((t:=primepi(s:=isqrt(x)))*(t-1)>>1)-sum(primepi(x//k) for k in primerange(1, s+1)))
        def A001358(n):
            m, k = n, f(n,n)
            while m != k:
                m, k = k, f(k,n)
            return m
        return sum(1<<A001358(i)-1 for i, j in enumerate(bin(n)[:1:-1],1) if j=='1') # Chai Wah Wu, Aug 16 2024
Showing 1-3 of 3 results.