The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 Please make a donation to keep the OEIS running. We are now in our 56th year. In the past year we added 10000 new sequences and reached almost 9000 citations (which often say "discovered thanks to the OEIS"). Other ways to donate

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A261518 a(n+1) = prime(n + a(n)) - prime(n), a(1) = 1. 1
 1, 1, 2, 6, 22, 92, 508, 3674, 34452, 408104, 5925564, 103023888, 2102941162, 49588317960, 1332831700026, 40376512041704, 1365483356241318, 51130344360226830, 2104788801045148866 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,3 LINKS MATHEMATICA FoldList[(Prime[#2+#1]-Prime[#2])&, 1, Range@15] (* Ivan N. Ianakiev, Aug 23 2015 *) RecurrenceTable[{a[n+1] == Prime[n+a[n]] - Prime[n], a[1]==1}, a, {n, 1, 16}] (* G. C. Greubel, Aug 24 2015 *) nxt[{n_, a_}]:={n+1, Prime[n+a]-Prime[n]}; NestList[nxt, {1, 1}, 16][[All, 2]] (* Harvey P. Dale, May 15 2018 *) PROG (Haskell) a261518 n = a261518_list !! (n - 1) a261518_list = 1 : zipWith (-)                (map a000040 (zipWith (+) a261518_list [1..])) a000040_list (MAGMA) [1] cat [n le 1 select 1 else  NthPrime(n + Self(n-1)) - NthPrime(n): n in [1..12]]; // Vincenzo Librandi, Aug 24 2015 (PARI) a(n) = if(n==1, 1, prime(n-1 + a(n-1)) - prime(n-1)); vector(12, n, a(n)) \\ Altug Alkan, Oct 05 2015 CROSSREFS Cf. A000040, A001223, A031131, A031165, A031166, A031167, A031168, A031169, A031170, A031171, A031172. Sequence in context: A074664 A091768 A229741 * A185349 A317652 A150274 Adjacent sequences:  A261515 A261516 A261517 * A261519 A261520 A261521 KEYWORD nonn,more AUTHOR Reinhard Zumkeller, Aug 23 2015 EXTENSIONS a(13)-a(16) from Ivan N. Ianakiev, Aug 23 2015 a(17)-a(19) from Jinyuan Wang, Jun 27 2020 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.

Last modified December 2 22:48 EST 2020. Contains 338897 sequences. (Running on oeis4.)