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

A101048 Number of partitions of n into semiprimes (a(0) = 1 by convention).

Original entry on oeis.org

1, 0, 0, 0, 1, 0, 1, 0, 1, 1, 2, 0, 2, 1, 3, 2, 3, 1, 5, 3, 5, 4, 7, 4, 9, 7, 10, 8, 13, 10, 17, 13, 18, 17, 25, 21, 29, 25, 34, 34, 43, 37, 51, 49, 61, 59, 73, 69, 89, 87, 103, 103, 124, 122, 148, 149, 172, 176, 206, 208, 244, 248, 281, 293, 337, 344, 391, 405, 456, 479, 537, 553
Offset: 0

Views

Author

Reinhard Zumkeller, Nov 28 2004

Keywords

Comments

Semiprime analog of A000607. a(n) <= A002095(n). - Jonathan Vos Post, Oct 01 2007
Das, Robles, Zaharescu, & Zeindler give an asymptotic formula, see Links. - Charles R Greathouse IV, Jan 20 2023

Examples

			a(12) = #{6 + 6, 4 + 4 + 4} = #{2 * (2*3), 3 * (2*2)} = 2.
		

Crossrefs

Programs

  • Haskell
    a101048 = p a001358_list where
       p _          0 = 1
       p ks'@(k:ks) m = if m < k then 0 else p ks' (m - k) + p ks m
    -- Reinhard Zumkeller, Mar 21 2014
    
  • Maple
    g:=1/product(product(1-x^(ithprime(i)*ithprime(j)),i=1..j),j=1..30): gser:=series(g,x=0,75): seq(coeff(gser,x,n),n=1..71); # Emeric Deutsch, Apr 04 2006
    # second Maple program:
    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,
         `if`(i>n, 0, b(n-i, h(min(n-i, i))))+b(n, h(i-1))))
        end:
    a:= n-> b(n, h(n)):
    seq(a(n), n=0..100);  # Alois P. Heinz, May 19 2021
  • Mathematica
    terms = 100; CoefficientList[1/Product[1 - x^(Prime[i] Prime[j]), {i, 1, PrimePi[Ceiling[terms/2]]}, {j, 1, i}] + O[x]^terms, x] (* Jean-François Alcover, Aug 01 2018 *)
  • PARI
    issemi(n)=if(n<4, return(0)); forprime(p=2,97, if(n%p==0, return(isprime(n/p)))); bigomega(n)==2
    allsemi(v)=for(i=1,#v, if(!issemi(v[i]), return(0))); 1
    a(n)=my(s); if(n<4, return(n==0)); forpart(k=n, if(allsemi(k), s++),[4,n]); s \\ Charles R Greathouse IV, Jan 20 2023

Formula

G.f.: 1/product(product(1-x^(p(i)p(j)), i = 1..j),j = 1..infinity), p(k) is the k-th prime. - Emeric Deutsch, Apr 04 2006

Extensions

a(0) set to 1 by N. J. A. Sloane, Nov 23 2007

A322353 Number of factorizations of n into distinct semiprimes; a(1) = 1 by convention.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Dec 06 2018

Keywords

Comments

A semiprime (A001358) is a product of any two prime numbers. In the even case, these factorizations have A001222(n)/2 factors. - Gus Wiseman, Dec 31 2020
Records 1, 2, 3, 4, 5, 9, 13, 15, 17, ... occur at 1, 60, 210, 840, 1260, 4620, 27720, 30030, 69300, ...

Examples

			a(4) = 1, as there is just one way to factor 4 into distinct semiprimes, namely as {4}.
From _Gus Wiseman_, Dec 31 2020: (Start)
The a(n) factorizations for n = 60, 210, 840, 1260, 4620, 12600, 18480:
  4*15   6*35    4*6*35    4*9*35    4*15*77    4*6*15*35    4*6*10*77
  6*10   10*21   4*10*21   4*15*21   4*21*55    4*6*21*25    4*6*14*55
         14*15   4*14*15   6*10*21   4*33*35    4*9*10*35    4*6*22*35
                 6*10*14   6*14*15   6*10*77    4*9*14*25    4*10*14*33
                           9*10*14   6*14*55    4*10*15*21   4*10*21*22
                                     6*22*35    6*10*14*15   4*14*15*22
                                     10*14*33                6*10*14*22
                                     10*21*22
                                     14*15*22
(End)
		

Crossrefs

Unlabeled multiset partitions of this type are counted by A007717.
The version for partitions is A112020, or A101048 without distinctness.
The non-strict version is A320655.
Positions of zeros include A320892.
Positions of nonzero terms are A320912.
The case of squarefree factors is A339661, or A320656 without distinctness.
Allowing prime factors gives A339839, or A320732 without distinctness.
A322661 counts loop-graphs, ranked by A320461.
A001055 counts factorizations, with strict case A045778.
A001358 lists semiprimes, with squarefree case A006881.
A027187 counts partitions of even length, ranked by A028260.
A037143 lists primes and semiprimes.
A338898/A338912/A338913 give the prime indices of semiprimes.
A339846 counts even-length factorizations, with ordered version A174725.

Programs

Formula

a(n) = Sum_{d|n} (-1)^A001222(d) * A339839(n/d). - Gus Wiseman, Dec 31 2020

A186337 Smallest integer that can be expressed as the sum of one or more consecutive semiprimes in exactly n ways.

Original entry on oeis.org

4, 10, 39, 185, 417, 589, 8351, 40181, 50809, 69195, 2614377, 4044299, 27691722, 110046335, 473061053
Offset: 1

Views

Author

Alois P. Heinz, Feb 18 2011

Keywords

Examples

			a(1) =   4 = A001358(1) is the first semiprime.
a(2) =  10 = A001358(1)+A001358(2) = 4+6 = A001358(4) = 10.
a(3) =  39 = 6 + 9 + 10 + 14 = 10 + 14 + 15 = 39.
a(4) = 185 = 58 + ... + 65 = 39 + ... + 51 = 4 + ... + 33 = 185.
		

Crossrefs

Extensions

a(11)-a(15) from Donovan Johnson, Feb 21 2011

A112022 Number of partitions of n into distinct Chen primes.

Original entry on oeis.org

1, 0, 1, 1, 0, 2, 0, 2, 1, 1, 2, 1, 2, 2, 2, 2, 3, 2, 4, 3, 4, 4, 4, 5, 5, 5, 6, 5, 6, 7, 6, 9, 7, 9, 9, 9, 11, 11, 11, 13, 12, 14, 15, 14, 17, 15, 17, 19, 18, 21, 21, 21, 24, 24, 26, 28, 27, 30, 30, 32, 35, 34, 37, 37, 39, 41, 43, 45, 46, 48, 51, 53, 56, 58, 59, 61, 64, 66, 70, 71, 73
Offset: 0

Views

Author

Reinhard Zumkeller, Aug 26 2005

Keywords

Comments

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

Crossrefs

Programs

  • Mathematica
    terms = 81;
    gf = Times @@ (1 + x^SequencePosition[ PrimeOmega[ Range[terms]], {1, _, 1|2}][[All, 1]]) + O[x]^terms;
    CoefficientList[gf, x] (* Jean-François Alcover, Jul 02 2018 *)
  • PARI
    P=1+O(x^1001); forprime(p=2,1e3,if(bigomega(p+2)<3,P*=1+x^p)); Vec(P) \\ Charles R Greathouse IV, May 13 2013

Formula

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

A186336 Number of ways of representing n as the sum of one or more consecutive semiprimes.

Original entry on oeis.org

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

Views

Author

Alois P. Heinz, Feb 18 2011

Keywords

Examples

			a(4)  = 1:  4 = A001358(1) is the first semiprime.
a(10) = 2: 10 = A001358(1)+A001358(2) = 4+6 = A001358(4) = 10.
a(39) = 3: 39 = 6+9+10+14 = 10+14+15 = 39.
		

Crossrefs

Programs

  • Haskell
    a186336 n = f $ takeWhile (<= n) a001358_list where
       f []       = 0
       f (sp:sps) = g sp sps + f sps
       g spSum []                    = fromEnum (spSum == n)
       g spSum (sp:sps) | spSum < n  = g (sp + spSum) sps
                        | spSum == n = 1
                        | otherwise  = 0
    -- Reinhard Zumkeller, Feb 28 2011
  • Maple
    b:= proc(n) option remember; local k;
          if n=0 then 0
        else for k from b(n-1)+1
               while isprime(k) or 2<>add(i[2], i=ifactors(k)[2])
             do od; k
          fi
        end:
    pis:= proc(n) option remember; local k;
            if n<4 then 0
          elif n=4 then 1
          else k:= pis(n-1);
               k +`if`(b(k+1)=n, 1 ,0)
            fi
          end:
    ssp:= proc(i,j) option remember;
            b(j) + `if`(i=j, 0, ssp(i, j-1))
          end:
    a:= proc(n) option remember; local i, j, cnt, s;
          cnt:= 0;
          j:= pis(n);
          i:= j;
          while i>0 do
            s:= ssp(i,j);
            if sn then j:= j-1
          else cnt:= cnt+1;
               i, j:= i-1, j-1
            fi
          od; cnt
        end:
    seq(a(n), n=0..200);
  • Mathematica
    nmax = 120;
    sp = Select[Range[nmax], PrimeOmega[#] == 2&];
    lsp = Length[sp]; Clear[a]; a[_] = 0;
    Do[n = Total[sp[[i ;; j]]]; a[n] = a[n]+1, {i, 1, lsp}, {j, i, lsp}];
    Table[a[n], {n, 0, nmax}] (* Jean-François Alcover, Mar 13 2019 *)

A280912 Number of partitions of n into odd semiprimes (A046315).

Original entry on oeis.org

1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 1, 0, 0, 2, 0, 0, 2, 1, 1, 2, 0, 0, 3, 1, 0, 3, 1, 1, 3, 1, 0, 4, 2, 2, 5, 1, 1, 5, 3, 1, 6, 3, 2, 8, 2, 1, 7, 5, 4, 9, 4, 3, 11, 6, 3, 11, 6, 6, 14, 7, 5, 15, 9, 7, 16, 9, 8, 20, 14, 9, 21, 13, 11, 26, 16, 12, 28, 19, 17, 29, 19, 17, 37, 27
Offset: 0

Views

Author

Ilya Gutkovskiy, Jan 10 2017

Keywords

Examples

			a(39) = 3 because we have [39], [21, 9, 9] and [15, 15, 9].
		

Crossrefs

Programs

Formula

G.f.: Product_{k>=1} 1/(1 - floor(bigomega(2*k+1)/2)*floor(2/bigomega(2*k+ 1))*x^(2*k+1)), where bigomega(k) is the number of prime divisors of k counted with multiplicity (A001222).

A357236 Number of compositions (ordered partitions) of n into distinct semiprimes.

Original entry on oeis.org

1, 0, 0, 0, 1, 0, 1, 0, 0, 1, 3, 0, 0, 2, 3, 3, 2, 0, 2, 10, 8, 3, 1, 8, 10, 17, 3, 8, 14, 40, 16, 18, 10, 37, 63, 55, 24, 40, 45, 79, 84, 82, 70, 170, 228, 166, 135, 86, 232, 295, 334, 309, 292, 228, 604, 719, 600, 383, 1265, 904, 1020, 840, 867, 1008, 1864, 2569, 2154, 1676, 2414, 3541, 3958
Offset: 0

Views

Author

Ilya Gutkovskiy, Sep 19 2022

Keywords

Crossrefs

Showing 1-7 of 7 results.