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

A326031 Weight of the set-system with BII-number n.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Jul 20 2019

Keywords

Comments

A binary index of n is any position of a 1 in its reversed binary expansion. We define the set-system with BII-number n to be obtained by taking the binary indices of each binary index of n. Every 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, it follows that the BII-number of {{2},{1,3}} is 18. The weight of a set-system is the sum of sizes of its elements (sometimes called its edges).

Examples

			The sequence of set-systems together with their BII-numbers begins:
   0: {}
   1: {{1}}
   2: {{2}}
   3: {{1},{2}}
   4: {{1,2}}
   5: {{1},{1,2}}
   6: {{2},{1,2}}
   7: {{1},{2},{1,2}}
   8: {{3}}
   9: {{1},{3}}
  10: {{2},{3}}
  11: {{1},{2},{3}}
  12: {{1,2},{3}}
  13: {{1},{1,2},{3}}
  14: {{2},{1,2},{3}}
  15: {{1},{2},{1,2},{3}}
  16: {{1,3}}
  17: {{1},{1,3}}
  18: {{2},{1,3}}
  19: {{1},{2},{1,3}}
  20: {{1,2},{1,3}}
		

Crossrefs

Programs

  • Mathematica
    bpe[n_]:=Join@@Position[Reverse[IntegerDigits[n,2]],1];
    Table[Length[Join@@bpe/@bpe[n]],{n,0,100}]
  • Python
    def bin_i(n): #binary indices
        return([(i+1) for i, x in enumerate(bin(n)[2:][::-1]) if x =='1'])
    def A326031(n): return sum(i.bit_count() for i in bin_i(n)) # John Tyler Rascoe, Jun 08 2024

Formula

a(2^x + ... + 2^z) = w(x + 1) + ... + w(z + 1), where x...z are distinct nonnegative integers and w = A000120. For example, a(6) = a(2^2 + 2^1) = w(3) + w(2) = 3.

A305829 Factor n into distinct Fermi-Dirac primes (A050376), normalize by replacing every instance of the k-th Fermi-Dirac prime with k, then multiply everything together.

Original entry on oeis.org

1, 1, 2, 3, 4, 2, 5, 3, 6, 4, 7, 6, 8, 5, 8, 9, 10, 6, 11, 12, 10, 7, 12, 6, 13, 8, 12, 15, 14, 8, 15, 9, 14, 10, 20, 18, 16, 11, 16, 12, 17, 10, 18, 21, 24, 12, 19, 18, 20, 13, 20, 24, 21, 12, 28, 15, 22, 14, 22, 24, 23, 15, 30, 27, 32, 14, 24, 30, 24, 20, 25
Offset: 1

Views

Author

Gus Wiseman, Jun 10 2018

Keywords

Comments

Let f(n) = A050376(n) be the n-th Fermi-Dirac prime. Every positive integer n has a unique factorization of the form n = f(s_1)*...*f(s_k) where the s_i are strictly increasing positive integers. Then a(n) = s_1 * ... * s_k.
Multiplicative because for coprime m and n the Fermi-Dirac factorizations of m and n are disjoint and their union is the Fermi-Dirac factorization of m * n. - Andrew Howroyd, Aug 02 2018

Crossrefs

Programs

  • Mathematica
    nn=100;
    FDfactor[n_]:=If[n===1,{},Sort[Join@@Cases[FactorInteger[n],{p_,k_}:>Power[p,Cases[Position[IntegerDigits[k,2]//Reverse,1],{m_}->2^(m-1)]]]]];
    FDprimeList=Array[FDfactor,nn,1,Union];FDrules=MapIndexed[(#1->#2[[1]])&,FDprimeList];
    Table[Times@@(FDfactor[n]/.FDrules),{n,nn}]
  • PARI
    \\ here isfd is membership test for A050376.
    isfd(n)={my(e=isprimepower(n)); e && e == 1<Andrew Howroyd, Aug 02 2018

A305831 Number of connected components of the strict integer partition with FDH number n.

Original entry on oeis.org

0, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 1, 1, 2, 1, 2, 2, 2, 1, 3, 1, 2, 1, 2, 1, 2, 1, 2, 2, 2, 2, 1, 1, 2, 1, 3, 1, 3, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 2, 3, 2, 2, 1, 2, 1, 2, 2, 1, 1, 3, 1, 2, 1, 3, 1, 2, 1, 2, 2, 2, 2, 2, 1, 2, 1, 2, 1, 3, 1, 2, 1
Offset: 1

Views

Author

Gus Wiseman, Jun 10 2018

Keywords

Comments

Given a finite set S of positive integers greater than one, let G(S) be the simple labeled graph with vertex set S and edges between any two vertices with a common divisor. For example, G({6,14,15,35}) is a 4-cycle. A set S is said to be connected if G(S) is a connected graph.

Examples

			Let f = A050376. The FD-factorization of 1683 is 9*11*17 = f(6)*f(7)*f(10). The connected components of {6,7,10} are {{7},{6,10}}, so a(1683) = 2.
		

Crossrefs

Programs

  • Mathematica
    FDfactor[n_]:=If[n===1,{},Sort[Join@@Cases[FactorInteger[n],{p_,k_}:>Power[p,Cases[Position[IntegerDigits[k,2]//Reverse,1],{m_}->2^(m-1)]]]]];
    zsm[s_]:=With[{c=Select[Tuples[Range[Length[s]],2],And[Less@@#,GCD@@s[[#]]]>1&]},If[c=={},s,zsm[Union[Append[Delete[s,List/@c[[1]]],LCM@@s[[c[[1]]]]]]]]];
    nn=200;FDprimeList=Array[FDfactor,nn,1,Union];FDrules=MapIndexed[(#1->#2[[1]])&,FDprimeList];
    Table[Length[zsm[FDfactor[n]/.FDrules]],{n,nn}]

A305832 Number of connected components of the n-th FDH set-system.

Original entry on oeis.org

0, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 2, 1, 1, 2, 1, 2, 2, 2, 1, 3, 1, 2, 1, 2, 1, 3, 1, 2, 2, 2, 2, 1, 1, 2, 1, 3, 1, 3, 1, 2, 2, 2, 1, 2, 1, 2, 1, 2, 1, 2, 2, 3, 2, 2, 1, 3, 1, 2, 2, 2, 1, 3, 1, 2, 2, 3, 1, 2, 1, 2, 2, 2, 2, 2, 1, 2, 1, 2, 1, 3, 2, 2, 1
Offset: 1

Views

Author

Gus Wiseman, Jun 10 2018

Keywords

Comments

Let f(n) = A050376(n) be the n-th Fermi-Dirac prime. Every positive integer n has a unique factorization of the form n = f(s_1)*...*f(s_k) where the s_i are strictly increasing positive integers. The n-th FDH set-system is obtained by repeating this factorization on each index s_i.

Examples

			Let f = A050376. The FD-factorization of 765 is 5*9*17 or f(4)*f(6)*f(10) = f(4)*f(2*3)*f(2*5) with connected components {{{4}},{{2,3},{2,5}}}, so a(765) = 2.
		

Crossrefs

Programs

  • Mathematica
    FDfactor[n_]:=If[n===1,{},Sort[Join@@Cases[FactorInteger[n],{p_,k_}:>Power[p,Cases[Position[IntegerDigits[k,2]//Reverse,1],{m_}->2^(m-1)]]]]];
    csm[s_]:=With[{c=Select[Tuples[Range[Length[s]],2],And[OrderedQ[#],UnsameQ@@#,Length[Intersection@@s[[#]]]>1]&]},If[c=={},s,csm[Union[Append[Delete[s,List/@c[[1]]],Union@@s[[c[[1]]]]]]]]];
    nn=100;FDprimeList=Array[FDfactor,nn,1,Union];FDrules=MapIndexed[(#1->#2[[1]])&,FDprimeList];
    Table[Length[csm[FDfactor[#]/.FDrules&/@(FDfactor[n]/.FDrules)]],{n,nn}]

A326032 a(2^x + ... + 2^z) = w(x) + ... + w(z), where x...z are distinct nonnegative integers and w = A000120.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Jul 22 2019

Keywords

Comments

From Robert Israel, Jul 23 2019: (Start)
a(2*n+1)=a(2*n).
a(n)=1 if and only if n > 1 is in A283526. (End)

Examples

			For example, a(6) = a(2^2 + 2^1) = w(2) + w(1) = 2.
		

Crossrefs

Other sequences that are built by replacing 2^k in the binary representation with other numbers: A022290 (Fibonacci), A059590 (factorials), A073642, A089625 (primes), A116549, A326031.

Programs

  • Maple
    Bwt:= proc(n) option remember; convert(convert(n,base,2),`+`) end proc:
    f:= proc(n) local L,i;
      L:= convert(n,base,2);
      add(L[i]*Bwt(i-1),i=1..nops(L))
    end proc:
    map(f, [$0..100]); # Robert Israel, Jul 23 2019
  • Mathematica
    bpe[n_]:=Join@@Position[Reverse[IntegerDigits[n,2]],1];
    Table[Total[Length/@bpe/@(bpe[n]-1)],{n,0,100}]
Showing 1-5 of 5 results.