cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Previous Showing 11-20 of 29 results. Next

A339114 Least semiprime whose prime indices sum to n.

Original entry on oeis.org

4, 6, 9, 14, 21, 26, 34, 38, 46, 58, 62, 74, 82, 86, 94, 106, 118, 122, 134, 142, 146, 158, 166, 178, 194, 202, 206, 214, 218, 226, 254, 262, 274, 278, 298, 302, 314, 326, 334, 346, 358, 362, 382, 386, 394, 398, 422, 446, 454, 458, 466, 478, 482, 502, 514, 526
Offset: 2

Views

Author

Gus Wiseman, Nov 28 2020

Keywords

Comments

Converges to A100484.
After a(4) = 9, also the least squarefree semiprime whose prime indices sum to n.
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}     106: {1,16}    254: {1,31}
      6: {1,2}     118: {1,17}    262: {1,32}
      9: {2,2}     122: {1,18}    274: {1,33}
     14: {1,4}     134: {1,19}    278: {1,34}
     21: {2,4}     142: {1,20}    298: {1,35}
     26: {1,6}     146: {1,21}    302: {1,36}
     34: {1,7}     158: {1,22}    314: {1,37}
     38: {1,8}     166: {1,23}    326: {1,38}
     46: {1,9}     178: {1,24}    334: {1,39}
     58: {1,10}    194: {1,25}    346: {1,40}
     62: {1,11}    202: {1,26}    358: {1,41}
     74: {1,12}    206: {1,27}    362: {1,42}
     82: {1,13}    214: {1,28}    382: {1,43}
     86: {1,14}    218: {1,29}    386: {1,44}
     94: {1,15}    226: {1,30}    394: {1,45}
		

Crossrefs

A024697 is the sum of the same semiprimes.
A098350 has this sequence as antidiagonal minima.
A338904 has this sequence as row minima.
A339114 (this sequence) is the squarefree case for n > 4.
A339115 is the greatest among the same semiprimes.
A001358 lists semiprimes, with odd/even terms A046315/A100484.
A006881 lists squarefree semiprimes, with odd/even terms A046388/A100484.
A037143 lists primes and semiprimes.
A056239 gives the sum of prime indices of n.
A084126 and A084127 give the prime factors of semiprimes.
A087112 groups semiprimes by greater factor.
A320655 counts factorizations into semiprimes.
A332765/A332877 is 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.
A338907/A338906 list semiprimes of odd/even weight.
A338907/A338908 list squarefree semiprimes of odd/even weight.

Programs

  • Mathematica
    Table[Min@@Table[Prime[k]*Prime[n-k],{k,n-1}],{n,2,30}]
    Take[DeleteDuplicates[SortBy[{Times@@#,Total[PrimePi[#]]}&/@Tuples[ Prime[ Range[ 200]],2],{Last,First}],GreaterEqual[#1[[2]],#2[[2]]]&][[All,1]],60] (* Harvey P. Dale, Sep 06 2022 *)
  • PARI
    a(n) = vecmin(vector(n-1, k, prime(k)*prime(n-k))); \\ Michel Marcus, Dec 03 2020

A339116 Triangle of all squarefree semiprimes grouped by greater prime factor, read by rows.

Original entry on oeis.org

6, 10, 15, 14, 21, 35, 22, 33, 55, 77, 26, 39, 65, 91, 143, 34, 51, 85, 119, 187, 221, 38, 57, 95, 133, 209, 247, 323, 46, 69, 115, 161, 253, 299, 391, 437, 58, 87, 145, 203, 319, 377, 493, 551, 667, 62, 93, 155, 217, 341, 403, 527, 589, 713, 899
Offset: 2

Views

Author

Gus Wiseman, Dec 01 2020

Keywords

Comments

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

Examples

			Triangle begins:
   6
  10  15
  14  21  35
  22  33  55  77
  26  39  65  91 143
  34  51  85 119 187 221
  38  57  95 133 209 247 323
  46  69 115 161 253 299 391 437
  58  87 145 203 319 377 493 551 667
  62  93 155 217 341 403 527 589 713 899
		

Crossrefs

A339194 gives row sums.
A100484 is column k = 1.
A001748 is column k = 2.
A001750 is column k = 3.
A006094 is column k = n - 1.
A090076 is column k = n - 2.
A319613 is the central column k = 2*n.
A087112 is the not necessarily squarefree version.
A338905 is a different triangle of squarefree semiprimes.
A339195 is the generalization to all squarefree numbers, row sums A339360.
A001358 lists semiprimes.
A005117 lists squarefree numbers.
A006881 lists squarefree semiprimes, with odd terms A046388.
A024697 is the sum of semiprimes of weight n.
A025129 is the sum of squarefree semiprimes of weight n.
A332765 gives the greatest squarefree semiprime of weight n.
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.
A338904 groups semiprimes by weight.
A338907/A338908 list squarefree semiprimes of odd/even weight.
Subsequence of A019565.

Programs

  • Mathematica
    Table[Prime[i]*Prime[j],{i,2,10},{j,i-1}]
  • PARI
    row(n) = {prime(n)*primes(n-1)}
    { for(n=2, 10, print(row(n))) } \\ Andrew Howroyd, Jan 19 2023

Formula

T(n,k) = prime(n) * prime(k) for k < n.

Extensions

Offset corrected by Andrew Howroyd, Jan 19 2023

A332765 Consider all permutations p_i of the first n primes; a(n) is the minimum over p_i of the maximal product of two adjacent primes in the permutation.

Original entry on oeis.org

6, 10, 15, 22, 35, 55, 77, 91, 143, 187, 221, 253, 323, 391, 493, 551, 667, 713, 899, 1073, 1189, 1271, 1517, 1591, 1763, 1961, 2183, 2419, 2537, 2773, 3127, 3233, 3599, 3953, 4189, 4331, 4757, 4897, 5293, 5723, 5963, 6499, 6887, 7171, 7663, 8051, 8633, 8989, 9797, 9991, 10403, 10807
Offset: 2

Views

Author

Bobby Jacobs, Apr 23 2020

Keywords

Comments

The optimal permutation of n primes is {p_n, p_1, p_n-1, p_2, …, p_ceiling(n/2)}. - Ivan N. Ianakiev, Apr 28 2020
Also the greatest squarefree semiprime whose prime indices sum to n + 1. 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. - Gus Wiseman, Dec 06 2020

Examples

			Here are the ways (up to reversal) to order the first four primes:
  2, 3, 5, 7: Products: 6, 15, 35;  Largest product: 35
  2, 3, 7, 5: Products: 6, 21, 35;  Largest product: 35
  2, 5, 3, 7: Products: 10, 15, 21; Largest product: 21
  2, 5, 7, 3: Products: 10, 35, 21; Largest product: 35
  2, 7, 3, 5: Products: 14, 21, 15; Largest product: 21
  2, 7, 5, 3: Products: 14, 35, 15; Largest product: 35
  3, 2, 5, 7: Products: 6, 10, 35;  Largest product: 35
  3, 2, 7, 5: Products: 6, 14, 35;  Largest product: 35
  3, 5, 2, 7: Products: 15, 10, 14; Largest product: 15
  3, 7, 2, 5: Products: 21, 14, 10; Largest product: 21
  5, 2, 3, 7: Products: 10, 6, 21;  Largest product: 21
  5, 3, 2, 7: Products: 15, 6, 14;  Largest product: 15
The minimum largest product is 15, so a(4) = 15.
From _Gus Wiseman_, Dec 06 2020: (Start)
The sequence of terms together with their prime indices begins:
      6: {1,2}     551: {8,10}    3127: {16,17}
     10: {1,3}     667: {9,10}    3233: {16,18}
     15: {2,3}     713: {9,11}    3599: {17,18}
     22: {1,5}     899: {10,11}   3953: {17,19}
     35: {3,4}    1073: {10,12}   4189: {17,20}
     55: {3,5}    1189: {10,13}   4331: {18,20}
     77: {4,5}    1271: {11,13}   4757: {19,20}
     91: {4,6}    1517: {12,13}   4897: {17,23}
    143: {5,6}    1591: {12,14}   5293: {19,22}
    187: {5,7}    1763: {13,14}   5723: {17,25}
    221: {6,7}    1961: {12,16}   5963: {19,24}
    253: {5,9}    2183: {12,17}   6499: {19,25}
    323: {7,8}    2419: {13,17}   6887: {20,25}
    391: {7,9}    2537: {14,17}   7171: {20,26}
    493: {7,10}   2773: {15,17}   7663: {22,25}
(End)
		

Crossrefs

A338904 and A338905 have this sequence as row maxima.
A339115 is the not necessarily squarefree version.
A001358 lists semiprimes.
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.
A320656 counts factorizations into squarefree semiprimes.
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.
A338907/A338908 list squarefree semiprimes of odd/even weight.
A339114 is the least (squarefree) semiprime of weight n.
A339116 groups squarefree semiprimes by greater prime factor.

Programs

  • Mathematica
    primes[n_]:=Reverse[Prime/@Range[n]]; partition[n_]:=Partition[primes[n],UpTo[Ceiling[n/2]]];
    riffle[n_]:=Riffle[partition[n][[1]],Reverse[partition[n][[2]]]];
    a[n_]:=Max[Table[riffle[n][[i]]*riffle[n][[i+1]],{i,1,n-1}]];a/@Range[2,53]
    (* Ivan N. Ianakiev, Apr 28 2020 *)

Formula

It appears that a(n) = A332877(n - 1) for n > 5.

Extensions

a(12)-a(13) from Jinyuan Wang, Apr 24 2020
More terms from Ivan N. Ianakiev, Apr 28 2020

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}]

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

Original entry on oeis.org

21, 39, 57, 87, 91, 111, 129, 133, 159, 183, 203, 213, 237, 247, 259, 267, 301, 303, 321, 339, 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, 843, 879, 917
Offset: 1

Views

Author

Gus Wiseman, Nov 22 2020

Keywords

Comments

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

Examples

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

Crossrefs

A338911 is the not necessarily squarefree version.
A339003 is the odd instead of even version, with not necessarily squarefree version A338910.
A001358 lists semiprimes, with odd/even terms A046315/A100484.
A005117 lists squarefree numbers.
A006881 lists squarefree semiprimes, with odd/even terms A046388/A100484.
A289182/A115392 list the positions of odd/even terms in A001358.
A300912 lists products of pairs of primes with relatively prime indices.
A318990 lists products of pairs of primes with divisible indices.
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.
Subsequence of A332821.

Programs

  • Mathematica
    Select[Range[100],SquareFreeQ[#]&&PrimeOmega[#]==2&&OddQ[Times@@(1+ PrimePi/@First/@FactorInteger[#])]&]
  • Python
    from math import isqrt
    from sympy import primepi, primerange
    def A339004(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 A001221(m) = A001222(m) = 2 and A195017(m) = -2. - Peter Munn, Dec 31 2020

A339115 Greatest semiprime whose prime indices sum to n.

Original entry on oeis.org

4, 6, 10, 15, 25, 35, 55, 77, 121, 143, 187, 221, 289, 323, 391, 493, 551, 667, 841, 899, 1073, 1189, 1369, 1517, 1681, 1763, 1961, 2183, 2419, 2537, 2809, 3127, 3481, 3599, 3953, 4189, 4489, 4757, 5041, 5293, 5723, 5963, 6499, 6887, 7171, 7663, 8051, 8633
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

			The sequence of terms together with their prime indices begins:
        4: {1,1}      493: {7,10}      2809: {16,16}
        6: {1,2}      551: {8,10}      3127: {16,17}
       10: {1,3}      667: {9,10}      3481: {17,17}
       15: {2,3}      841: {10,10}     3599: {17,18}
       25: {3,3}      899: {10,11}     3953: {17,19}
       35: {3,4}     1073: {10,12}     4189: {17,20}
       55: {3,5}     1189: {10,13}     4489: {19,19}
       77: {4,5}     1369: {12,12}     4757: {19,20}
      121: {5,5}     1517: {12,13}     5041: {20,20}
      143: {5,6}     1681: {13,13}     5293: {19,22}
      187: {5,7}     1763: {13,14}     5723: {17,25}
      221: {6,7}     1961: {12,16}     5963: {19,24}
      289: {7,7}     2183: {12,17}     6499: {19,25}
      323: {7,8}     2419: {13,17}     6887: {20,25}
      391: {7,9}     2537: {14,17}     7171: {20,26}
		

Crossrefs

A024697 is the sum of the same semiprimes.
A332765/A332877 is the squarefree case.
A338904 has this sequence as row maxima.
A339114 is the least among the same semiprimes.
A001358 lists semiprimes, with odd/even terms A046315/A100484.
A006881 lists squarefree semiprimes, with odd/even terms A046388/A100484.
A037143 lists primes and semiprimes.
A084126 and A084127 give the prime factors of semiprimes.
A087112 groups semiprimes by greater factor.
A320655 counts factorizations into 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.
A338907/A338906 list semiprimes of odd/even weight.
A338907/A338908 list squarefree semiprimes of odd/even weight.

Programs

  • Maple
    P:= [seq(ithprime(i),i=1..200)]:
    [seq(max(seq(P[i]*P[j-i],i=1..j-1)),j=2..200)]; # Robert Israel, Dec 06 2020
  • Mathematica
    Table[Max@@Table[Prime[k]*Prime[n-k],{k,n-1}],{n,2,30}]
Previous Showing 11-20 of 29 results. Next