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.

Previous Showing 11-20 of 31 results. Next

A072931 Number of ways to write n as a sum of 2 semiprimes.

Original entry on oeis.org

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

Views

Author

Benoit Cloitre, Aug 13 2002

Keywords

Comments

Sequence is probably > 0 for n > 33.
The graph of this sequence is compelling evidence that 33 is the last term of sequence A072966. - T. D. Noe, Apr 10 2007

Crossrefs

Column k=2 of A344447.

Programs

  • Mathematica
    lim = 10000;
    s = Select[Range[lim], PrimeOmega[#] == 2 &];
    c = Tally[ Sort[ Map[ Total, Union[Subsets[s, {2}],
          Table[{s[[i]], s[[i]]}, {i, 1, Length[s]}]]]]];
    a = Table[0, lim];
    i=1; While[c[[i]] [[1]]<=lim, a[[c[[i]] [[1]]]]=c[[i]] [[2]]; i++];
    a (* Robert Price, Mar 30 2019 *)
  • PARI
    a(n)=sum(i=1, n, sum(j=1, i, if(abs(bigomega(i)-2) + abs(bigomega(j)-2) + abs(n-i-j),0,1)))
    
  • PARI
    a(n)=my(s); forprime(p=2,n\4, forprime(q=2,min(n\(2*p),p), if(bigomega(n-p*q)==2, s++))); s \\ Charles R Greathouse IV, Dec 07 2014

Formula

From Reinhard Zumkeller, Jan 21 2010: (Start)
a(A100592(n)) = n;
a(m) < n for m < A100592(n);
A171963(n) = a(A001358(n)). (End)
a(n) = Sum_{i=1..floor(n/2)} [Omega(i) == 2] * [Omega(n-i) == 2], where Omega = A001222 and [] is the Iverson Bracket. - Wesley Ivan Hurt, Apr 04 2018
a(n) = [x^n y^2] 1/Product_{j>=1} (1-y*x^A001358(j)). - Alois P. Heinz, May 21 2021

A338903 Number of integer partitions of the n-th squarefree semiprime into squarefree semiprimes.

Original entry on oeis.org

1, 1, 1, 1, 2, 2, 3, 3, 5, 4, 6, 5, 12, 14, 19, 22, 27, 36, 38, 51, 77, 86, 128, 141, 163, 163, 207, 233, 259, 260, 514, 657, 813, 983, 1010, 1215, 1255, 1720, 2112, 2256, 3171, 3370, 3499, 3864, 4103, 6292, 7313, 7620, 8374, 10650, 17579, 18462, 23034, 25180
Offset: 1

Views

Author

Gus Wiseman, Nov 24 2020

Keywords

Comments

A squarefree semiprime (A006881) is a product of any two distinct prime numbers.

Examples

			The a(n) partitions for n = 1, 5, 7, 9, 10, 11, 13:
  6  21    26       34          35        38           46
     15,6  14,6,6   22,6,6      21,14     26,6,6       34,6,6
           10,10,6  14,14,6     15,14,6   22,10,6      26,14,6
                    14,10,10    15,10,10  14,14,10     21,15,10
                    10,6,6,6,6            14,6,6,6,6   22,14,10
                                          10,10,6,6,6  26,10,10
                                                       15,15,10,6
                                                       22,6,6,6,6
                                                       14,14,6,6,6
                                                       14,10,10,6,6
                                                       10,10,10,10,6
                                                       10,6,6,6,6,6,6
		

Crossrefs

A002100 counts partitions into squarefree semiprimes.
A056768 uses primes instead of squarefree semiprimes.
A101048 counts partitions into semiprimes.
A338902 is the not necessarily squarefree version.
A339113 includes the Heinz numbers of these partitions.
A001358 lists semiprimes, with odd and even terms A046315 and A100484.
A006881 lists squarefree semiprimes, with odd and even terms A046388 and A100484.
A320656 counts factorizations into squarefree semiprimes.
A338898/A338912/A338913 give prime indices of semiprimes, with sum/difference/product A176504/A176506/A087794.
A338899, A270650, and A270652 give the prime indices of squarefree semiprimes.

Programs

  • Mathematica
    nn=100;
    sqs=Select[Range[nn],SquareFreeQ[#]&&PrimeOmega[#]==2&];
    Table[Length[IntegerPartitions[n,All,sqs]],{n,sqs}]

Formula

a(n) = A002100(A006881(n)).

A339844 Number of distinct sorted degree sequences among all n-vertex loop-graphs.

Original entry on oeis.org

1, 2, 6, 16, 51, 162, 554, 1918, 6843, 24688, 90342, 333308, 1239725
Offset: 0

Views

Author

Gus Wiseman, Dec 27 2020

Keywords

Comments

In the covering case, these degree sequences, sorted in decreasing order, are the same thing as loop-graphical partitions (A339656). An integer partition is loop-graphical if it comprises the multiset of vertex-degrees of some graph with loops, where a loop is an edge with two equal vertices.
The following are equivalent characteristics for any positive integer n:
(1) the prime indices of n can be partitioned into distinct pairs, i.e. into a set of loops and edges;
(2) n can be factored into distinct semiprimes;
(3) the prime signature of n is loop-graphical.

Examples

			The a(0) = 1 through a(3) = 16 sorted degree sequences:
  ()  (0)  (0,0)  (0,0,0)
      (2)  (0,2)  (0,0,2)
           (1,1)  (0,1,1)
           (1,3)  (0,1,3)
           (2,2)  (0,2,2)
           (3,3)  (0,3,3)
                  (1,1,2)
                  (1,1,4)
                  (1,2,3)
                  (1,3,4)
                  (2,2,2)
                  (2,2,4)
                  (2,3,3)
                  (2,4,4)
                  (3,3,4)
                  (4,4,4)
For example, the loop-graphs
  {{1,1},{2,2},{3,3},{1,2}}
  {{1,1},{2,2},{3,3},{1,3}}
  {{1,1},{2,2},{3,3},{2,3}}
  {{1,1},{2,2},{1,3},{2,3}}
  {{1,1},{3,3},{1,2},{2,3}}
  {{2,2},{3,3},{1,2},{1,3}}
all have degrees y = (3,3,2), so y is counted under a(3).
		

Crossrefs

See link for additional cross references.
The version without loops is A004251, with covering case A095268.
The half-loop version is A029889, with covering case A339843.
Loop-graphs are counted by A322661 and ranked by A320461 and A340020.
The covering case (no zeros) is A339845.
A007717 counts unlabeled multiset partitions into pairs.
A027187 counts partitions of even length, with Heinz numbers A028260.
A058696 counts partitions of even numbers, ranked by A300061.
A101048 counts partitions into semiprimes.
A339655 counts non-loop-graphical partitions of 2n.
A339656 counts loop-graphical partitions of 2n.
A339659 counts graphical partitions of 2n into k parts.

Programs

  • Mathematica
    Table[Length[Union[Sort[Table[Count[Join@@#,i],{i,n}]]&/@Subsets[Subsets[Range[n],{1,2}]/.{x_Integer}:>{x,x}]]],{n,0,5}]

Extensions

a(7)-a(12) from Andrew Howroyd, Jan 10 2024

A112020 Number of partitions of n into distinct semiprimes.

Original entry on oeis.org

1, 0, 0, 0, 1, 0, 1, 0, 0, 1, 2, 0, 0, 1, 2, 2, 1, 0, 1, 3, 2, 2, 1, 2, 3, 5, 2, 2, 3, 5, 4, 5, 3, 4, 6, 9, 6, 5, 6, 10, 10, 9, 7, 9, 12, 14, 12, 11, 14, 18, 17, 16, 16, 19, 21, 24, 21, 23, 26, 29, 30, 32, 31, 33, 39, 40, 39, 41, 45, 49, 54, 53, 54, 59, 68, 66, 68, 70, 78, 82, 88, 86, 93, 101
Offset: 0

Views

Author

Reinhard Zumkeller, Aug 26 2005

Keywords

Examples

			For n=4 one partition: {2*2}.
For n=6 one partition: {2*3}.
For n=10 two partitions: {2*2+2*3,2*5}.
		

Crossrefs

Programs

  • Maple
    h:= proc(n) option remember; `if`(n=0, 0,
         `if`(numtheory[bigomega](n)=2, n, h(n-1)))
        end:
    b:= proc(n, i) option remember; `if`(n=0, 1, `if`(i<1, 0,
          b(n-i, h(min(n-i, i-1)))+b(n, h(i-1))))
        end:
    a:= n-> b(n, h(n)):
    seq(a(n), n=0..100);  # Alois P. Heinz, Mar 19 2024
  • Mathematica
    nmax = 100;
    CoefficientList[Series[Product[1+x^(Prime[j] Prime[k]), {j, 1, nmax}, {k, j, nmax}], {x, 0, nmax}], x] (* Jean-François Alcover, Nov 10 2021 *)

A339845 Number of distinct sorted degree sequences among all n-vertex loop-graphs without isolated vertices.

Original entry on oeis.org

1, 1, 4, 10, 35, 111, 392, 1364, 4925, 17845, 65654, 242966, 906417
Offset: 0

Views

Author

Gus Wiseman, Dec 27 2020

Keywords

Comments

In the covering case, these degree sequences, sorted in decreasing order, are the same thing as loop-graphical partitions (A339656). An integer partition is loop-graphical if it comprises the multiset of vertex-degrees of some graph with loops, where a loop is an edge with two equal vertices.
The following are equivalent characteristics for any positive integer n:
(1) the prime indices of n can be partitioned into distinct pairs, i.e. into a set of loops and edges;
(2) n can be factored into distinct semiprimes;
(3) the prime signature of n is loop-graphical.

Examples

			The a(0) = 1 through a(3) = 10 sorted degree sequences:
  ()  (2)  (1,1)  (1,1,2)
           (1,3)  (1,1,4)
           (2,2)  (1,2,3)
           (3,3)  (1,3,4)
                  (2,2,2)
                  (2,2,4)
                  (2,3,3)
                  (2,4,4)
                  (3,3,4)
                  (4,4,4)
For example, the loop-graphs
  {{1,1},{2,2},{3,3},{1,2}}
  {{1,1},{2,2},{3,3},{1,3}}
  {{1,1},{2,2},{3,3},{2,3}}
  {{1,1},{2,2},{1,3},{2,3}}
  {{1,1},{3,3},{1,2},{2,3}}
  {{2,2},{3,3},{1,2},{1,3}}
all have degrees y = (3,3,2), so y is counted under a(3).
		

Crossrefs

See link for additional cross references.
The version without loops is A004251, with covering case A095268.
The half-loop version is A029889, with covering case A339843.
Loop-graphs are counted by A322661 and ranked by A320461 and A340020.
Counting the same partitions by sum gives A339656.
These partitions are ranked by A339658.
The non-covering case (zeros allowed) is A339844.
A007717 counts unlabeled multiset partitions into pairs.
A027187 counts partitions of even length, ranked by A028260.
A058696 counts partitions of even numbers, ranked by A300061.
A101048 counts partitions into semiprimes.
A339655 counts non-loop-graphical partitions of 2n.
A339659 counts graphical partitions of 2n into k parts.

Programs

  • Mathematica
    Table[Length[Union[Sort[Table[Count[Join@@#,i],{i,n}]]&/@Select[Subsets[Subsets[Range[n],{1,2}]/.{x_Integer}:>{x,x}],Union@@#==Range[n]&]]],{n,0,5}]

Formula

a(n) = A339844(n) - A339844(n-1) for n > 0. - Andrew Howroyd, Jan 10 2024

Extensions

a(7)-a(12) from Andrew Howroyd, Jan 10 2024

A338902 Number of integer partitions of the n-th semiprime into semiprimes.

Original entry on oeis.org

1, 1, 1, 2, 3, 2, 4, 7, 7, 10, 17, 25, 21, 34, 34, 73, 87, 103, 149, 176, 206, 281, 344, 479, 725, 881, 1311, 1597, 1742, 1841, 2445, 2808, 3052, 3222, 6784, 9298, 11989, 14533, 15384, 17414, 18581, 19680, 28284, 35862, 38125, 57095, 60582, 64010, 71730, 76016
Offset: 1

Views

Author

Gus Wiseman, Nov 24 2020

Keywords

Comments

A semiprime (A001358) is a product of any two prime numbers.

Examples

			The a(1) = 1 through a(33) = 17 partitions of 4, 6, 9, 10, 14, 15, 21, 22, 25, 26, 33, where A-Z = 10-35:
  4  6  9  A   E    F   L     M      P      Q       X
           64  A4   96  F6    994    FA     M4      EA9
               644      966   A66    L4     AA6     F99
                        9444  E44    A96    E66     FE4
                              6664   F64    9944    L66
                              A444   9664   A664    P44
                              64444  94444  E444    9996
                                            66644   AA94
                                            A4444   E964
                                            644444  F666
                                                    FA44
                                                    L444
                                                    96666
                                                    A9644
                                                    F6444
                                                    966444
                                                    9444444
		

Crossrefs

A002100 counts partitions into squarefree semiprimes.
A056768 uses primes instead of semiprimes.
A101048 counts partitions into semiprimes.
A338903 is the squarefree version.
A339112 includes the Heinz numbers of these partitions.
A001358 lists semiprimes, with odd and even terms A046315 and A100484.
A037143 lists primes and semiprimes.
A084126 and A084127 give the prime factors of semiprimes.
A320655 counts factorizations into semiprimes.
A338898/A338912/A338913 give prime indices of semiprimes, with sum/difference/product A176504/A176506/A087794.
A338899/A270650/A270652 give prime indices of squarefree semiprimes.

Programs

  • Mathematica
    nn=100;Table[Length[IntegerPartitions[n,All,Select[Range[nn],PrimeOmega[#]==2&]]],{n,Select[Range[nn],PrimeOmega[#]==2&]}]

Formula

a(n) = A101048(A001358(n)).

A101049 Number of partitions of n into parts having at most two prime-factors.

Original entry on oeis.org

1, 2, 3, 5, 7, 11, 15, 21, 29, 40, 53, 71, 93, 122, 158, 203, 259, 329, 415, 521, 651, 809, 1001, 1234, 1515, 1853, 2258, 2743, 3321, 4009, 4825, 5791, 6932, 8277, 9859, 11715, 13889, 16431, 19398, 22854, 26873, 31539, 36949, 43210, 50446, 58796, 68419
Offset: 1

Views

Author

Reinhard Zumkeller, Nov 28 2004

Keywords

Examples

			n=10 has two partitions with parts having more than two
prime-factors: 10 = 2*2*2 + 2 = 2*2*2 + 1 + 1, therefore
a(10) = A000041(10) - 2 = 42 - 2 = 40.
		

Crossrefs

Programs

A112021 Number of partitions of n into Chen primes.

Original entry on oeis.org

0, 1, 1, 1, 2, 2, 3, 3, 4, 5, 6, 7, 9, 10, 12, 14, 17, 19, 23, 26, 30, 35, 40, 46, 52, 60, 67, 77, 87, 98, 111, 124, 140, 157, 175, 197, 219, 244, 272, 302, 336, 372, 412, 456, 503, 556, 613, 675, 742, 816, 896, 983, 1078, 1180, 1291, 1411, 1542, 1683, 1836, 2001, 2178
Offset: 1

Views

Author

Reinhard Zumkeller, Aug 26 2005

Keywords

Comments

a(n) = A000607(n) for n <= 42.

Crossrefs

Programs

  • Mathematica
    fQ[n_] := PrimeQ@n && (PrimeQ[n + 2] || 2 == Plus @@ Last /@ FactorInteger[n + 2]); f[n_] := Block[{c = k = 0, l = PartitionsP@n, p = Union /@ IntegerPartitions@n}, While[k++; k < l, If[Union[fQ /@ p[[k]]] == {True}, c++ ]]; c]; lst = {}; Do[ AppendTo[lst, f[n]], {n, 61}]; lst (* or *)
    Rest@ CoefficientList[ Series[1/Times @@ (1 - x^Select[ Range@100, fQ@# &]), {x, 0, 61}], x] (* Robert G. Wilson v, Jun 16 2006 *)
  • PARI
    ok(n)={isprime(n) && bigomega(n+2)<3}
    {my(n=80); Vec(prod(k=1, n, if(ok(k), 1/(1-x^k) + O(x*x^n), 1))-1,-n)} \\ Andrew Howroyd, Dec 28 2017

Formula

G.f.: Product_{k>=1} 1/(1 - x^A109611(k)). - Andrew Howroyd, Dec 28 2017

A116357 Number of partitions of n into products of two successive primes (A006094).

Original entry on oeis.org

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

Views

Author

Reinhard Zumkeller, Feb 12 2006

Keywords

Comments

a(A116358(n)) = 0; a(A116359(n)) > 0;
a(n) < A101048(n).

Examples

			a(41) = #{2*3 + 5*7} = 1;
a(42) = #{2*3+2*3+2*3+2*3+2*3+2*3+2*3, 2*3+2*3+3*5+3*5} = 2.
		

Crossrefs

Programs

  • Maple
    N:= 200: # to get a(1) to a(N)
    Primes:= select(isprime,[2,seq(i,i=3..1+floor(sqrt(N)),2)]):
    G:= mul(1/(1 - x^(Primes[i]*Primes[i+1])), i=1..nops(Primes)-1):
    S:= series(G,x,N+1):
    seq(coeff(S,x,j),j=1..N); # Robert Israel, Dec 09 2016
  • Mathematica
    m = 105; kmax = PrimePi[Sqrt[m]]; Product[1/(1-x^(Prime[k]*Prime[k+1])), {k, 1, kmax}] + O[x]^(m+1) // CoefficientList[#, x]& // Rest (* Jean-François Alcover, Mar 09 2019, after Robert Israel *)

Formula

G.f.: Product_{k >= 1} 1/(1 - x^(prime(k)*prime(k+1))). - Robert Israel, Dec 09 2016

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
Previous Showing 11-20 of 31 results. Next