OFFSET
1,3
COMMENTS
a(p+1) = p, p is a prime.
If n is prime and 2n-3 is not prime, then a(n) = 0. - David Wasserman, Jan 27 2005
There are 105 zeros in the first 1000 terms. - Harvey P. Dale, Feb 24 2016
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..1000
EXAMPLE
a(10) = 9 + 7 + 3 = 19.
MATHEMATICA
cp[n_]:=SelectFirst[Accumulate[Select[Range[n, 1, -1], CoprimeQ[ #, n]&]], PrimeQ]/._Missing->0; Array[cp, 70] (* The program uses the SelectFirst function from Mathematica version 10 *) (* Harvey P. Dale, Feb 24 2016 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Amarnath Murthy and Meenakshi Srikanth (menakan_s(AT)yahoo.com), Jul 04 2003
EXTENSIONS
More terms from David Wasserman, Jan 27 2005
STATUS
approved