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
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}
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.
A056239 gives the sum of prime indices (Heinz weight).
A087112 groups semiprimes by greater factor.
A338911 lists products of pairs of primes both of even index.
Cf.
A000040,
A001222,
A024697,
A037143,
A112798,
A300063,
A319242,
A320655,
A332765,
A338910,
A339004.
-
primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
Select[Range[100],PrimeOmega[#]==2&&EvenQ[Total[primeMS[#]]]&]
-
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
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
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}
A338911 is the even instead of odd version.
A001221 counts distinct prime indices.
A300912 lists semiprimes with relatively prime indices.
A318990 lists semiprimes with divisible indices.
A338904 groups semiprimes by weight.
A338909 lists semiprimes with non-relatively prime indices.
Cf.
A005117,
A037143,
A055684,
A056239,
A065516,
A112798,
A195017,
A320655,
A320732,
A320892,
A339004.
-
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
-
Select[Range[100],PrimeOmega[#]==2&&OddQ[Times@@PrimePi/@First/@FactorInteger[#]]&]
-
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
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
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}
A338910 is the odd instead of even version.
A001221 counts distinct prime indices.
A300912 lists semiprimes with relatively prime indices.
A318990 lists semiprimes with divisible indices.
A338904 groups semiprimes by weight.
A338909 lists semiprimes with non-relatively prime indices.
Cf.
A005117,
A037143,
A055684,
A056239,
A065516,
A112798,
A128301,
A195017,
A320655,
A320732,
A320892,
A338898,
A339002,
A339003.
-
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
-
Select[Range[100],PrimeOmega[#]==2&&OddQ[Times@@(1+PrimePi/@First/@FactorInteger[#])]&]
-
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
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
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}
A338910 is the not necessarily squarefree version.
A339004 is the even instead of odd version.
A300912 lists products of two primes of relatively prime index.
A320656 counts factorizations into squarefree semiprimes.
A338904 groups semiprimes by weight.
A339002 lists products of two distinct primes of non-relatively prime index.
A339005 lists products of two distinct primes of divisible index.
Cf.
A001221,
A001222,
A056239,
A112798,
A166237,
A195017,
A318990,
A320911,
A338901,
A338903,
A338911.
-
Select[Range[100],SquareFreeQ[#]&&PrimeOmega[#]==2&&OddQ[Times@@PrimePi/@First/@FactorInteger[#]]&]
-
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
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
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
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.
A087112 groups semiprimes by greater factor.
A168472 gives partial sums of squarefree semiprimes.
Cf.
A000040,
A001221,
A014342,
A098350,
A112798,
A320656,
A338901,
A338906,
A339003,
A339004,
A339005,
A339115.
-
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
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}
A338911 is the not necessarily squarefree version.
A339003 is the odd instead of even version, with not necessarily squarefree version
A338910.
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.
A338904 groups semiprimes by weight.
Cf.
A000040,
A001221,
A001222,
A056239,
A112798,
A166237,
A195017,
A320911,
A338901,
A338903,
A339002.
-
Select[Range[100],SquareFreeQ[#]&&PrimeOmega[#]==2&&OddQ[Times@@(1+ PrimePi/@First/@FactorInteger[#])]&]
-
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
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
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}
A024697 is the sum of the same semiprimes.
A338904 has this sequence as row maxima.
A339114 is the least among the same semiprimes.
A037143 lists primes and semiprimes.
A087112 groups semiprimes by greater factor.
A320655 counts factorizations into semiprimes.
Cf.
A000040,
A001221,
A001222,
A014342,
A025129,
A056239,
A062198,
A098350,
A112798,
A338905,
A339116.
-
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
-
Table[Max@@Table[Prime[k]*Prime[n-k],{k,n-1}],{n,2,30}]
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
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}
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.
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.
A320656 counts factorizations into squarefree semiprimes.
A332765 gives the greatest squarefree semiprime of weight n.
A338904 groups semiprimes by weight.
A338911 lists products of pairs of primes both of even index.
A339116 groups squarefree semiprimes by greater prime factor.
Cf.
A000040,
A001221,
A001222,
A087112,
A098350,
A112798,
A168472,
A338901,
A338904,
A339004,
A339005.
A304620
Expansion of (1/(1 - x)) * Sum_{k>=0} x^(2*k) / Product_{j=1..2*k} (1 - x^j).
Original entry on oeis.org
1, 1, 2, 3, 6, 9, 15, 22, 34, 48, 70, 97, 137, 186, 255, 341, 459, 605, 800, 1042, 1359, 1751, 2256, 2879, 3672, 4645, 5869, 7367, 9234, 11508, 14319, 17730, 21916, 26975, 33143, 40570, 49575, 60376, 73402, 88974, 107666, 129933, 156546, 188148, 225767, 270300, 323115, 385453
Offset: 0
The version for even instead of odd greatest part is
A306145.
A000041 counts partitions of 2n with alternating sum 0, ranked by
A000290.
A000070 counts partitions with alternating sum 1.
A067661 counts strict partitions of even length.
A103919 counts partitions by sum and alternating sum (reverse:
A344612).
A344610 counts partitions by sum and positive reverse-alternating sum.
Cf.
A000097,
A006330,
A027193,
A030229,
A067659,
A236559,
A236914,
A239829,
A239830,
A318156,
A338907,
A344611.
-
nmax = 47; CoefficientList[Series[1/(1 - x) Sum[x^(2 k)/Product[(1 - x^j), {j, 1, 2 k}], {k, 0, nmax}], {x, 0, nmax}], x]
nmax = 47; CoefficientList[Series[(1 + EllipticTheta[4, 0, x])/(2 (1 - x) QPochhammer[x]), {x, 0, nmax}], x]
Table[Length[Select[IntegerPartitions[n],OddQ[Length[#]]&&Count[#,?OddQ]==1&]],{n,1,30,2}] (* _Gus Wiseman, Jun 26 2021 *)
A339194
Sum of all squarefree semiprimes with greater prime factor prime(n).
Original entry on oeis.org
0, 6, 25, 70, 187, 364, 697, 1102, 1771, 2900, 3999, 5920, 8077, 10234, 13207, 17384, 22479, 26840, 33567, 40328, 46647, 56248, 65653, 77786, 93411, 107060, 119583, 135248, 149439, 167240, 202311, 225320, 253587, 276332, 316923, 343676, 381039, 421192, 458749
Offset: 1
The triangle A339116 with row sums equal to this sequence begins (n > 1):
6 = 6
25 = 10 + 15
70 = 14 + 21 + 35
187 = 22 + 33 + 55 + 77
A025129 gives sums of squarefree semiprimes by weight, row sums of
A338905.
A143215 is the not necessarily squarefree version, row sums of
A087112.
A339116 is a triangle of squarefree semiprimes with these row sums.
A024697 is the sum of semiprimes of weight n.
A168472 gives partial sums of squarefree semiprimes.
A332765 gives the greatest squarefree semiprime of weight n.
A338904 groups semiprimes by weight.
-
Table[Sum[Prime[i]*Prime[j],{j,i-1}],{i,10}]
-
a(n) = prime(n)*vecsum(primes(n-1)); \\ Michel Marcus, Jun 15 2024
Comments