OFFSET
1,4
LINKS
FORMULA
EXAMPLE
n=10, 2*10=20: 20-3=17, 20-5=15=3*5, 20-7=13, 20-11=9=3*3, 20-13=7, 20-17=3 and 20-19=1: with a(10)=8 primes 3,3,3,3,5,7,13,17.
MAPLE
A084766 := proc(n)
a := 0 ;
for i from 2 do
c := 2*n-ithprime(i) ;
if c < 2 then
return a;
end if;
a := a+numtheory[bigomega](c) ;
end do:
end proc:
seq(A084766(n), n=1..100) ; # R. J. Mathar, Jun 09 2014
MATHEMATICA
A084766[n_]:= Sum[PrimeOmega[2*n -Prime[j]], {j, 2, PrimePi[2*n]}];
Table[A084766[n], {n, 80}] (* G. C. Greubel, May 17 2023 *)
PROG
(Magma)
primeomega:= func< n | n eq 1 select 0 else (&+[p[2]: p in Factorization(n)]) >;
A084766:= func< n | n eq 1 select 0 else (&+[primeomega(2*n-j): j in PrimesInInterval(3, 2*n-1) ]) >;
[A084766(n): n in [1..80]]; // G. C. Greubel, May 17 2023
(SageMath)
from sympy import primeomega
def A084766(n): return sum(primeomega(2*n-j) for j in prime_range(3, 2*n))
[A084766(n) for n in range(1, 81)] # G. C. Greubel, May 17 2023
CROSSREFS
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, Jun 03 2003
STATUS
approved