login
This site is supported by donations to The OEIS Foundation.

 

Logo

Please make a donation to keep the OEIS running. We are now in our 55th year. In the past year we added 12000 new sequences and reached 8000 citations (which often say "discovered thanks to the OEIS"). We need to raise money to hire someone to manage submissions, which would reduce the load on our editors and speed up editing.
Other ways to donate

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A222532 a(1)=2; for n >= 1, a(n+1) is the least prime p_m such that a(n)=p_m-p_{m-1}+...+(-1)^{m-k}p_k for some 0<k<m. 7
2, 5, 7, 13, 17, 23, 31, 37, 43, 53, 59, 67, 73, 83, 89, 101, 109, 113, 131, 149, 157, 163, 173, 179, 197, 223, 257, 263, 269, 277, 283, 311, 347, 389, 401, 421, 431, 487, 503, 523, 557, 569, 577, 601, 613, 641, 661, 709, 733, 739, 773, 823, 827, 857, 883, 929, 947, 953, 977, 983, 997, 1009, 1019, 1031, 1039, 1051, 1097, 1117, 1129, 1151, 1181, 1223, 1229, 1237, 1249, 1279, 1327, 1361, 1373, 1423, 1459, 1481, 1499, 1543, 1559, 1571, 1601, 1621, 1627, 1669, 1693, 1699, 1721, 1733, 1759, 1783, 1823, 1873, 1973, 2011 (list; graph; refs; listen; history; text; internal format)
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

Cf. A000040, A008347, A222566, A163846, A163847.

Sequence in context: A045352 A278494 A107426 * A144256 A082555 A160794

Adjacent sequences:  A222529 A222530 A222531 * A222533 A222534 A222535

KEYWORD

nonn

AUTHOR

Zhi-Wei Sun, Feb 24 2013

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified December 5 20:45 EST 2019. Contains 329779 sequences. (Running on oeis4.)