OFFSET
1,1
COMMENTS
Conjecture: For any given prime p, if we define b(1)=p and let b(n+1) be the least prime p_m such that b(n)=p_m-p_{m-1}+...+(-1)^{m-k}p_k for some 0<k<m, then a(n)=b(n') for some positive integers n and n'. In other words, if we take all the primes as vertices of a simple graph T and let two vertices p and q>p adjacent if and only if q is the least prime p_m such that p=p_m-p_{m-1}+...+(-1)^{m-k}p_k for some 0<k<m, then the graph T is a tree!
Clearly the graph T contains no cycle. The vertices on the unique path connecting 2 and 71 are listed (in order) below: 2, 5, 7, 13, 17, 23, 31, 37, 43, 53, 59, 67, 73, 83, 89, 101, 109, 113, 131, 149, 139, 107, 97, 79, 71.
LINKS
Zhi-Wei Sun, Table of n, a(n) for n = 1..10000
Zhi-Wei Sun, On functions taking only prime values, J. Number Theory 133(2013), no.8, 2794-2812.
EXAMPLE
a(2)=5 and a(3)=7 since 2=5-3 and 5=7-5+3.
MATHEMATICA
k=1
n=1
s[0_]:=0
s[n_]:=s[n]=Prime[n]-s[n-1]
Do[If[m==1, Print[n, " ", 2]]; If[m==k, n=n+1; Do[If[s[j]-(-1)^(j-i)*s[i]==Prime[m], k=j; Print[n, " ", Prime[j]]; Goto[aa]], {j, m+1, PrimePi[3Prime[m]]}, {i, 0, j-2}]];
Label[aa]; Continue, {m, 1, 1000}]
CROSSREFS
KEYWORD
nonn
AUTHOR
Zhi-Wei Sun, Feb 24 2013
STATUS
approved