A338907
Semiprimes whose prime indices sum to an odd number.
Original entry on oeis.org
6, 14, 15, 26, 33, 35, 38, 51, 58, 65, 69, 74, 77, 86, 93, 95, 106, 119, 122, 123, 141, 142, 143, 145, 158, 161, 177, 178, 185, 201, 202, 209, 214, 215, 217, 219, 221, 226, 249, 262, 265, 278, 287, 291, 299, 302, 305, 309, 319, 323, 326, 327, 329, 346, 355
Offset: 1
The sequence of terms together with their prime indices begins:
6: {1,2} 95: {3,8} 202: {1,26}
14: {1,4} 106: {1,16} 209: {5,8}
15: {2,3} 119: {4,7} 214: {1,28}
26: {1,6} 122: {1,18} 215: {3,14}
33: {2,5} 123: {2,13} 217: {4,11}
35: {3,4} 141: {2,15} 219: {2,21}
38: {1,8} 142: {1,20} 221: {6,7}
51: {2,7} 143: {5,6} 226: {1,30}
58: {1,10} 145: {3,10} 249: {2,23}
65: {3,6} 158: {1,22} 262: {1,32}
69: {2,9} 161: {4,9} 265: {3,16}
74: {1,12} 177: {2,17} 278: {1,34}
77: {4,5} 178: {1,24} 287: {4,13}
86: {1,14} 185: {3,12} 291: {2,25}
93: {2,11} 201: {2,19} 299: {6,9}
A031368 looks at primes instead of semiprimes.
A098350 has this as union of odd-indexed antidiagonals.
A300063 looks at all numbers (not just semiprimes).
A338904 has this as union of odd-indexed rows.
A056239 gives the sum of prime indices (Heinz weight).
A087112 groups semiprimes by greater factor.
A338908 lists squarefree semiprimes of even weight.
Cf.
A000040,
A001222,
A014342,
A024697,
A062198,
A112798,
A300061,
A319242,
A320655,
A338910,
A339003.
-
primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
Select[Range[100],PrimeOmega[#]==2&&OddQ[Total[primeMS[#]]]&]
-
from math import isqrt
from sympy import primepi, primerange
def A338907(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)))
return bisection(f,n,n) # Chai Wah Wu, Apr 03 2025
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
A319241
Heinz numbers of strict integer partitions of even numbers. Squarefree numbers whose prime indices sum to an even number.
Original entry on oeis.org
1, 3, 7, 10, 13, 19, 21, 22, 29, 30, 34, 37, 39, 43, 46, 53, 55, 57, 61, 62, 66, 70, 71, 79, 82, 85, 87, 89, 91, 94, 101, 102, 107, 111, 113, 115, 118, 129, 130, 131, 133, 134, 138, 139, 146, 151, 154, 155, 159, 163, 165, 166, 173, 181, 183, 186, 187, 190, 193
Offset: 1
30 is the Heinz number of (3,2,1), which is strict and has even weight, so 30 belongs to the sequence.
The sequence of all even-weight strict partitions begins: (), (2), (4), (3,1), (6), (8), (4,2), (5,1), (10), (3,2,1), (7,1), (12), (6,2), (14), (9,1), (16), (5,3), (8,2), (18), (11,1), (5,2,1), (4,3,1).
-
Select[Range[100],And[SquareFreeQ[#],EvenQ[Total[Cases[FactorInteger[#],{p_,k_}:>k*PrimePi[p]]]]]&]
-
isok(m) = issquarefree(m) && !(vecsum(apply(primepi, factor(m)[,1])) % 2); \\ Michel Marcus, Feb 08 2022
A319246
Sum of prime indices of the n-th squarefree number.
Original entry on oeis.org
0, 1, 2, 3, 3, 4, 4, 5, 6, 5, 5, 7, 8, 6, 6, 9, 7, 10, 6, 11, 7, 8, 7, 12, 9, 8, 13, 7, 14, 10, 15, 9, 16, 8, 10, 11, 17, 18, 12, 9, 8, 19, 11, 8, 20, 21, 13, 9, 9, 22, 14, 23, 10, 15, 12, 24, 10, 13, 16, 11, 25, 26, 10, 27, 9, 17, 28, 29, 9, 14, 30, 11, 12
Offset: 1
The 19th squarefree number is 30 with prime indices (3,2,1), so a(19) = 6.
-
Table[Total[Cases[FactorInteger[n],{p_,k_}:>k*PrimePi[p]]],{n,Select[Range[100],SquareFreeQ]}]
A319829
FDH numbers of strict integer partitions of odd numbers.
Original entry on oeis.org
2, 4, 6, 7, 10, 11, 12, 16, 18, 19, 20, 21, 25, 26, 30, 31, 33, 34, 35, 36, 41, 46, 47, 48, 52, 53, 54, 55, 56, 57, 58, 60, 61, 63, 68, 71, 74, 75, 78, 79, 80, 83, 86, 88, 90, 91, 92, 93, 95, 97, 98, 99, 102, 103, 105, 108, 109, 116, 118, 119, 121, 123, 125
Offset: 1
The sequence of all strict integer partitions of odd numbers begins: (1), (3), (2,1), (5), (4,1), (7), (3,2), (9), (6,1), (11), (4,3), (5,2), (13), (8,1), (4,2,1), (15), (7,2), (10,1), (5,4), (6,3), (17), (12,1), (19), (9,2), (8,3), (21), (6,2,1), (7,4), (5,3,1), (11,2), (14,1), (4,3,2).
-
nn=200;
FDfactor[n_]:=If[n==1,{},Sort[Join@@Cases[FactorInteger[n],{p_,k_}:>Power[p,Cases[Position[IntegerDigits[k,2]//Reverse,1],{m_}:>2^(m-1)]]]]];
FDprimeList=Array[FDfactor,nn,1,Union];FDrules=MapIndexed[(#1->#2[[1]])&,FDprimeList];
Select[Range[nn],OddQ[Total[FDfactor[#]/.FDrules]]&]
A319828
FDH numbers of strict integer partitions of even numbers.
Original entry on oeis.org
1, 3, 5, 8, 9, 13, 14, 15, 17, 22, 23, 24, 27, 28, 29, 32, 37, 38, 39, 40, 42, 43, 44, 45, 49, 50, 51, 59, 62, 64, 65, 66, 67, 69, 70, 72, 73, 76, 77, 81, 82, 84, 85, 87, 89, 94, 96, 100, 101, 104, 106, 107, 110, 111, 112, 113, 114, 115, 117, 120, 122, 124
Offset: 1
The sequence of all strict integer partitions of even numbers begins: (), (2), (4), (3,1), (6), (8), (5,1), (4,2), (10), (7,1), (12), (3,2,1), (6,2), (5,3), (14), (9,1), (16).
-
nn=200;
FDfactor[n_]:=If[n==1,{},Sort[Join@@Cases[FactorInteger[n],{p_,k_}:>Power[p,Cases[Position[IntegerDigits[k,2]//Reverse,1],{m_}:>2^(m-1)]]]]];
FDprimeList=Array[FDfactor,nn,1,Union];FDrules=MapIndexed[(#1->#2[[1]])&,FDprimeList];
Select[Range[nn],EvenQ[Total[FDfactor[#]/.FDrules]]&]
Showing 1-6 of 6 results.
Comments