OFFSET
1,2
MATHEMATICA
(*Returns the various ways a number (presumed to be even) can be split as a sum of 2 Primes.*)
getGoldBachSplits[n_Integer] := Module[{i, splits = {}, a, b},
(
For[i = 1,
Prime[i] < n,
i++,
a = Prime[i] ;
b = n - Prime[i];
If[PrimeQ[b],
If[MemberQ[splits, {b, a}], Null,
AppendTo[splits, {a, b}]],
Null];
]; (*End For-loop...*)
splits
)
]
(* Now we generate our series...*)
series[n_] :=
Module[{}, (Table[Prime[i]*Length[getGoldBachSplits[2 i]], {i, 2, n}])]
CROSSREFS
KEYWORD
nonn
AUTHOR
Raghavendra Ugare, Mar 14 2014
STATUS
approved