OFFSET
1,2
COMMENTS
This is the sum of distinct squarefree semiprimes with prime indices summing to n + 1. A squarefree semiprime is a product of any two distinct prime numbers. A prime index of n is a number m such that the m-th prime number divides n. The multiset of prime indices of n is row n of A112798. - Gus Wiseman, Dec 05 2020
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
Gus Wiseman, Sum of prime(i) * prime(j) for i + j = n, i != j.
FORMULA
a(n) = A024697(n) for even n. - M. F. Hasler, Apr 06 2014
EXAMPLE
From Gus Wiseman, Dec 05 2020: (Start)
The sequence of sums begins (n > 1):
6 = 6
10 = 10
29 = 14 + 15
43 = 22 + 21
94 = 26 + 33 + 35
128 = 34 + 39 + 55
231 = 38 + 51 + 65 + 77
279 = 46 + 57 + 85 + 91
(End)
MATHEMATICA
f[n_] := Block[{primeList = Prime@ Range@ n}, Total[ Take[ primeList, Floor[n/2]]*Reverse@ Take[ primeList, {Floor[(n + 3)/2], n}]]]; Array[f, 44] (* Robert G. Wilson v, Apr 07 2014 *)
PROG
(PARI) A025129=n->sum(k=1, n\2, prime(k)*prime(n-k+1)) \\ M. F. Hasler, Apr 06 2014
(Haskell)
a025129 n = a025129_list !! (n-1)
a025129_list= f (tail a000040_list) [head a000040_list] 1 where
f (p:ps) qs k = sum (take (div k 2) $ zipWith (*) qs $ reverse qs) :
f ps (p : qs) (k + 1)
-- Reinhard Zumkeller, Apr 07 2014
CROSSREFS
The nonsquarefree version is A024697 (shifted right).
Row sums of A338905 (shifted right).
A332765 is the greatest among these squarefree semiprimes.
A001358 lists semiprimes.
A006881 lists squarefree semiprimes.
A014342 is the self-convolution of the primes.
A056239 is the sum of prime indices of n.
A339194 sums squarefree semiprimes grouped by greater prime factor.
KEYWORD
nonn
AUTHOR
EXTENSIONS
Following suggestions by Robert Israel and N. J. A. Sloane, initial 0=a(1) added by M. F. Hasler, Apr 06 2014
STATUS
approved