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.

A048672 Binary encoding of squarefree numbers (A005117): A048640(n)/2.

Original entry on oeis.org

0, 1, 2, 4, 3, 8, 5, 16, 32, 9, 6, 64, 128, 10, 17, 256, 33, 512, 7, 1024, 18, 65, 12, 2048, 129, 34, 4096, 11, 8192, 257, 16384, 66, 32768, 20, 130, 513, 65536, 131072, 1025, 36, 19, 262144, 258, 13, 524288, 1048576, 2049, 24, 35, 2097152, 4097, 4194304, 68
Offset: 1

Views

Author

Antti Karttunen, Jul 14 1999

Keywords

Comments

Permutation of nonnegative integers. Note the indexing, the domain starts from 1, although the range includes also 0.
A246353 gives the inverse of this sequence, in a sense that a(A246353(n)) = n for all n >= 0, and A246353(a(n)) = n for all n >= 1. When one is subtracted from the latter, another permutation of nonnegative integers is obtained: A064273. - Antti Karttunen, Aug 23 2014 based on comment from Howard A. Landman, Sep 25 2001
Also index of n-th term of A019565 when its terms are sorted in increasing order. For example: a(6) = 8. The smallest values of A019565 are 1,2,3,5,6,7 . The 6th is 7 which is A019565(8). - Philippe Lallouet (philip.lallouet(AT)orange.fr), Apr 28 2008
a(n) is the number whose binary indices are the prime indices of the n-th squarefree number (row n of A329631), where a binary index of n is any position of a 1 in its reversed binary expansion, and a prime index of n is a number m such that prime(m) divides n. The binary indices of n are row n of A048793, while the prime indices of n are row n of A112798. - Gus Wiseman, Nov 30 2019

Examples

			From _Gus Wiseman_, Nov 30 2019: (Start)
The sequence of squarefree numbers together with their prime indices (A329631) and the number a(n) with those binary indices begins:
   1 ->  {}      ->   0
   2 ->  {1}     ->   1
   3 ->  {2}     ->   2
   5 ->  {3}     ->   4
   6 ->  {1,2}   ->   3
   7 ->  {4}     ->   8
  10 ->  {1,3}   ->   5
  11 ->  {5}     ->  16
  13 ->  {6}     ->  32
  14 ->  {1,4}   ->   9
  15 ->  {2,3}   ->   6
  17 ->  {7}     ->  64
  19 ->  {8}     -> 128
  21 ->  {2,4}   ->  10
  22 ->  {1,5}   ->  17
  23 ->  {9}     -> 256
  26 ->  {1,6}   ->  33
  29 ->  {10}    -> 512
  30 ->  {1,2,3} ->   7
(End)
		

Crossrefs

Inverse: A246353 (see also A064273).
Cf. A019565.
A similar encoding of set-systems is A329661.
Cf. A087207.

Programs

  • Maple
    encode_sqrfrees := proc(upto_n) local b,i; b := [ ]; for i from 1 to upto_n do if(0 <> mobius(i)) then b := [ op(b), bef(i) ]; fi; od: RETURN(b); end; # see A048623 for bef
  • Mathematica
    Join[{0}, Total[2^(PrimePi[FactorInteger[#][[All, 1]]] - 1)]& /@ Select[ Range[2, 100], SquareFreeQ]] (* Jean-François Alcover, Mar 15 2016 *)
  • PARI
    lista(nn) = {for (n=1, nn, if (issquarefree(n), if (n==1, x = 0, f = factor(n); x = sum(k=1, #f~, 2^(primepi(f[k, 1])-1))); print1(x, ", "); ); ); } \\ Michel Marcus, Oct 02 2015
    
  • Python
    from math import isqrt
    from sympy import mobius, primepi, primefactors
    def A048672(n):
        if n == 1: return 0
        def f(x): return int(n-sum(mobius(k)*(x//k**2) for k in range(2, isqrt(x)+1)))
        m, k = n, f(n)
        while m != k: m, k = k, f(k)
        return sum(1<Chai Wah Wu, Feb 22 2025

Formula

a(n) = 2^(i1-1)+2^(i2-1)+...+2^(iz-1), where A005117(n) = p_i1*p_i2*p_i3*...*p_iz.
A019565(a(n)) = A005117(n). - Peter Munn, Nov 19 2019
A000120(a(n)) = A072047(n). - Gus Wiseman, Nov 30 2019
a(n) = A087207(A005117(n)). - Flávio V. Fernandes, Feb 26 2025

A329560 BII-numbers of antichains of sets with empty intersection.

Original entry on oeis.org

0, 3, 9, 10, 11, 12, 18, 33, 52, 129, 130, 131, 132, 136, 137, 138, 139, 140, 144, 146, 148, 160, 161, 164, 176, 180, 192, 258, 264, 266, 268, 274, 288, 292, 304, 308, 513, 520, 521, 524, 528, 532, 545, 560, 564, 772, 776, 780, 784, 788, 800, 804, 816, 820, 832
Offset: 1

Views

Author

Gus Wiseman, Nov 28 2019

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. We define the set-system with BII-number n to be obtained by taking the binary indices of each binary index of n. Every set-system (finite set of finite nonempty sets of positive integers) has a different BII-number. For example, 18 has reversed binary expansion (0,1,0,0,1), and since the binary indices of 2 and 5 are {2} and {1,3} respectively, the BII-number of {{2},{1,3}} is 18. Elements of a set-system are sometimes called edges.
A set-system is an antichain if no edge is a proper subset of any other.
Empty intersection means there is no vertex in common to all the edges

Examples

			The sequence of terms together with their binary expansions and corresponding set-systems begins:
    0:          0 ~ {}
    3:         11 ~ {{1},{2}}
    9:       1001 ~ {{1},{3}}
   10:       1010 ~ {{2},{3}}
   11:       1011 ~ {{1},{2},{3}}
   12:       1100 ~ {{1,2},{3}}
   18:      10010 ~ {{2},{1,3}}
   33:     100001 ~ {{1},{2,3}}
   52:     110100 ~ {{1,2},{1,3},{2,3}}
  129:   10000001 ~ {{1},{4}}
  130:   10000010 ~ {{2},{4}}
  131:   10000011 ~ {{1},{2},{4}}
  132:   10000100 ~ {{1,2},{4}}
  136:   10001000 ~ {{3},{4}}
  137:   10001001 ~ {{1},{3},{4}}
  138:   10001010 ~ {{2},{3},{4}}
  139:   10001011 ~ {{2},{3},{4}}
  140:   10001100 ~ {{1,2},{3},{4}}
  144:   10010000 ~ {{1,3},{4}}
  146:   10010010 ~ {{2},{1,3},{4}}
  148:   10010100 ~ {{1,2},{1,3},{4}}
		

Crossrefs

Intersection of A326911 and A326704.
BII-numbers of intersecting set-systems with empty intersecting are A326912.

Programs

  • Mathematica
    bpe[n_]:=Join@@Position[Reverse[IntegerDigits[n,2]],1];
    stableQ[u_,Q_]:=!Apply[Or,Outer[#1=!=#2&&Q[#1,#2]&,u,u,1],{0,1}];
    Select[Range[0,100],#==0||Intersection@@bpe/@bpe[#]=={}&&stableQ[bpe/@bpe[#],SubsetQ]&]

A330296 BII-numbers of set partitions with at least two blocks.

Original entry on oeis.org

3, 9, 10, 11, 12, 18, 33, 129, 130, 131, 132, 136, 137, 138, 139, 140, 144, 146, 160, 161, 192, 258, 264, 266, 288, 513, 520, 521, 528, 1032, 2049, 2050, 2051, 2052, 4098, 8193, 32769, 32770, 32771, 32772, 32776, 32777, 32778, 32779, 32780, 32784, 32786, 32800
Offset: 1

Views

Author

Gus Wiseman, Dec 10 2019

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. We define the set-system with BII-number n to be obtained by taking the binary indices of each binary index of n. Every set-system (finite set of finite nonempty sets of positive integers) has a different BII-number. For example, 18 has reversed binary expansion (0,1,0,0,1), and since the binary indices of 2 and 5 are {2} and {1,3} respectively, the BII-number of {{2},{1,3}} is 18. Elements of a set-system are sometimes called edges.

Examples

			The sequence of all set partitions with at least two parts together with their BII-numbers begins:
    3: {1}{2}          140: {3}{4}{12}     2049: {1}{34}
    9: {1}{3}          144: {4}{13}        2050: {2}{34}
   10: {2}{3}          146: {2}{4}{13}     2051: {1}{2}{34}
   11: {1}{2}{3}       160: {4}{23}        2052: {12}{34}
   12: {3}{12}         161: {1}{4}{23}     4098: {2}{134}
   18: {2}{13}         192: {4}{123}       8193: {1}{234}
   33: {1}{23}         258: {2}{14}       32769: {1}{5}
  129: {1}{4}          264: {3}{14}       32770: {2}{5}
  130: {2}{4}          266: {2}{3}{14}    32771: {1}{2}{5}
  131: {1}{2}{4}       288: {14}{23}      32772: {5}{12}
  132: {4}{12}         513: {1}{24}       32776: {3}{5}
  136: {3}{4}          520: {3}{24}       32777: {1}{3}{5}
  137: {1}{3}{4}       521: {1}{3}{24}    32778: {2}{3}{5}
  138: {2}{3}{4}       528: {13}{24}      32779: {1}{2}{3}{5}
  139: {1}{2}{3}{4}   1032: {3}{124}      32780: {3}{5}{12}
		

Crossrefs

BII-numbers of set partitions are A326701.

Programs

  • Mathematica
    bpe[n_]:=Join@@Position[Reverse[IntegerDigits[n,2]],1];
    Select[Range[1000],Length[bpe[#]]>=2&&Length[Join@@bpe/@bpe[#]]==Length[Union@@bpe/@bpe[#]]&]

Formula

Equal the complement of A000079 in A326701.
Showing 1-3 of 3 results.