OFFSET
1,1
COMMENTS
Is a rearrangement of A065091.
Another sequence can be created by reversing the beginning two terms. It would begin: 5, 3, 11, 29, 31, 7, 23, 13, 17, 37, ..., .
EXAMPLE
a(3) = 29 since a(1)+a(2) is 8 and 29 whose index is 10 and is of opposite parity to 5, whose index being 3 is odd, is the first prime which meets the criteria. 8 + 11 = 19, a prime see A073653(3), but the prime index of 11 is 5 and is of the same parity as the prime index of 5 and therefore cannot be used.
MATHEMATICA
f[s_List] := Block[{p = s[[-2]] + s[[-1]], q = NextPrime[2, Mod[PrimePi@ s[[-1]], 2]]}, While[ !PrimeQ[p + q] || MemberQ[s, q], q = NextPrime[q, 2]]; Append[s, q]]; Nest[f, {3, 5}, 58]
PROG
(PARI) v=[3, 5]; n=1; while(n<100, p=prime(n); if((primepi(v[#v])-n)%2&&isprime(v[#v]+v[#v-1]+p)&&!vecsearch(vecsort(v), p), v=concat(v, p); n=0); n++); v \\ Derek Orr, May 13 2015
CROSSREFS
KEYWORD
nonn
AUTHOR
Robert G. Wilson v, May 05 2015
STATUS
approved