A370267 Numbers with an even number of prime factors not of the form 8m+-1 (counting repetitions).
1, 4, 6, 7, 9, 10, 15, 16, 17, 22, 23, 24, 25, 26, 28, 31, 33, 36, 38, 39, 40, 41, 42, 47, 49, 54, 55, 57, 58, 60, 63, 64, 65, 68, 70, 71, 73, 74, 79, 81, 86, 87, 88, 89, 90, 92, 95, 96, 97, 100, 102, 103, 104, 105, 106, 111, 112, 113, 118, 119, 121, 122, 124, 127, 129
Offset: 1
Examples
7 is prime, so 7 is its only prime factor, which has the form 8m-1. So 7 has an even number (zero) of prime factors not of the form 8m+-1, and therefore is in the sequence. In terms of the subgroup generators described at the start of the comments, (13*8+1) * 4 / (6*10) = 105 * 4/60 = 7. 110 = 2 * 5 * 11, so it has 3 prime factors and all 3 do not have the form 8m+-1. 3 is odd, so 110 is not in the sequence.
Crossrefs
Programs
-
PARI
isok(k) = {c = core(k); c%8 == 1 || c%8 == 7 || c%16 == 6 || c%16 == 10}
-
Python
def A370267(n): def f(x): return n+x-sum(((y:=x>>(i<<1))-7>>3)+(y-1>>3)+2 for i in range((x.bit_length()>>1)+1))-sum(((z:=x>>(i<<1)+1)-5>>3)+(z-3>>3)+2 for i in range(x.bit_length()-1>>1)) m, k = n, f(n) while m != k: m, k = k, f(k) return m # Chai Wah Wu, Mar 19 2025
Comments