A345452 Positive integers with an even number of prime factors (counting repetitions) that sum to an even number.
1, 4, 9, 15, 16, 21, 25, 33, 35, 36, 39, 49, 51, 55, 57, 60, 64, 65, 69, 77, 81, 84, 85, 87, 91, 93, 95, 100, 111, 115, 119, 121, 123, 129, 132, 133, 135, 140, 141, 143, 144, 145, 155, 156, 159, 161, 169, 177, 183, 185, 187, 189, 196, 201, 203, 204, 205, 209, 213, 215
Offset: 1
Examples
The definition specifies that we count repeated prime factors. 6 = 2 * 3; the sum of these prime factors is 2 + 3 = 5, an odd number; so 6 is not in the sequence. 50 = 2 * 5 * 5 has 3 prime factors and 3 is an odd number; so 50 is not in the sequence. 60 = 2 * 2 * 3 * 5 has 4 prime factors and 4 is an even number; the sum of these factors is 2 + 2 + 3 + 5 = 12, also an even number; so 60 is in the sequence. 1 has 0 prime factors, which sum to 0 (the empty sum). 0 is even, so 1 is in the sequence.
Links
- Eric Weisstein's World of Mathematics, Group.
- Wikipedia, Polynomial ring.
Crossrefs
Programs
-
Mathematica
{1}~Join~Select[Range@1000,(s=Flatten[Table@@@FactorInteger[#]];And@@EvenQ@{Length@s,Total@s})&] (* Giorgos Kalogeropoulos, Jun 24 2021 *)
-
PARI
iseven(x) = ((x%2) == 0); isok(m) = my(f=factor(m)); iseven(sum(k=1, #f~, f[k,1]*f[k,2])) && iseven(sum(k=1, #f~, f[k,2])); \\ Michel Marcus, Jun 24 2021
-
PARI
is(n) = bigomega(n)%2 == 0 && valuation(n, 2)%2 == 0 \\ David A. Corneth, Jun 24 2021
-
Python
from sympy import factorint def ok(n): f = factorint(n) return sum(f.values())%2 == 0 and sum(p*f[p] for p in f)%2 == 0 print(list(filter(ok, range(1, 216)))) # Michael S. Branicky, Jun 24 2021
Comments