OFFSET
1,7
COMMENTS
From Robert Israel, Jul 30 2020: (Start)
If n is prime, a(n) = A000720(floor(n/2)).
If n is a semiprime, a(n) = 1.
Otherwise a(n) = 0. (End)
LINKS
FORMULA
a(n) = Sum_{i=1..floor((n-1)/2)} [Omega(n*i) = 2], where [] is the Iverson bracket and Omega = A001222.
MAPLE
f:= proc(n) if isprime(n) then numtheory:-pi(floor(n/2)) elif numtheory:-bigomega(n)=2 then 1 else 0 fi end proc:
map(f, [$1..100]); # Robert Israel, Jul 30 2020
MATHEMATICA
Table[Sum[KroneckerDelta[PrimeOmega[n*i], 2], {i, Floor[(n - 1)/2]}], {n, 100}]
PROG
(PARI) a(n) = sum(i=1, (n-1)\2, bigomega(n*i) == 2); \\ Michel Marcus, Apr 22 2018
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Wesley Ivan Hurt, Apr 21 2018
STATUS
approved