login
A337926
Number of ways to write n as the sum of two positive integers with different numbers of distinct prime factors.
1
0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 4, 4, 3, 6, 4, 6, 4, 5, 6, 9, 5, 8, 7, 7, 7, 10, 6, 11, 6, 10, 6, 11, 6, 15, 10, 12, 9, 14, 11, 15, 12, 13, 11, 18, 10, 17, 11, 17, 14, 20, 11, 19, 13, 18, 15, 21, 12, 20, 16, 21, 16, 24, 13, 24, 16, 20, 18, 25, 13, 24, 19, 22, 21, 26, 17, 27, 20
OFFSET
1,8
LINKS
FORMULA
a(n) = Sum_{i=1..floor(n/2)} (1 - [omega(i) = omega(n-i)]), where omega is the number of distinct prime factors (A001221) and [ ] is the Iverson bracket.
EXAMPLE
a(13) = 3; 13 = 12 + 1 = 10 + 3 = 7 + 6 and omega(12) > omega(1), omega(10) > omega(3) and omega(7) < omega(6).
MAPLE
omega:= n -> nops(numtheory:-factorset(n)):
f:= proc(n) nops(select(t -> omega(t) <> omega(n-t), [$1..n/2])) end proc:
map(f, [$1..100]); # Robert Israel, Jan 31 2021
MATHEMATICA
Table[Sum[1 - KroneckerDelta[PrimeNu[i], PrimeNu[n - i]], {i, Floor[n/2]}], {n, 100}]
PROG
(PARI) a(n) = sum(i=1, n\2, 1 - (omega(i) == omega(n-i))); \\ Michel Marcus, Sep 30 2020
CROSSREFS
Sequence in context: A298949 A329097 A197054 * A120502 A099480 A025783
KEYWORD
nonn,look
AUTHOR
Wesley Ivan Hurt, Sep 30 2020
STATUS
approved