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

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

A084127 Prime factor >= other prime factor of n-th semiprime.

Original entry on oeis.org

2, 3, 3, 5, 7, 5, 7, 11, 5, 13, 11, 17, 7, 19, 13, 23, 7, 17, 11, 19, 29, 31, 13, 23, 37, 11, 41, 17, 43, 29, 13, 31, 47, 19, 53, 37, 23, 59, 17, 11, 61, 41, 43, 19, 67, 47, 71, 13, 29, 73, 31, 79, 53, 23, 83, 13, 59, 89, 61, 37, 17, 97, 67, 101, 29, 41, 103, 19, 71, 107, 43, 31
Offset: 1

Views

Author

Reinhard Zumkeller, May 15 2003

Keywords

Comments

Largest nontrivial divisor of n-th semiprime. [Juri-Stepan Gerasimov, Apr 18 2010]
Greater of the prime factors of A001358(n). - Jianing Song, Aug 05 2022

Crossrefs

Cf. A001358 (the semiprimes), A084126 (lesser of the prime factors of the semiprimes).

Programs

  • Haskell
    a084127 = a006530 . a001358  -- Reinhard Zumkeller, Nov 25 2012
    
  • Mathematica
    FactorInteger[#][[-1, 1]]& /@ Select[Range[1000], PrimeOmega[#] == 2&] (* Jean-François Alcover, Nov 17 2021 *)
  • PARI
    lista(nn) = {for (n=2, nn, if (bigomega(n)==2, f = factor(n); print1(f[length(f~),1], ", ")););} \\ Michel Marcus, Jun 05 2013
    
  • Python
    from math import isqrt
    from sympy import primepi, primerange, primefactors
    def A084127(n):
        def bisection(f,kmin=0,kmax=1):
            while f(kmax) > kmax: 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 int(n+x+((t:=primepi(s:=isqrt(x)))*(t-1)>>1)-sum(primepi(x//p) for p in primerange(s+1)))
        return max(primefactors(bisection(f,n,n))) # Chai Wah Wu, Oct 23 2024

Formula

a(n) = A006530(A001358(n)).
a(n) = A001358(n)/A020639(A001358(n)). [corrected by Michel Marcus, Jul 18 2020]
a(n) = A001358(n)/A084126(n).

Extensions

Corrected by T. D. Noe, Nov 15 2006

A084126 Prime factor <= other prime factor of n-th semiprime.

Original entry on oeis.org

2, 2, 3, 2, 2, 3, 3, 2, 5, 2, 3, 2, 5, 2, 3, 2, 7, 3, 5, 3, 2, 2, 5, 3, 2, 7, 2, 5, 2, 3, 7, 3, 2, 5, 2, 3, 5, 2, 7, 11, 2, 3, 3, 7, 2, 3, 2, 11, 5, 2, 5, 2, 3, 7, 2, 13, 3, 2, 3, 5, 11, 2, 3, 2, 7, 5, 2, 11, 3, 2, 5, 7, 2, 3, 13, 2, 5, 3, 13, 3, 11, 2, 7, 2, 5, 3, 2, 2, 7, 17, 3, 5, 2, 13, 7, 2, 3, 5, 3, 2
Offset: 1

Views

Author

Reinhard Zumkeller, May 15 2003

Keywords

Comments

Lesser of the prime factors of A001358(n). - Jianing Song, Aug 05 2022

Crossrefs

Cf. A001358 (the semiprimes), A084127 (greater of the prime factors of the semiprimes).

Programs

  • Haskell
    a084126 = a020639 . a001358  -- Reinhard Zumkeller, Nov 25 2012
    
  • Mathematica
    FactorInteger[#][[1,1]]&/@Select[Range[500],PrimeOmega[#]==2&] (* Harvey P. Dale, Jun 25 2018 *)
  • Python
    from sympy import primepi, primerange, primefactors
    def A084126(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 int(n+x+((t:=primepi(s:=isqrt(x)))*(t-1)>>1)-sum(primepi(x//p) for p in primerange(s+1)))
        return min(primefactors(bisection(f,n,n))) # Chai Wah Wu, Apr 03 2025

Formula

a(n) = A020639(A001358(n)).
a(n) = A001358(n)/A006530(A001358(n)). [corrected by Michel Marcus, Jul 18 2020]
a(n) = A001358(n)/A084127(n).

A279102 Numbers n having three parts in the symmetric representation of sigma(n).

Original entry on oeis.org

9, 15, 25, 35, 45, 49, 50, 70, 77, 91, 98, 110, 121, 130, 135, 143, 154, 169, 170, 182, 187, 190, 209, 221, 225, 238, 242, 247, 266, 286, 289, 299, 315, 322, 323, 338, 350, 361, 374, 391, 405, 418, 437, 442, 484, 493, 494, 506, 527, 529, 550, 551, 572, 578, 589, 598, 638, 646, 650, 667, 675, 676, 682
Offset: 1

Views

Author

Hartmut F. W. Hoft, Dec 06 2016

Keywords

Comments

Let n = 2^m * q with m >= 0 and q odd, let row(n) = floor(sqrt(8*n+1) - 1)/2), and let 1 = d_1 < ... < d_h <= row(n) < d_(h+1) < ... < d_k = q be the k odd divisors of n.
The symmetric representation of sigma(n) consists of 3 parts precisely when there is a unique i, 1 <= i < h, such that 2^(m+1) * d_i < d_(i+1) and d_h <= row(n) < 2^(m+1) * d_h.
This property of the odd divisors of n is equivalent to the n-th row of the irregular triangle of A249223 consisting of a block of positive numbers, followed by a block of zeros, followed in turn by a block of positive numbers, i.e., determining the first part and the left half of the center part of the symmetric representation of sigma(n), resulting in 3 parts.
Let n be the product of two primes p and q satisfying 2 < p < q < 2*p. Then n satisfies the property above so that the odd numbers in A087718 form a subsequence.

Examples

			a(4) = 35 = 5*7 is in the sequence since 1 < 2 < 5 < row(35) = 7 < 10;
a(8) = 70 = 2*5*7 is in the sequence since 1 < 4 < 5 < row(70) = 11 < 20;
140 = 4*5*7 is not in the sequence since 1 < 5 < 7 < 8 < row(140) = 16 < 20;
a(506) = 5950 = 2*25*7*17 is in the sequence since 1*4 < 5 is the only pair of odd divisors 1 < 5 < 7 < 17 < 25 < 35 < 85 < row(5950) = 108 satisfying the property (see A251820).
		

Crossrefs

Column 3 of A240062.

Programs

  • Mathematica
    (* support functions are defined in A237048 and A262045 *)
    segmentsSigma[n_] := Length[Select[SplitBy[a262045[n], #!=0&], First[#]!=0&]]
    a279102[m_, n_] := Select[Range[m, n], segmentsSigma[#]==3&]
    a279102[1, 700] (* sequence data *)
    (* An equivalent, but slower computation is based on A237271 *)
    a279102[m_, n_] := Select[Range[m, n], a237271[#]==3&]
    a279102[1,700] (* sequence data *)

A338486 Numbers n whose symmetric representation of sigma(n) consists of 3 regions with maximum width 2.

Original entry on oeis.org

15, 35, 45, 70, 77, 91, 110, 130, 135, 143, 154, 170, 182, 187, 190, 209, 221, 225, 238, 247, 266, 286, 299, 322, 323, 350, 374, 391, 405, 418, 437, 442, 493, 494, 506, 527, 550, 551, 572, 589, 598, 638, 646, 650, 667, 682, 703, 713, 748, 754, 782, 806, 814, 836, 850
Offset: 1

Views

Author

Hartmut F. W. Hoft, Oct 30 2020

Keywords

Comments

This sequence is a subsequence of A279102. The definition of the sequence excludes squares of primes, A001248, since the 3 regions of their symmetric representation of sigma have width 1 (first column in the irregular triangle of A247687).
Table of numbers in this sequence arranged by the number of prime factors, counting multiplicities:
2 3 4 5 6 7 ...
------------------------------------------
15 45 135 405 1215 3645
35 70 225 1125 5625 ...
77 110 350 1750 8750 744795
91 130 550 2584 ... ...
143 154 572 2750 85455
187 170 650 3128 ...
209 182 748 3250
221 190 836 3496
247 238 850 3944
299 266 884 4216
... ... ... ...
1035 9585
... ...
The numbers in the first row of the table above are b(k) = 5*3^k, k>=1, (see A005030) so that infinitely many odd numbers occur outside of the first column. The central region of the symmetric representation of sigma(b(k)) contains 2*k-1 separate contiguous sections consisting of sequences of entire legs of width 2, k>=1 (see Lemma 2 in the link).
Conjecture: The combined extent of these sections in sigma(b(k)) is 2*3^(k-1) - 1 = A048473(k-1), k>=1.
Since each number n in the first column and first row has a prime factor of odd exponent a contiguous section of the symmetric representation of sigma(n) centered on the diagonal has width 2. For odd numbers n not in the first row or column in which all prime factors have even powers, such as 225 and 5625 in the second row, a contiguous section of the symmetric representation of sigma(n) centered on the diagonal has width 1 (see Lemma 1 in the link).
For each k>=3 and every prime p such that b(k-1) < 2*p < 4*b(k-2), the odd number p*b(k-1) is in the column of b(k). The two inequalities are equivalent to b(k-1) <= row(p*b(k-1)) < 2*b(k-1) ensuring that the symmetric representation of sigma(p*b(k-1)) consists of 3 regions.
45 is the only odd number in its column (see Lemma 3 in the link).
Since the factors of n = p*q satisfy 2 < p < q < 2*p the first column in the table above is a subsequence of A082663 and of A087718 (see Lemma 4 in the link). Each of the two outer regions consists of a single leg of width 1 and length (1 + p*q)/2. The center region of size p+q consists of two subparts (see A196020 & A280851) of width 1 of sizes 2*p-q and 2*q-p, respectively (see Lemma 5 in the link). The table below arranges the first column in the table above according to the length 2*p-q of their single contiguous extent of width 2 in the center region:
1 3 5 7 9 11 13 15 ...
------------------------------------------------------
15 35 187 247 143 391 2257 323
91 77 493 589 221 1363 3139 437
703 209 943 2479 551 2911 6649 713
1891 299 1537 3397 851 3901 ... 1247
2701 527 4183 8509 1643 6313 1457
... ... ... ... ... ... ....
A129521: p*q satisfies 2*p - q = 1 (excluding A129521(1)=6)
A226755: p*q satisfies 2*p - q = 3 (excluding A226755(1)=9)
Sequences with larger differences 2*p - q are not in OEIS.

Examples

			a(6) = 91 = 7*13 is in the sequence and in the 2-column of the first table since 1 < 2 < 7 < 13 = row(91) representing the 4 odd divisors 1 - 91 - 7 - 13 (see A237048) results in the following pattern for the widths of the legs (see A249223): 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 2 for 3 regions with width not exceeding 2. It also is in the 1-column of the second table since it has a single area of width 2 which is 1 unit long.
a(29) = 405 = 5*3^4 is in the sequence and in the 5-column of the first table since 1 < 2 < 3 < 5 < 6 < 9 < 10 < 15 < 18 < 27 = row(405) representing the 10 odd divisors 1 - 405 - 3 - 5 - 135 - 9 - 81 - 15 - 45 - 27 results in the following pattern for the widths of the legs: 1, 0, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2 for 3 regions with width not exceeding 2, and 7 = 2*4 - 1 sections of width 2 in the central region.
a(35) = 506 = 2*11*23 is in the sequence since positions 1 < 4 < 11 < 23 < row(506) = 31 representing the 4 odd divisors 1 - 253 - 11 - 23 results in the following pattern for the widths of the legs: 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2 for 3 regions with width not exceeding 2, with the two outer regions consisting of 3 legs of width 1, and a single area of width 2 in the central region.
		

Crossrefs

Programs

  • Mathematica
    (* Functions path and a237270 are defined in A237270 *)
    maxDiagonalLength[n_] := Max[Map[#[[1]]-#[[2]]&, Transpose[{Drop[Drop[path[n], 1], -1], path[n-1]}]]]
    a338486[m_, n_] := Module[{r, list={}, k}, For[k=m, k<=n, k++, r=a237270[k]; If[Length[r]== 3 && maxDiagonalLength[k]==2,AppendTo[list, k]]]; list]
    a338486[1, 850]

A345356 Numbers k coprime to 30 such that ceiling(sqrt(k))^2 - k is a square.

Original entry on oeis.org

1, 49, 77, 91, 121, 143, 169, 187, 209, 221, 247, 289, 299, 323, 361, 391, 437, 493, 529, 551, 589, 667, 713, 841, 851, 899, 961, 1073, 1147, 1189, 1247, 1271, 1333, 1369, 1457, 1517, 1591, 1681, 1739, 1763, 1813, 1849, 1927, 1961, 2009, 2021
Offset: 1

Views

Author

Bill McEachen, Jun 15 2021

Keywords

Comments

Multiples of 2, 3, and 5 are excluded. This is not a subsequence of A087718, since not all terms are semiprimes. Subsequence of A077554 (limited data)? Besides 1, a subsequence of A038510.

Examples

			For k=77, ceiling(sqrt(k)) is 9, so we evaluate 9^2 - 77 = 4, which is a square, so 77 is a term.
Let k=97, 100 - 97 = 3 is not a square and is not a term.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[2000], CoprimeQ[#, 30] && IntegerQ @ Sqrt[Ceiling[Sqrt[#]]^2 - #] &] (* Amiram Eldar, Jun 23 2021 *)
  • PARI
    genit(minn=1,maxx)={arr=List();forstep(w=minn,maxx,2,if(w%5==0||w%6==3,next);z=sqrtint(w-1)+1;if(issquare(z^2-w)>0,listput(arr,w);next));arr}
Showing 1-6 of 6 results.