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-10 of 29 results. Next

A001358 Semiprimes (or biprimes): products of two primes.

Original entry on oeis.org

4, 6, 9, 10, 14, 15, 21, 22, 25, 26, 33, 34, 35, 38, 39, 46, 49, 51, 55, 57, 58, 62, 65, 69, 74, 77, 82, 85, 86, 87, 91, 93, 94, 95, 106, 111, 115, 118, 119, 121, 122, 123, 129, 133, 134, 141, 142, 143, 145, 146, 155, 158, 159, 161, 166, 169, 177, 178, 183, 185, 187
Offset: 1

Views

Author

Keywords

Comments

Numbers of the form p*q where p and q are primes, not necessarily distinct.
These numbers are sometimes called semiprimes or 2-almost primes.
Numbers n such that Omega(n) = 2 where Omega(n) = A001222(n) is the sum of the exponents in the prime decomposition of n.
Complement of A100959; A064911(a(n)) = 1. - Reinhard Zumkeller, Nov 22 2004
The graph of this sequence appears to be a straight line with slope 4. However, the asymptotic formula shows that the linearity is an illusion and in fact a(n)/n ~ log(n)/log(log(n)) goes to infinity. See also the graph of A066265 = number of semiprimes < 10^n.
For numbers between 33 and 15495, semiprimes are more plentiful than any other k-almost prime. See A125149.
Numbers that are divisible by exactly 2 prime powers (not including 1). - Jason Kimberley, Oct 02 2011
The (disjoint) union of A006881 and A001248. - Jason Kimberley, Nov 11 2015
An equivalent definition of this sequence is a'(n) = smallest composite number which is not divided by any smaller composite number a'(1),...,a'(n-1). - Meir-Simchah Panzer, Jun 22 2016
The above characterization can be simplified to "Composite numbers not divisible by a smaller term." This shows that this is the equivalent of primes computed via Eratosthenes's sieve, but starting with the set of composite numbers (i.e., complement of 1 union primes) instead of all positive integers > 1. It's easy to see that iterating the method (using Eratosthenes's sieve each time on the remaining numbers, complement of the previously computed set) yields numbers with bigomega = k for k = 0, 1, 2, 3, ..., i.e., {1}, A000040, this, A014612, etc. - M. F. Hasler, Apr 24 2019
For all n except n = 2, a(n) is a deficient number. - Amrit Awasthi, Sep 10 2024
It is reasonable to assume that the "comforting numbers" which John T. Williams found in Chapter 3 of Milne's book "The House at Pooh Corner" are these semiprimes. Winnie-the-Pooh wonders whether he has 14 or 15 honey pots and concludes: "It's sort of comforting." To arrange a semiprime number of honey pots in a rectangular way, let's say on a shelf, with the larger divisor parallel to the wall, there is only one solution and this is for a simple mind like Winnie-the-Pooh comforting. - Ruediger Jehn, Dec 12 2024

Examples

			From _Gus Wiseman_, May 27 2021: (Start)
The sequence of terms together with their prime factors begins:
   4 = 2*2     46 = 2*23     91 = 7*13    141 = 3*47
   6 = 2*3     49 = 7*7      93 = 3*31    142 = 2*71
   9 = 3*3     51 = 3*17     94 = 2*47    143 = 11*13
  10 = 2*5     55 = 5*11     95 = 5*19    145 = 5*29
  14 = 2*7     57 = 3*19    106 = 2*53    146 = 2*73
  15 = 3*5     58 = 2*29    111 = 3*37    155 = 5*31
  21 = 3*7     62 = 2*31    115 = 5*23    158 = 2*79
  22 = 2*11    65 = 5*13    118 = 2*59    159 = 3*53
  25 = 5*5     69 = 3*23    119 = 7*17    161 = 7*23
  26 = 2*13    74 = 2*37    121 = 11*11   166 = 2*83
  33 = 3*11    77 = 7*11    122 = 2*61    169 = 13*13
  34 = 2*17    82 = 2*41    123 = 3*41    177 = 3*59
  35 = 5*7     85 = 5*17    129 = 3*43    178 = 2*89
  38 = 2*19    86 = 2*43    133 = 7*19    183 = 3*61
  39 = 3*13    87 = 3*29    134 = 2*67    185 = 5*37
(End)
		

References

  • Archimedeans Problems Drive, Eureka, 17 (1954), 8.
  • Raymond Ayoub, An Introduction to the Analytic Theory of Numbers, Amer. Math. Soc., 1963; Chapter II, Problem 60.
  • Edmund Landau, Handbuch der Lehre von der Verteilung der Primzahlen, Vol. 1, Teubner, Leipzig; third edition: Chelsea, New York (1974). See p. 211.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • John T. Williams, Pooh and the Philosophers, Dutton Books, 1995.

Crossrefs

Cf. A064911 (characteristic function).
Cf. A048623, A048639, A000040 (primes), A014612 (products of 3 primes), A014613, A014614, A072000 ("pi" for semiprimes), A065516 (first differences).
Sequences listing r-almost primes, that is, the n such that A001222(n) = r: A000040 (r=1), this sequence (r=2), A014612 (r=3), A014613 (r=4), A014614 (r=5), A046306 (r=6), A046308 (r=7), A046310 (r=8), A046312 (r=9), A046314 (r=10), A069272 (r=11), A069273 (r=12), A069274 (r=13), A069275 (r=14), A069276 (r=15), A069277 (r=16), A069278 (r=17), A069279 (r=18), A069280 (r=19), A069281 (r=20).
These are the Heinz numbers of length-2 partitions, counted by A004526.
The squarefree case is A006881 with odd/even terms A046388/A100484 (except 4).
Including primes gives A037143.
The odd/even terms are A046315/A100484.
Partial sums are A062198.
The prime factors are A084126/A084127.
Grouping by greater factor gives A087112.
The product/sum/difference of prime indices is A087794/A176504/A176506.
Positions of even/odd terms are A115392/A289182.
The terms with relatively prime/divisible prime indices are A300912/A318990.
Factorizations using these terms are counted by A320655.
The prime indices are A338898/A338912/A338913.
Grouping by weight (sum of prime indices) gives A338904, with row sums A024697.
The terms with even/odd weight are A338906/A338907.
The terms with odd/even prime indices are A338910/A338911.
The least/greatest term of weight n is A339114/A339115.

Programs

  • Haskell
    a001358 n = a001358_list !! (n-1)
    a001358_list = filter ((== 2) . a001222) [1..]
    
  • Magma
    [n: n in [2..200] | &+[d[2]: d in Factorization(n)] eq 2]; // Bruno Berselli, Sep 09 2015
    
  • Maple
    A001358 := proc(n) option remember; local a; if n = 1 then 4; else for a from procname(n-1)+1 do if numtheory[bigomega](a) = 2 then return a; end if; end do: end if; end proc:
    seq(A001358(n), n=1..120) ; # R. J. Mathar, Aug 12 2010
  • Mathematica
    Select[Range[200], Plus@@Last/@FactorInteger[#] == 2 &] (* Zak Seidov, Jun 14 2005 *)
    Select[Range[200], PrimeOmega[#]==2&] (* Harvey P. Dale, Jul 17 2011 *)
  • PARI
    select( isA001358(n)={bigomega(n)==2}, [1..199]) \\ M. F. Hasler, Apr 09 2008; added select() Apr 24 2019
    
  • PARI
    list(lim)=my(v=List(),t);forprime(p=2, sqrt(lim), t=p;forprime(q=p, lim\t, listput(v,t*q))); vecsort(Vec(v)) \\ Charles R Greathouse IV, Sep 11 2011
    
  • PARI
    A1358=List(4); A001358(n)={while(#A1358M. F. Hasler, Apr 24 2019
    
  • Python
    from sympy import factorint
    def ok(n): return sum(factorint(n).values()) == 2
    print([k for k in range(1, 190) if ok(k)]) # Michael S. Branicky, Apr 30 2022
    
  • Python
    from math import isqrt
    from sympy import primepi, prime
    def A001358(n):
        def f(x): return int(n+x-sum(primepi(x//prime(k))-k+1 for k in range(1, primepi(isqrt(x))+1)))
        m, k = n, f(n)
        while m != k:
            m, k = k, f(k)
        return m # Chai Wah Wu, Jul 23 2024

Formula

a(n) ~ n*log(n)/log(log(n)) as n -> infinity [Landau, p. 211], [Ayoub].
Recurrence: a(1) = 4; for n > 1, a(n) = smallest composite number which is not a multiple of any of the previous terms. - Amarnath Murthy, Nov 10 2002
A174956(a(n)) = n. - Reinhard Zumkeller, Apr 03 2010
a(n) = A088707(n) - 1. - Reinhard Zumkeller, Feb 20 2012
Sum_{n>=1} 1/a(n)^s = (1/2)*(P(s)^2 + P(2*s)), where P is the prime zeta function. - Enrique Pérez Herrero, Jun 24 2012
sigma(a(n)) + phi(a(n)) - mu(a(n)) = 2*a(n) + 1. mu(a(n)) = ceiling(sqrt(a(n))) - floor(sqrt(a(n))). - Wesley Ivan Hurt, May 21 2013
mu(a(n)) = -Omega(a(n)) + omega(a(n)) + 1, where mu is the Moebius function (A008683), Omega is the count of prime factors with repetition, and omega is the count of distinct prime factors. - Alonso del Arte, May 09 2014
a(n) = A078840(2,n). - R. J. Mathar, Jan 30 2019
A100484 UNION A046315. - R. J. Mathar, Apr 19 2023
Conjecture: a(n)/n ~ (log(n)/log(log(n)))*(1-(M/log(log(n)))) as n -> oo, where M is the Mertens's constant (A077761). - Alain Rocchelli, Feb 02 2025

Extensions

More terms from James Sellers, Aug 22 2000

A339890 Number of odd-length factorizations of n into factors > 1.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Dec 28 2020

Keywords

Examples

			The a(n) factorizations for n = 24, 48, 60, 72, 96, 120:
  24      48          60       72          96          120
  2*2*6   2*3*8       2*5*6    2*4*9       2*6*8       3*5*8
  2*3*4   2*4*6       3*4*5    2*6*6       3*4*8       4*5*6
          3*4*4       2*2*15   3*3*8       4*4*6       2*2*30
          2*2*12      2*3*10   3*4*6       2*2*24      2*3*20
          2*2*2*2*3            2*2*18      2*3*16      2*4*15
                               2*3*12      2*4*12      2*5*12
                               2*2*2*3*3   2*2*2*2*6   2*6*10
                                           2*2*2*3*4   3*4*10
                                                       2*2*2*3*5
		

Crossrefs

The case of set partitions (or n squarefree) is A024429.
The case of partitions (or prime powers) is A027193.
The ordered version is A174726 (even: A174725).
The remaining (even-length) factorizations are counted by A339846.
A000009 counts partitions into odd parts, ranked by A066208.
A001055 counts factorizations, with strict case A045778.
A027193 counts partitions of odd length, ranked by A026424.
A058695 counts partitions of odd numbers, ranked by A300063.
A160786 counts odd-length partitions of odd numbers, ranked by A300272.
A316439 counts factorizations by product and length.
A340101 counts factorizations into odd factors.
A340102 counts odd-length factorizations into odd factors.

Programs

  • Maple
    g:= proc(n, k, t) option remember; `if`(n>k, 0, t)+
          `if`(isprime(n), 0, add(`if`(d>k, 0, g(n/d, d, 1-t)),
              d=numtheory[divisors](n) minus {1, n}))
        end:
    a:= n-> `if`(n<2, 0, g(n$2, 1)):
    seq(a(n), n=1..100);  # Alois P. Heinz, Dec 30 2020
  • Mathematica
    facs[n_]:=If[n<=1,{{}},Join@@Table[Map[Prepend[#,d]&,Select[facs[n/d],Min@@#>=d&]],{d,Rest[Divisors[n]]}]];
    Table[Length[Select[facs[n],OddQ@Length[#]&]],{n,100}]

Formula

a(n) + A339846(n) = A001055(n).

A339846 Number of even-length factorizations of n into factors > 1.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Dec 28 2020

Keywords

Examples

			The a(n) factorizations for n = 12, 16, 24, 36, 48, 72, 96, 120:
  2*6  2*8      3*8      4*9      6*8      8*9      2*48         2*60
  3*4  4*4      4*6      6*6      2*24     2*36     3*32         3*40
       2*2*2*2  2*12     2*18     3*16     3*24     4*24         4*30
                2*2*2*3  3*12     4*12     4*18     6*16         5*24
                         2*2*3*3  2*2*2*6  6*12     8*12         6*20
                                  2*2*3*4  2*2*2*9  2*2*3*8      8*15
                                           2*2*3*6  2*2*4*6      10*12
                                           2*3*3*4  2*3*4*4      2*2*5*6
                                                    2*2*2*12     2*3*4*5
                                                    2*2*2*2*2*3  2*2*2*15
                                                                 2*2*3*10
		

Crossrefs

The case of set partitions (or n squarefree) is A024430.
The case of partitions (or prime powers) is A027187.
The ordered version is A174725, odd: A174726.
The odd-length factorizations are counted by A339890.
A001055 counts factorizations, with strict case A045778.
A001358 lists semiprimes, with squarefree case A006881.
A027187 counts partitions of even length, ranked by A028260.
A058696 counts partitions of even numbers, ranked by A300061.
A316439 counts factorizations by product and length.
A340102 counts odd-length factorizations into odd factors.

Programs

  • Maple
    g:= proc(n, k, t) option remember; `if`(n>k, 0, t)+
          `if`(isprime(n), 0, add(`if`(d>k, 0, g(n/d, d, 1-t)),
              d=numtheory[divisors](n) minus {1, n}))
        end:
    a:= n-> `if`(n=1, 1, g(n$2, 0)):
    seq(a(n), n=1..100);  # Alois P. Heinz, Dec 30 2020
  • Mathematica
    facs[n_]:=If[n<=1,{{}},Join@@Table[Map[Prepend[#,d]&,Select[facs[n/d],Min@@#>=d&]],{d,Rest[Divisors[n]]}]];
    Table[Length[Select[facs[n],EvenQ@Length[#]&]],{n,100}]
  • PARI
    A339846(n, m=n, e=1) = if(1==n, e, sumdiv(n, d, if((d>1)&&(d<=m), A339846(n/d, d, 1-e)))); \\ Antti Karttunen, Oct 22 2023

Formula

a(n) + A339890(n) = A001055(n).

Extensions

Data section extended up to a(105) by Antti Karttunen, Oct 22 2023

A338913 Greater prime index of the n-th semiprime.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Nov 20 2020

Keywords

Comments

A semiprime is a product of any two prime numbers. A prime index of n is a number m such that prime(m) divides n. The multiset of prime indices of n is row n of A112798.
After the first three terms, there appear to be no adjacent equal terms.

Examples

			The semiprimes are:
  2*2, 2*3, 3*3, 2*5, 2*7, 3*5, 3*7, 2*11, 5*5, 2*13, ...
so the greater prime factors are:
  2, 3, 3, 5, 7, 5, 7, 11, 5, 13, ...
with indices:
  1, 2, 2, 3, 4, 3, 4, 5, 3, 6, ...
		

Crossrefs

A115392 lists positions of first appearances of each positive integer.
A270652 is the squarefree case, with lesser part A270650.
A338898 has this as second column.
A338912 is the corresponding lesser prime index.
A001221 counts distinct prime indices.
A001222 counts prime indices.
A001358 lists semiprimes, with odd/even terms A046315/A100484.
A006881 lists squarefree semiprimes, with odd/even terms A046388/A100484.
A087794/A176504/A176506 are product/sum/difference of semiprime indices.
A338910/A338911 list products of pairs of odd/even-indexed primes.

Programs

  • Mathematica
    Table[Max[PrimePi/@First/@FactorInteger[n]],{n,Select[Range[100],PrimeOmega[#]==2&]}]

Formula

a(n) = A000720(A084127(n)).

A338912 Lesser prime index of the n-th semiprime.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Nov 20 2020

Keywords

Comments

A semiprime is a product of any two prime numbers. A prime index of n is a number m such that prime(m) divides n. The multiset of prime indices of n is row n of A112798.

Examples

			The semiprimes are:
  2*2, 2*3, 3*3, 2*5, 2*7, 3*5, 3*7, 2*11, 5*5, 2*13, ...
so the lesser prime factors are:
  2, 2, 3, 2, 2, 3, 3, 2, 5, 2, ...
with indices:
  1, 1, 2, 1, 1, 2, 2, 1, 3, 1, ...
		

Crossrefs

A084126 is the lesser prime factor (not index).
A084127 is the greater factor, with index A338913.
A115392 lists positions of ones.
A128301 lists positions of first appearances of each positive integer.
A270650 is the squarefree case, with greater part A270652.
A338898 has this as first column.
A001221 counts distinct prime indices.
A001222 counts prime indices.
A001358 lists semiprimes, with odds A046315 and evens A100484.
A006881 lists squarefree semiprimes, with odds A046388 and evens A100484.
A087794/A176504/A176506 are product/sum/difference of semiprime indices.
A338910/A338911 list products of pairs of odd/even-indexed primes.

Programs

  • Mathematica
    Table[Min[PrimePi/@First/@FactorInteger[n]],{n,Select[Range[100],PrimeOmega[#]==2&]}]

Formula

a(n) = A000720(A084126(n)).

A340101 Number of factorizations of 2n + 1 into odd factors > 1.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Dec 28 2020

Keywords

Examples

			The factorizations for 2n + 1 = 27, 45, 135, 225, 315, 405, 1155:
  27      45      135       225       315       405         1155
  3*9     5*9     3*45      3*75      5*63      5*81        15*77
  3*3*3   3*15    5*27      5*45      7*45      9*45        21*55
          3*3*5   9*15      9*25      9*35      15*27       33*35
                  3*5*9     15*15     15*21     3*135       3*385
                  3*3*15    5*5*9     3*105     5*9*9       5*231
                  3*3*3*5   3*3*25    5*7*9     3*3*45      7*165
                            3*5*15    3*3*35    3*5*27      11*105
                            3*3*5*5   3*5*21    3*9*15      3*5*77
                                      3*7*15    3*3*5*9     3*7*55
                                      3*3*5*7   3*3*3*15    5*7*33
                                                3*3*3*3*5   3*11*35
                                                            5*11*21
                                                            7*11*15
                                                            3*5*7*11
		

Crossrefs

The version for partitions is A160786, ranked by A300272.
The even version is A340785.
The odd-length case is A340102.
A000009 counts partitions into odd parts, ranked by A066208.
A001055 counts factorizations, with strict case A045778.
A027193 counts partitions of odd length, ranked by A026424.
A058695 counts partitions of odd numbers, ranked by A300063.
A316439 counts factorizations by product and length.
Odd bisection of A001055, and also of A349907.

Programs

  • Maple
    g:= proc(n, k) option remember; `if`(n>k, 0, 1)+
          `if`(isprime(n), 0, add(`if`(d>k, 0, g(n/d, d)),
              d=numtheory[divisors](n) minus {1, n}))
        end:
    a:= n-> g(2*n+1$2):
    seq(a(n), n=0..100);  # Alois P. Heinz, Dec 30 2020
  • Mathematica
    facs[n_]:=If[n<=1,{{}},Join@@Table[Map[Prepend[#,d]&,Select[facs[n/d],Min@@#>=d&]],{d,Rest[Divisors[n]]}]];
    Table[Length[Select[facs[n],OddQ[Times@@#]&]],{n,1,100,2}]
  • PARI
    A001055(n, m=n) = if(1==n, 1, my(s=0); fordiv(n, d, if((d>1)&&(d<=m), s += A001055(n/d, d))); (s)); \\ After code in A001055
    A340101(n) = A001055(n+n+1); \\ Antti Karttunen, Dec 13 2021

Formula

a(n) = A001055(2n+1).
a(n) = A349907(2n+1). - Antti Karttunen, Dec 13 2021

Extensions

Data section extended up to 105 terms by Antti Karttunen, Dec 13 2021

A338904 Irregular triangle read by rows where row n lists all semiprimes whose prime indices sum to n.

Original entry on oeis.org

4, 6, 9, 10, 14, 15, 21, 22, 25, 26, 33, 35, 34, 39, 49, 55, 38, 51, 65, 77, 46, 57, 85, 91, 121, 58, 69, 95, 119, 143, 62, 87, 115, 133, 169, 187, 74, 93, 145, 161, 209, 221, 82, 111, 155, 203, 247, 253, 289, 86, 123, 185, 217, 299, 319, 323, 94, 129, 205
Offset: 2

Views

Author

Gus Wiseman, Nov 28 2020

Keywords

Comments

A semiprime is a product of any two prime numbers. A prime index of n is a number m such that the m-th prime number divides n. The multiset of prime indices of n is row n of A112798.

Examples

			Triangle begins:
   4
   6
   9  10
  14  15
  21  22  25
  26  33  35
  34  39  49  55
  38  51  65  77
  46  57  85  91 121
  58  69  95 119 143
  62  87 115 133 169 187
  74  93 145 161 209 221
  82 111 155 203 247 253 289
  86 123 185 217 299 319 323
  94 129 205 259 341 361 377 391
		

Crossrefs

A004526 gives row lengths.
A024697 gives row sums.
A087112 is a different triangle of semiprimes.
A098350 has antidiagonals with the same distinct terms as these rows.
A338905 is the squarefree case, with row sums A025129.
A338907/A338906 are the union of odd/even rows.
A339114/A339115 are the row minima/maxima.
A001358 lists semiprimes, with odd/even terms A046315/A100484.
A006881 lists squarefree semiprimes, with odd/even terms A046388/A100484.
A014342 is the self-convolution of primes.
A037143 lists primes and semiprimes.
A056239 gives sum of prime indices (Heinz weight).
A062198 gives partial sums of semiprimes.
A084126 and A084127 give the prime factors of semiprimes.
A289182/A115392 list the positions of odd/even terms in A001358.
A332765 gives the greatest squarefree semiprime of weight n.
A338898, A338912, and A338913 give the prime indices of semiprimes, with product A087794, sum A176504, and difference A176506.
A338899, A270650, and A270652 give the prime indices of squarefree semiprimes, with difference A338900.

Programs

  • Mathematica
    Table[Sort[Table[Prime[k]*Prime[n-k],{k,n/2}]],{n,2,10}]

A340102 Number of factorizations of 2n + 1 into an odd number of odd factors > 1.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Dec 30 2020

Keywords

Examples

			The factorizations for 2n + 1 = 135, 225, 315, 405, 675, 1155, 1215:
  135      225      315      405         675         1155      1215
  3*5*9    5*5*9    5*7*9    5*9*9       3*3*75      3*5*77    3*5*81
  3*3*15   3*3*25   3*3*35   3*3*45      3*5*45      3*7*55    3*9*45
           3*5*15   3*5*21   3*5*27      3*9*25      5*7*33    5*9*27
                    3*7*15   3*9*15      5*5*27      3*11*35   9*9*15
                             3*3*3*3*5   5*9*15      5*11*21   3*15*27
                                         3*15*15     7*11*15   3*3*135
                                         3*3*3*5*5             3*3*3*5*9
                                                               3*3*3*3*15
		

Crossrefs

The version for partitions is A160786, ranked by A300272.
The not necessarily odd-length version is A340101.
A000009 counts partitions into odd parts, ranked by A066208.
A001055 counts factorizations, with strict case A045778.
A027193 counts partitions of odd length, ranked by A026424.
A058695 counts partitions of odd numbers, ranked by A300063.
A316439 counts factorizations by product and length.

Programs

  • Maple
    g:= proc(n, k, t) option remember; `if`(n>k, 0, t)+
          `if`(isprime(n), 0, add(`if`(d>k, 0, g(n/d, d, 1-t)),
              d=numtheory[divisors](n) minus {1, n}))
        end:
    a:= n-> `if`(n=0, 0, g(2*n+1$2, 1)):
    seq(a(n), n=0..100);  # Alois P. Heinz, Dec 30 2020
  • Mathematica
    facs[n_]:=If[n<=1,{{}},Join@@Table[Map[Prepend[#,d]&,Select[facs[n/d],Min@@#>=d&]],{d,Rest[Divisors[n]]}]];
    Table[Length[Select[facs[n],OddQ[Length[#]]&&OddQ[Times@@#]&]],{n,1,100,2}];

A122848 Exponential Riordan array (1, x(1+x/2)).

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 0, 0, 3, 1, 0, 0, 3, 6, 1, 0, 0, 0, 15, 10, 1, 0, 0, 0, 15, 45, 15, 1, 0, 0, 0, 0, 105, 105, 21, 1, 0, 0, 0, 0, 105, 420, 210, 28, 1, 0, 0, 0, 0, 0, 945, 1260, 378, 36, 1, 0, 0, 0, 0, 0, 945, 4725, 3150, 630, 45, 1, 0, 0, 0, 0, 0, 0, 10395, 17325, 6930, 990, 55, 1, 0, 0
Offset: 0

Views

Author

Paul Barry, Sep 14 2006

Keywords

Comments

Entries are Bessel polynomial coefficients. Row sums are A000085. Diagonal sums are A122849. Inverse is A122850. Product of A007318 and A122848 gives A100862.
T(n,k) is the number of self-inverse permutations of {1,2,...,n} having exactly k cycles. - Geoffrey Critzer, May 08 2012
Bessel numbers of the second kind. For relations to the Hermite polynomials and the Catalan (A033184 and A009766) and Fibonacci (A011973, A098925, and A092865) matrices, see Yang and Qiao. - Tom Copeland, Dec 18 2013.
Also the inverse Bell transform of the double factorial of odd numbers Product_{k= 0..n-1} (2*k+1) (A001147). For the definition of the Bell transform see A264428 and for cross-references A265604. - Peter Luschny, Dec 31 2015

Examples

			Triangle begins:
    1
    0    1
    0    1    1
    0    0    3    1
    0    0    3    6    1
    0    0    0   15   10    1
    0    0    0   15   45   15    1
    0    0    0    0  105  105   21    1
    0    0    0    0  105  420  210   28    1
    0    0    0    0    0  945 1260  378   36    1
From _Gus Wiseman_, Jan 12 2021: (Start)
As noted above, a(n) is the number of set partitions of {1..n} into k singletons or pairs. This is also the number of set partitions of subsets of {1..n} into n - k pairs. In the first case, row n = 5 counts the following set partitions:
  {{1},{2,3},{4,5}}  {{1},{2},{3},{4,5}}  {{1},{2},{3},{4},{5}}
  {{1,2},{3},{4,5}}  {{1},{2},{3,4},{5}}
  {{1,2},{3,4},{5}}  {{1},{2,3},{4},{5}}
  {{1,2},{3,5},{4}}  {{1,2},{3},{4},{5}}
  {{1},{2,4},{3,5}}  {{1},{2},{3,5},{4}}
  {{1},{2,5},{3,4}}  {{1},{2,4},{3},{5}}
  {{1,3},{2},{4,5}}  {{1},{2,5},{3},{4}}
  {{1,3},{2,4},{5}}  {{1,3},{2},{4},{5}}
  {{1,3},{2,5},{4}}  {{1,4},{2},{3},{5}}
  {{1,4},{2},{3,5}}  {{1,5},{2},{3},{4}}
  {{1,4},{2,3},{5}}
  {{1,4},{2,5},{3}}
  {{1,5},{2},{3,4}}
  {{1,5},{2,3},{4}}
  {{1,5},{2,4},{3}}
In the second case, we have:
  {{1,2},{3,4}}  {{1,2}}  {}
  {{1,2},{3,5}}  {{1,3}}
  {{1,2},{4,5}}  {{1,4}}
  {{1,3},{2,4}}  {{1,5}}
  {{1,3},{2,5}}  {{2,3}}
  {{1,3},{4,5}}  {{2,4}}
  {{1,4},{2,3}}  {{2,5}}
  {{1,4},{2,5}}  {{3,4}}
  {{1,4},{3,5}}  {{3,5}}
  {{1,5},{2,3}}  {{4,5}}
  {{1,5},{2,4}}
  {{1,5},{3,4}}
  {{2,3},{4,5}}
  {{2,4},{3,5}}
  {{2,5},{3,4}}
(End)
		

Crossrefs

Row sums are A000085.
Column sums are A001515.
Same as A049403 but with a first column k = 0.
The same set partitions counted by number of pairs are A100861.
Reversing rows gives A111924 (without column k = 0).
A047884 counts standard Young tableaux by size and greatest row length.
A238123 counts standard Young tableaux by size and least row length.
A320663/A339888 count unlabeled multiset partitions into singletons/pairs.
A322661 counts labeled covering half-loop-graphs.
A339742 counts factorizations into distinct primes or squarefree semiprimes.

Programs

  • Maple
    # The function BellMatrix is defined in A264428.
    BellMatrix(n -> `if`(n<2,1,0), 9); # Peter Luschny, Jan 27 2016
  • Mathematica
    t[n_, k_] := k!*Binomial[n, k]/((2 k - n)!*2^(n - k)); Table[ t[n, k], {n, 0, 11}, {k, 0, n}] // Flatten
    (* Second program: *)
    rows = 12;
    t = Join[{1, 1}, Table[0, rows]];
    T[n_, k_] := BellY[n, k, t];
    Table[T[n, k], {n, 0, rows}, {k, 0, n}] // Flatten (* Jean-François Alcover, Jun 23 2018,after Peter Luschny *)
    sbs[{}]:={{}};sbs[set:{i_,_}]:=Join@@Function[s,(Prepend[#1,s]&)/@sbs[Complement[set,s]]]/@Cases[Subsets[set],{i}|{i,_}];
    Table[Length[Select[sbs[Range[n]],Length[#]==k&]],{n,0,6},{k,0,n}] (* Gus Wiseman, Jan 12 2021 *)
  • PARI
    {T(n,k)=if(2*kn, 0, n!/(2*k-n)!/(n-k)!*2^(k-n))} /* Michael Somos, Oct 03 2006 */
    
  • Sage
    # uses[inverse_bell_transform from A265605]
    multifact_2_1 = lambda n: prod(2*k + 1 for k in (0..n-1))
    inverse_bell_matrix(multifact_2_1, 9) # Peter Luschny, Dec 31 2015

Formula

Number triangle T(n,k) = k!*C(n,k)/((2k-n)!*2^(n-k)).
T(n,k) = A001498(k,n-k). - Michael Somos, Oct 03 2006
E.g.f.: exp(y(x+x^2/2)). - Geoffrey Critzer, May 08 2012
Triangle equals the matrix product A008275*A039755. Equivalently, the n-th row polynomial R(n,x) is given by the Type B Dobinski formula R(n,x) = exp(-x/2)*Sum_{k>=0} P(n,2*k+1)*(x/2)^k/k!, where P(n,x) = x*(x-1)*...*(x-n+1) denotes the falling factorial polynomial. Cf. A113278. - Peter Bala, Jun 23 2014
From Daniel Checa, Aug 28 2022: (Start)
E.g.f. for the m-th column: (x^2/2+x)^m/m!.
T(n,k) = T(n-1,k-1) + (n-1)*T(n-2,k-1) for n>1 and k=1..n, T(0,0) = 1. (End)

A338915 Number of integer partitions of n that have an even number of parts and cannot be partitioned into distinct pairs of not necessarily distinct parts.

Original entry on oeis.org

0, 0, 0, 0, 1, 0, 1, 1, 4, 2, 6, 6, 12, 12, 20, 22, 38, 42, 60, 73, 101, 124, 164, 203, 266, 319, 415, 507, 649, 786, 983, 1198, 1499, 1797, 2234, 2673, 3303, 3952, 4826, 5753, 6999, 8330, 10051, 11943, 14357, 16956, 20322, 23997, 28568, 33657, 39897, 46879
Offset: 0

Views

Author

Gus Wiseman, Dec 10 2020

Keywords

Comments

The multiplicities of such a partition form a non-loop-graphical partition (A339655, A339657).

Examples

			The a(7) = 1 through a(12) = 12 partitions:
  211111  2222      411111    222211      222221      3333
          221111    21111111  331111      611111      222222
          311111              511111      22211111    441111
          11111111            22111111    32111111    711111
                              31111111    41111111    22221111
                              1111111111  2111111111  32211111
                                                      33111111
                                                      42111111
                                                      51111111
                                                      2211111111
                                                      3111111111
                                                      111111111111
For example, the partition y = (3,2,2,1,1,1,1,1) can be partitioned into pairs in just three ways:
  {{1,1},{1,1},{1,2},{2,3}}
  {{1,1},{1,1},{1,3},{2,2}}
  {{1,1},{1,2},{1,2},{1,3}}
None of these is strict, so y is counted under a(12).
		

Crossrefs

The Heinz numbers of these partitions are A320892.
The complement in even-length partitions is A338916.
A000070 counts non-multigraphical partitions of 2n, ranked by A339620.
A000569 counts graphical partitions, ranked by A320922.
A001358 lists semiprimes, with squarefree case A006881.
A058696 counts partitions of even numbers, ranked by A300061.
A209816 counts multigraphical partitions, ranked by A320924.
A320655 counts factorizations into semiprimes.
A322353 counts factorizations into distinct semiprimes.
A339617 counts non-graphical partitions of 2n, ranked by A339618.
A339655 counts non-loop-graphical partitions of 2n, ranked by A339657.
A339656 counts loop-graphical partitions, ranked by A339658.
The following count partitions of even length and give their Heinz numbers:
- A027187 has no additional conditions (A028260).
- A096373 cannot be partitioned into strict pairs (A320891).
- A338914 can be partitioned into strict pairs (A320911).
- A338916 can be partitioned into distinct pairs (A320912).
- A339559 cannot be partitioned into distinct strict pairs (A320894).
- A339560 can be partitioned into distinct strict pairs (A339561).

Programs

  • Mathematica
    smcs[n_]:=If[n<=1,{{}},Join@@Table[Map[Prepend[#,d]&,Select[smcs[n/d],Min@@#>d&]],{d,Select[Rest[Divisors[n]],PrimeOmega[#]==2&]}]];
    Table[Length[Select[IntegerPartitions[n],EvenQ[Length[#]]&&smcs[Times@@Prime/@#]=={}&]],{n,0,10}]

Formula

A027187(n) = a(n) + A338916(n).

Extensions

More terms from Jinyuan Wang, Feb 14 2025
Showing 1-10 of 29 results. Next