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 13 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

A035363 Number of partitions of n into even parts.

Original entry on oeis.org

1, 0, 1, 0, 2, 0, 3, 0, 5, 0, 7, 0, 11, 0, 15, 0, 22, 0, 30, 0, 42, 0, 56, 0, 77, 0, 101, 0, 135, 0, 176, 0, 231, 0, 297, 0, 385, 0, 490, 0, 627, 0, 792, 0, 1002, 0, 1255, 0, 1575, 0, 1958, 0, 2436, 0, 3010, 0, 3718, 0, 4565, 0, 5604, 0, 6842, 0, 8349, 0, 10143, 0, 12310, 0
Offset: 0

Views

Author

Keywords

Comments

Convolved with A036469 = A000070. - Gary W. Adamson, Jun 09 2009
Note that these partitions are located in the head of the last section of the set of partitions of n (see A135010). - Omar E. Pol, Nov 20 2009
Number of symmetric unimodal compositions of n+2 where the maximal part appears twice, see example. Also number of symmetric unimodal compositions of n where the maximal part appears an even number of times. - Joerg Arndt, Jun 11 2013
Number of partitions of n having parts of even multiplicity. These are the conjugates of the partitions from the definition. Example: a(8)=5 because we have [4,4],[3,3,1,1],[2,2,2,2],[2,2,1,1,1,1], and [1,1,1,1,1,1,1,1]. - Emeric Deutsch, Jan 27 2016
From Gus Wiseman, May 22 2021: (Start)
The Heinz numbers of the conjugate partitions described in Emeric Deutsch's comment above are given by A000290.
For n > 1, also the number of integer partitions of n-1 whose only odd part is the smallest. The Heinz numbers of these partitions are given by A341446. For example, the a(2) = 1 through a(14) = 15 partitions (empty columns shown as dots, A..D = 10..13) are:
1 . 3 . 5 . 7 . 9 . B . D
21 41 43 63 65 85
221 61 81 83 A3
421 441 A1 C1
2221 621 443 643
4221 641 661
22221 821 841
4421 A21
6221 4441
42221 6421
222221 8221
44221
62221
422221
2222221
Also the number of integer partitions of n whose greatest part is the sum of all the other parts. The Heinz numbers of these partitions are given by A344415. For example, the a(2) = 1 through a(12) = 11 partitions (empty columns not shown) are:
(11) (22) (33) (44) (55) (66)
(211) (321) (422) (532) (633)
(3111) (431) (541) (642)
(4211) (5221) (651)
(41111) (5311) (6222)
(52111) (6321)
(511111) (6411)
(62211)
(63111)
(621111)
(6111111)
Also the number of integer partitions of n of length n/2. The Heinz numbers of these partitions are given by A340387. For example, the a(2) = 1 through a(14) = 15 partitions (empty columns not shown) are:
(2) (22) (222) (2222) (22222) (222222) (2222222)
(31) (321) (3221) (32221) (322221) (3222221)
(411) (3311) (33211) (332211) (3322211)
(4211) (42211) (333111) (3332111)
(5111) (43111) (422211) (4222211)
(52111) (432111) (4322111)
(61111) (441111) (4331111)
(522111) (4421111)
(531111) (5222111)
(621111) (5321111)
(711111) (5411111)
(6221111)
(6311111)
(7211111)
(8111111)
(End)

Examples

			From _Joerg Arndt_, Jun 11 2013: (Start)
There are a(12)=11 symmetric unimodal compositions of 12+2=14 where the maximal part appears twice:
01:  [ 1 1 1 1 1 2 2 1 1 1 1 1 ]
02:  [ 1 1 1 1 3 3 1 1 1 1 ]
03:  [ 1 1 1 4 4 1 1 1 ]
04:  [ 1 1 2 3 3 2 1 1 ]
05:  [ 1 1 5 5 1 1 ]
06:  [ 1 2 4 4 2 1 ]
07:  [ 1 6 6 1 ]
08:  [ 2 2 3 3 2 2 ]
09:  [ 2 5 5 2 ]
10:  [ 3 4 4 3 ]
11:  [ 7 7 ]
There are a(14)=15 symmetric unimodal compositions of 14 where the maximal part appears an even number of times:
01:  [ 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ]
02:  [ 1 1 1 1 1 2 2 1 1 1 1 1 ]
03:  [ 1 1 1 1 3 3 1 1 1 1 ]
04:  [ 1 1 1 2 2 2 2 1 1 1 ]
05:  [ 1 1 1 4 4 1 1 1 ]
06:  [ 1 1 2 3 3 2 1 1 ]
07:  [ 1 1 5 5 1 1 ]
08:  [ 1 2 2 2 2 2 2 1 ]
09:  [ 1 2 4 4 2 1 ]
10:  [ 1 3 3 3 3 1 ]
11:  [ 1 6 6 1 ]
12:  [ 2 2 3 3 2 2 ]
13:  [ 2 5 5 2 ]
14:  [ 3 4 4 3 ]
15:  [ 7 7 ]
(End)
a(8)=5 because we  have [8], [6,2], [4,4], [4,2,2], and [2,2,2,2]. - _Emeric Deutsch_, Jan 27 2016
From _Gus Wiseman_, May 22 2021: (Start)
The a(0) = 1 through a(12) = 11 partitions into even parts are the following (empty columns shown as dots, A = 10, C = 12). The Heinz numbers of these partitions are given by A066207.
  ()  .  (2)  .  (4)   .  (6)    .  (8)     .  (A)      .  (C)
                 (22)     (42)      (44)       (64)        (66)
                          (222)     (62)       (82)        (84)
                                    (422)      (442)       (A2)
                                    (2222)     (622)       (444)
                                               (4222)      (642)
                                               (22222)     (822)
                                                           (4422)
                                                           (6222)
                                                           (42222)
                                                           (222222)
(End)
		

References

  • Mohammad K. Azarian, A Generalization of the Climbing Stairs Problem, Mathematics and Computer Education, Vol. 31, No. 1, pp. 24-28, Winter 1997. MathEduc Database (Zentralblatt MATH, 1997c.01891).
  • Mohammad K. Azarian, A Generalization of the Climbing Stairs Problem II, Missouri Journal of Mathematical Sciences, Vol. 16, No. 1, Winter 2004, pp. 12-17. Zentralblatt MATH, Zbl 1071.05501.

Crossrefs

Bisection (even part) gives the partition numbers A000041.
Column k=0 of A103919, A264398.
Note: A-numbers of ranking sequences are in parentheses below.
The version for odd instead of even parts is A000009 (A066208).
The version for parts divisible by 3 instead of 2 is A035377.
The strict case is A035457.
The Heinz numbers of these partitions are given by A066207.
The ordered version (compositions) is A077957 prepended by (1,0).
This is column k = 2 of A168021.
The multiplicative version (factorizations) is A340785.
A000569 counts graphical partitions (A320922).
A004526 counts partitions of length 2 (A001358).
A025065 counts palindromic partitions (A265640).
A027187 counts partitions with even length/maximum (A028260/A244990).
A058696 counts partitions of even numbers (A300061).
A067661 counts strict partitions of even length (A030229).
A236913 counts partitions of even length and sum (A340784).
A340601 counts partitions of even rank (A340602).
The following count partitions of even length:
- A096373 cannot be partitioned into strict pairs (A320891).
- A338914 can be partitioned into strict pairs (A320911).
- A338915 cannot be partitioned into distinct pairs (A320892).
- 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

  • Maple
    ZL:= [S, {C = Cycle(B), S = Set(C), E = Set(B), B = Prod(Z,Z)}, unlabelled]: seq(combstruct[count](ZL, size=n), n=0..69); # Zerinvary Lajos, Mar 26 2008
    g := 1/mul(1-x^(2*k), k = 1 .. 100): gser := series(g, x = 0, 80): seq(coeff(gser, x, n), n = 0 .. 78); # Emeric Deutsch, Jan 27 2016
    # Using the function EULER from Transforms (see link at the bottom of the page).
    [1,op(EULER([0,1,seq(irem(n,2),n=0..66)]))]; # Peter Luschny, Aug 19 2020
    # next Maple program:
    a:= n-> `if`(n::odd, 0, combinat[numbpart](n/2)):
    seq(a(n), n=0..84);  # Alois P. Heinz, Jun 22 2021
  • Mathematica
    nmax = 50; s = Range[2, nmax, 2];
    Table[Count[IntegerPartitions@n, x_ /; SubsetQ[s, x]], {n, 0, nmax}] (* Robert Price, Aug 05 2020 *)
  • Python
    from sympy import npartitions
    def A035363(n): return 0 if n&1 else npartitions(n>>1) # Chai Wah Wu, Sep 23 2023

Formula

G.f.: Product_{k even} 1/(1 - x^k).
Convolution with the number of partitions into distinct parts (A000009, which is also number of partitions into odd parts) gives the number of partitions (A000041). - Franklin T. Adams-Watters, Jan 06 2006
If n is even then a(n)=A000041(n/2) otherwise a(n)=0. - Omar E. Pol, Nov 20 2009
G.f.: 1 + x^2*(1 - G(0))/(1-x^2) where G(k) = 1 - 1/(1-x^(2*k+2))/(1-x^2/(x^2-1/G(k+1) )); (recursively defined continued fraction). - Sergei N. Gladkovskii, Jan 23 2013
a(n) = A096441(n) - A000009(n), n >= 1. - Omar E. Pol, Aug 16 2013
G.f.: exp(Sum_{k>=1} x^(2*k)/(k*(1 - x^(2*k)))). - Ilya Gutkovskiy, Aug 13 2018

A338906 Semiprimes whose prime indices sum to an even number.

Original entry on oeis.org

4, 9, 10, 21, 22, 25, 34, 39, 46, 49, 55, 57, 62, 82, 85, 87, 91, 94, 111, 115, 118, 121, 129, 133, 134, 146, 155, 159, 166, 169, 183, 187, 194, 203, 205, 206, 213, 218, 235, 237, 247, 253, 254, 259, 267, 274, 289, 295, 298, 301, 303, 314, 321, 334, 335, 339
Offset: 1

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

			The sequence of terms together with their prime indices begins:
      4: {1,1}      87: {2,10}    183: {2,18}    274: {1,33}
      9: {2,2}      91: {4,6}     187: {5,7}     289: {7,7}
     10: {1,3}      94: {1,15}    194: {1,25}    295: {3,17}
     21: {2,4}     111: {2,12}    203: {4,10}    298: {1,35}
     22: {1,5}     115: {3,9}     205: {3,13}    301: {4,14}
     25: {3,3}     118: {1,17}    206: {1,27}    303: {2,26}
     34: {1,7}     121: {5,5}     213: {2,20}    314: {1,37}
     39: {2,6}     129: {2,14}    218: {1,29}    321: {2,28}
     46: {1,9}     133: {4,8}     235: {3,15}    334: {1,39}
     49: {4,4}     134: {1,19}    237: {2,22}    335: {3,19}
     55: {3,5}     146: {1,21}    247: {6,8}     339: {2,30}
     57: {2,8}     155: {3,11}    253: {5,9}     341: {5,11}
     62: {1,11}    159: {2,16}    254: {1,31}    358: {1,41}
     82: {1,13}    166: {1,23}    259: {4,12}    361: {8,8}
     85: {3,7}     169: {6,6}     267: {2,24}    365: {3,21}
		

Crossrefs

A031215 looks at primes instead of semiprimes.
A098350 has this as union of even-indexed antidiagonals.
A300061 looks at all numbers (not just semiprimes).
A338904 has this as union of even-indexed rows.
A338907 is the odd version.
A338908 is the squarefree case.
A001358 lists semiprimes, with odd/even terms A046315/A100484.
A006881 lists squarefree semiprimes, with odd/even terms A046388/A100484.
A056239 gives the sum of prime indices (Heinz weight).
A084126 and A084127 give the prime factors of semiprimes.
A087112 groups semiprimes by greater factor.
A289182/A115392 list the positions of odd/even terms in A001358.
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.
A338911 lists products of pairs of primes both of even index.
A339114/A339115 give the least/greatest semiprime of weight n.

Programs

  • Mathematica
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    Select[Range[100],PrimeOmega[#]==2&&EvenQ[Total[primeMS[#]]]&]
  • Python
    from math import isqrt
    from sympy import primepi, primerange
    def A338906(n):
        def bisection(f,kmin=0,kmax=1):
            while f(kmax) > kmax: kmax <<= 1
            kmin = kmax >> 1
            while kmax-kmin > 1:
                kmid = kmax+kmin>>1
                if f(kmid) <= kmid:
                    kmax = kmid
                else:
                    kmin = kmid
            return kmax
        def f(x): return n+x-sum((primepi(x//p)-a>>1) for a,p in enumerate(primerange(isqrt(x)+1),-1))
        return bisection(f,n,n) # Chai Wah Wu, Apr 03 2025

Formula

A338910 Numbers of the form prime(x) * prime(y) where x and y are both odd.

Original entry on oeis.org

4, 10, 22, 25, 34, 46, 55, 62, 82, 85, 94, 115, 118, 121, 134, 146, 155, 166, 187, 194, 205, 206, 218, 235, 253, 254, 274, 289, 295, 298, 314, 334, 335, 341, 358, 365, 382, 391, 394, 415, 422, 451, 454, 466, 482, 485, 514, 515, 517, 527, 529, 538, 545, 554
Offset: 1

Views

Author

Gus Wiseman, Nov 20 2020

Keywords

Examples

			The sequence of terms together with their prime indices begins:
      4: {1,1}     146: {1,21}    314: {1,37}
     10: {1,3}     155: {3,11}    334: {1,39}
     22: {1,5}     166: {1,23}    335: {3,19}
     25: {3,3}     187: {5,7}     341: {5,11}
     34: {1,7}     194: {1,25}    358: {1,41}
     46: {1,9}     205: {3,13}    365: {3,21}
     55: {3,5}     206: {1,27}    382: {1,43}
     62: {1,11}    218: {1,29}    391: {7,9}
     82: {1,13}    235: {3,15}    394: {1,45}
     85: {3,7}     253: {5,9}     415: {3,23}
     94: {1,15}    254: {1,31}    422: {1,47}
    115: {3,9}     274: {1,33}    451: {5,13}
    118: {1,17}    289: {7,7}     454: {1,49}
    121: {5,5}     295: {3,17}    466: {1,51}
    134: {1,19}    298: {1,35}    482: {1,53}
		

Crossrefs

A338911 is the even instead of odd version.
A339003 is the squarefree case.
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.
A289182/A115392 list the positions of odd/even terms of A001358.
A300912 lists semiprimes with relatively prime indices.
A318990 lists semiprimes with divisible indices.
A338904 groups semiprimes by weight.
A338906/A338907 are semiprimes of even/odd weight.
A338898, A338912, and A338913 give the prime indices of semiprimes, with product A087794, sum A176504, and difference A176506.
A338899, A270650, and A270652 give prime indices of squarefree semiprimes.
A338909 lists semiprimes with non-relatively prime indices.

Programs

  • Maple
    q:= n-> (l-> add(i[2], i=l)=2 and andmap(i->
        numtheory[pi](i[1])::odd, l))(ifactors(n)[2]):
    select(q, [$1..1000])[];  # Alois P. Heinz, Nov 23 2020
  • Mathematica
    Select[Range[100],PrimeOmega[#]==2&&OddQ[Times@@PrimePi/@First/@FactorInteger[#]]&]
  • Python
    from math import isqrt
    from sympy import primepi, primerange
    def A338910(n):
        def bisection(f,kmin=0,kmax=1):
            while f(kmax) > kmax: kmax <<= 1
            kmin = kmax >> 1
            while kmax-kmin > 1:
                kmid = kmax+kmin>>1
                if f(kmid) <= kmid:
                    kmax = kmid
                else:
                    kmin = kmid
            return kmax
        def f(x): return n+x-sum(primepi(x//p)-a>>1 for a,p in enumerate(primerange(isqrt(x)+1),-1) if a&1)
        return bisection(f,n,n) # Chai Wah Wu, Apr 03 2025

Formula

Numbers m such that A001222(m) = A195017(m) = 2. - Peter Munn, Jan 17 2021

A338911 Numbers of the form prime(x) * prime(y) where x and y are both even.

Original entry on oeis.org

9, 21, 39, 49, 57, 87, 91, 111, 129, 133, 159, 169, 183, 203, 213, 237, 247, 259, 267, 301, 303, 321, 339, 361, 371, 377, 393, 417, 427, 453, 481, 489, 497, 519, 543, 551, 553, 559, 579, 597, 623, 669, 687, 689, 703, 707, 717, 749, 753, 789, 791, 793, 813, 817
Offset: 1

Views

Author

Gus Wiseman, Nov 20 2020

Keywords

Examples

			The sequence of terms together with their prime indices begins:
      9: {2,2}     237: {2,22}    481: {6,12}
     21: {2,4}     247: {6,8}     489: {2,38}
     39: {2,6}     259: {4,12}    497: {4,20}
     49: {4,4}     267: {2,24}    519: {2,40}
     57: {2,8}     301: {4,14}    543: {2,42}
     87: {2,10}    303: {2,26}    551: {8,10}
     91: {4,6}     321: {2,28}    553: {4,22}
    111: {2,12}    339: {2,30}    559: {6,14}
    129: {2,14}    361: {8,8}     579: {2,44}
    133: {4,8}     371: {4,16}    597: {2,46}
    159: {2,16}    377: {6,10}    623: {4,24}
    169: {6,6}     393: {2,32}    669: {2,48}
    183: {2,18}    417: {2,34}    687: {2,50}
    203: {4,10}    427: {4,18}    689: {6,16}
    213: {2,20}    453: {2,36}    703: {8,12}
		

Crossrefs

A338910 is the odd instead of even version.
A339004 is the squarefree case.
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.
A338899, A270650, A270652 list prime indices of squarefree semiprimes.
A289182/A115392 list the positions of odd/even terms of A001358.
A300912 lists semiprimes with relatively prime indices.
A318990 lists semiprimes with divisible indices.
A338904 groups semiprimes by weight.
A338906/A338907 list semiprimes of even/odd weight.
A338909 lists semiprimes with non-relatively prime indices.
A338912 and A338913 list prime indices of semiprimes, with product A087794, sum A176504, and difference A176506.

Programs

  • Maple
    q:= n-> (l-> add(i[2], i=l)=2 and andmap(i->
        numtheory[pi](i[1])::even, l))(ifactors(n)[2]):
    select(q, [$1..1000])[];  # Alois P. Heinz, Nov 23 2020
  • Mathematica
    Select[Range[100],PrimeOmega[#]==2&&OddQ[Times@@(1+PrimePi/@First/@FactorInteger[#])]&]
  • Python
    from math import isqrt
    from sympy import primerange, primepi
    def A338911(n):
        def bisection(f,kmin=0,kmax=1):
            while f(kmax) > kmax: kmax <<= 1
            kmin = kmax >> 1
            while kmax-kmin > 1:
                kmid = kmax+kmin>>1
                if f(kmid) <= kmid:
                    kmax = kmid
                else:
                    kmin = kmid
            return kmax
        def f(x): return n+x-sum(primepi(x//p)-a>>1 for a,p in enumerate(primerange(isqrt(x)+1),-1) if a&1^1)
        return bisection(f,n,n) # Chai Wah Wu, Apr 03 2025

Formula

Numbers m such that A001222(m) = 2 and A195017(m) = -2. - Peter Munn, Jan 17 2021

A339003 Numbers of the form prime(x) * prime(y) where x and y are distinct and both odd.

Original entry on oeis.org

10, 22, 34, 46, 55, 62, 82, 85, 94, 115, 118, 134, 146, 155, 166, 187, 194, 205, 206, 218, 235, 253, 254, 274, 295, 298, 314, 334, 335, 341, 358, 365, 382, 391, 394, 415, 422, 451, 454, 466, 482, 485, 514, 515, 517, 527, 538, 545, 554, 566, 614, 626, 635, 649
Offset: 1

Views

Author

Gus Wiseman, Nov 21 2020

Keywords

Comments

The squarefree semiprimes in A332822. - Peter Munn, Dec 25 2020

Examples

			The sequence of terms together with their prime indices begins:
     10: {1,3}     187: {5,7}     358: {1,41}    527: {7,11}
     22: {1,5}     194: {1,25}    365: {3,21}    538: {1,57}
     34: {1,7}     205: {3,13}    382: {1,43}    545: {3,29}
     46: {1,9}     206: {1,27}    391: {7,9}     554: {1,59}
     55: {3,5}     218: {1,29}    394: {1,45}    566: {1,61}
     62: {1,11}    235: {3,15}    415: {3,23}    614: {1,63}
     82: {1,13}    253: {5,9}     422: {1,47}    626: {1,65}
     85: {3,7}     254: {1,31}    451: {5,13}    635: {3,31}
     94: {1,15}    274: {1,33}    454: {1,49}    649: {5,17}
    115: {3,9}     295: {3,17}    466: {1,51}    662: {1,67}
    118: {1,17}    298: {1,35}    482: {1,53}    685: {3,33}
    134: {1,19}    314: {1,37}    485: {3,25}    694: {1,69}
    146: {1,21}    334: {1,39}    514: {1,55}    697: {7,13}
    155: {3,11}    335: {3,19}    515: {3,27}    706: {1,71}
    166: {1,23}    341: {5,11}    517: {5,15}    713: {9,11}
		

Crossrefs

A338910 is the not necessarily squarefree version.
A339004 is the even instead of odd version.
A001358 lists semiprimes, with odd and even terms A046315 and A100484.
A005117 lists squarefree numbers.
A006881 lists squarefree semiprimes, with odd and even terms A046388 and A100484.
A289182/A115392 list the positions of odd/even terms of A001358.
A300912 lists products of two primes of relatively prime index.
A320656 counts factorizations into squarefree semiprimes.
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.
A338904 groups semiprimes by weight.
A338906/A338907 list semiprimes of even/odd weight.
A339002 lists products of two distinct primes of non-relatively prime index.
A339005 lists products of two distinct primes of divisible index.
Subsequence of A332822.

Programs

  • Mathematica
    Select[Range[100],SquareFreeQ[#]&&PrimeOmega[#]==2&&OddQ[Times@@PrimePi/@First/@FactorInteger[#]]&]
  • Python
    from math import isqrt
    from sympy import primepi, primerange
    def A339003(n):
        def bisection(f,kmin=0,kmax=1):
            while f(kmax) > kmax: kmax <<= 1
            kmin = kmax >> 1
            while kmax-kmin > 1:
                kmid = kmax+kmin>>1
                if f(kmid) <= kmid:
                    kmax = kmid
                else:
                    kmin = kmid
            return kmax
        def f(x): return n+x-sum(primepi(x//p)-a>>1 for a,p in enumerate(primerange(isqrt(x)+1),1) if a&1)
        return bisection(f,n,n) # Chai Wah Wu, Apr 03 2025

Formula

Numbers m such that A001221(m) = A001222(m) = A195017(m) = 2. - Peter Munn, Dec 31 2020

A338905 Irregular triangle read by rows where row n lists all squarefree semiprimes with prime indices summing to n.

Original entry on oeis.org

6, 10, 14, 15, 21, 22, 26, 33, 35, 34, 39, 55, 38, 51, 65, 77, 46, 57, 85, 91, 58, 69, 95, 119, 143, 62, 87, 115, 133, 187, 74, 93, 145, 161, 209, 221, 82, 111, 155, 203, 247, 253, 86, 123, 185, 217, 299, 319, 323, 94, 129, 205, 259, 341, 377, 391, 106, 141
Offset: 3

Views

Author

Gus Wiseman, Nov 28 2020

Keywords

Comments

A squarefree semiprime is a product of any two distinct 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:
   6
  10
  14  15
  21  22
  26  33  35
  34  39  55
  38  51  65  77
  46  57  85  91
  58  69  95 119 143
  62  87 115 133 187
  74  93 145 161 209 221
  82 111 155 203 247 253
  86 123 185 217 299 319 323
		

Crossrefs

A004526 (shifted right) gives row lengths.
A025129 (shifted right) gives row sums.
A056239 gives sum of prime indices (Heinz weight).
A339116 is a different triangle whose diagonals are these rows.
A338904 is the not necessarily squarefree version, with row sums A024697.
A338907/A338908 are the union of odd/even rows.
A339114/A332765 are the row minima/maxima.
A001358 lists semiprimes, with odd/even terms A046315/A100484.
A005117 lists squarefree numbers.
A006881 lists squarefree semiprimes, with odd/even terms A046388/A100484.
A087112 groups semiprimes by greater factor.
A168472 gives partial sums of squarefree semiprimes.
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-1)/2}]],{n,3,10}]

A338908 Squarefree semiprimes whose prime indices sum to an even number.

Original entry on oeis.org

10, 21, 22, 34, 39, 46, 55, 57, 62, 82, 85, 87, 91, 94, 111, 115, 118, 129, 133, 134, 146, 155, 159, 166, 183, 187, 194, 203, 205, 206, 213, 218, 235, 237, 247, 253, 254, 259, 267, 274, 295, 298, 301, 303, 314, 321, 334, 335, 339, 341, 358, 365, 371, 377, 382
Offset: 1

Views

Author

Gus Wiseman, Nov 28 2020

Keywords

Comments

A squarefree semiprime is a product of any two distinct 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

			The sequence of terms together with their prime indices begins:
     10: {1,3}     115: {3,9}     213: {2,20}
     21: {2,4}     118: {1,17}    218: {1,29}
     22: {1,5}     129: {2,14}    235: {3,15}
     34: {1,7}     133: {4,8}     237: {2,22}
     39: {2,6}     134: {1,19}    247: {6,8}
     46: {1,9}     146: {1,21}    253: {5,9}
     55: {3,5}     155: {3,11}    254: {1,31}
     57: {2,8}     159: {2,16}    259: {4,12}
     62: {1,11}    166: {1,23}    267: {2,24}
     82: {1,13}    183: {2,18}    274: {1,33}
     85: {3,7}     187: {5,7}     295: {3,17}
     87: {2,10}    194: {1,25}    298: {1,35}
     91: {4,6}     203: {4,10}    301: {4,14}
     94: {1,15}    205: {3,13}    303: {2,26}
    111: {2,12}    206: {1,27}    314: {1,37}
		

Crossrefs

A031215 looks at primes instead of semiprimes.
A300061 and A319241 (squarefree) look all numbers (not just semiprimes).
A338905 has this as union of even-indexed rows.
A338906 is the nonsquarefree version.
A338907 is the odd version.
A001358 lists semiprimes, with odd/even terms A046315/A100484.
A005117 lists squarefree numbers.
A006881 lists squarefree semiprimes, with odd/even terms A046388/A100484.
A024697 is the sum of semiprimes of weight n.
A025129 is the sum of squarefree semiprimes of weight n.
A056239 gives the sum of prime indices of n.
A289182/A115392 list the positions of odd/even terms in A001358.
A320656 counts factorizations into squarefree semiprimes.
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.
A338904 groups semiprimes by weight.
A338911 lists products of pairs of primes both of even index.
A339114/A339115 give the least/greatest semiprime of weight n.
A339116 groups squarefree semiprimes by greater prime factor.

Programs

  • Mathematica
    Select[Range[100],SquareFreeQ[#]&&PrimeOmega[#]==2&& EvenQ[Total[PrimePi/@First/@FactorInteger[#]]]&]

A339005 Numbers of the form prime(x) * prime(y) where x properly divides y. Squarefree semiprimes with divisible prime indices.

Original entry on oeis.org

6, 10, 14, 21, 22, 26, 34, 38, 39, 46, 57, 58, 62, 65, 74, 82, 86, 87, 94, 106, 111, 115, 118, 122, 129, 133, 134, 142, 146, 158, 159, 166, 178, 183, 185, 194, 202, 206, 213, 214, 218, 226, 235, 237, 254, 259, 262, 267, 274, 278, 298, 302, 303, 305, 314, 319
Offset: 1

Views

Author

Gus Wiseman, Dec 05 2020

Keywords

Comments

A squarefree semiprime (A006881) is a product of any two distinct 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

			The sequence of terms together with their prime indices begins:
    6: {1,2}    82: {1,13}  159: {2,16}  259: {4,12}
   10: {1,3}    86: {1,14}  166: {1,23}  262: {1,32}
   14: {1,4}    87: {2,10}  178: {1,24}  267: {2,24}
   21: {2,4}    94: {1,15}  183: {2,18}  274: {1,33}
   22: {1,5}   106: {1,16}  185: {3,12}  278: {1,34}
   26: {1,6}   111: {2,12}  194: {1,25}  298: {1,35}
   34: {1,7}   115: {3,9}   202: {1,26}  302: {1,36}
   38: {1,8}   118: {1,17}  206: {1,27}  303: {2,26}
   39: {2,6}   122: {1,18}  213: {2,20}  305: {3,18}
   46: {1,9}   129: {2,14}  214: {1,28}  314: {1,37}
   57: {2,8}   133: {4,8}   218: {1,29}  319: {5,10}
   58: {1,10}  134: {1,19}  226: {1,30}  321: {2,28}
   62: {1,11}  142: {1,20}  235: {3,15}  326: {1,38}
   65: {3,6}   146: {1,21}  237: {2,22}  334: {1,39}
   74: {1,12}  158: {1,22}  254: {1,31}  339: {2,30}
		

Crossrefs

A300912 is the version for relative primality.
A318990 is the not necessarily squarefree version.
A339002 is the version for non-relative primality.
A339003 is the version for odd indices.
A339004 is the version for even indices
A001358 lists semiprimes.
A005117 lists squarefree numbers.
A006881 lists squarefree semiprimes, with odd/even terms A046388/A100484.
A320655 counts factorizations into semiprimes.
A320656 counts factorizations into squarefree semiprimes.
A338898/A338912/A338913 give the prime indices of semiprimes, with product A087794, sum A176504, and difference A176506.
A338899/A270650/A270652 give the prime indices of squarefree semiprimes, with difference A338900.

Programs

  • Mathematica
    Select[Range[100],SquareFreeQ[#]&&PrimeOmega[#]==2&& Divisible@@Reverse[PrimePi/@First/@FactorInteger[#]]&]

Formula

Equals A318990 \ A000290.

A339362 Sum of prime indices of the n-th squarefree semiprime.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Dec 06 2020

Keywords

Comments

A squarefree semiprime (A006881) is a product of any two distinct 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

			The sequence of all squarefree semiprimes together with the sums of their prime indices begins:
   6: 1 + 2 = 3
  10: 1 + 3 = 4
  14: 1 + 4 = 5
  15: 2 + 3 = 5
  21: 2 + 4 = 6
  22: 1 + 5 = 6
  26: 1 + 6 = 7
  33: 2 + 5 = 7
  34: 1 + 7 = 8
  35: 3 + 4 = 7
		

Crossrefs

A001358 lists semiprimes.
A003963 gives the product of prime indices of n.
A005117 lists squarefree numbers.
A006881 lists squarefree semiprimes.
A025129 gives the sum of squarefree semiprimes of weight n.
A056239 (weight) gives the sum of prime indices of n.
A332765/A339114 give the greatest/least squarefree semiprime of weight n.
A338898/A338912/A338913 give the prime indices of semiprimes, with product/sum/difference A087794/A176504/A176506.
A338899/A270650/A270652 give the prime indices of squarefree semiprimes, with product/sum/difference A339361/A339362/A338900.
A338904 groups semiprimes by weight.
A338905 groups squarefree semiprimes by weight.
A338907/A338908 list squarefree semiprimes of odd/even weight.
A339116 groups squarefree semiprimes by greater prime factor.

Programs

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

Formula

a(n) = A056239(A006881(n)).
a(n) = A270650(n) + A270652(n).
Showing 1-10 of 13 results. Next