This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A249112 #22 Jan 03 2016 10:43:57 %S A249112 3,2,7,2,8,10,4,5,7,2,8,10,4,5,16,2,8,10,7,6,16,5,8,22,7,5,16,2,15,22, %T A249112 4,6,7,9,8,13,4,5,19,2,11,10,7,5,16,5,8,13,12,6,7,5,8,22,7,5,16,2,15, %U A249112 13,4,9,16,5,8,13,8,5,7,2,11,10,4,14,16,6,8 %N A249112 Second smallest k > 0 such that n+(1+2+...+k) is prime. %C A249112 Take the counting numbers and continue adding 1, 2, ..., a(n) until reaching a second prime. %C A249112 Conjecturally (Hardy & Littlewood conjecture F), a(n) exists for all n. - _Charles R Greathouse IV_, Oct 21 2014 %C A249112 It appears that the minimum value reached by a(n) is 2, and this occurs for n= 2, 4, 10, 16, 28, 40, 58, 70, ... Is this A144834? - _Michel Marcus_, Oct 26 2014 %H A249112 Charles R Greathouse IV, <a href="/A249112/b249112.txt">Table of n, a(n) for n = 1..10000</a> %F A249112 n+A000217(k) is prime for k=a(n) and exactly one smaller positive value. - _M. F. Hasler_, Oct 21 2014 %e A249112 a(3)=7 because 3+1+2+3+4+5+6+7=31 and one partial sum is prime. %e A249112 a(4)=2 because 4+1=5 and 4+1+2=7. %t A249112 Table[k = 0; Do[k++; While[! PrimeQ[n + Total@ Range@ k], k++], {x, 2}]; k, {n, 77}] (* _Michael De Vlieger_, Jan 03 2016 *) %o A249112 (PARI) a(n)=my(k, s=2); while(s, if(isprime(n+=k++), s--)); k \\ _Charles R Greathouse IV_, Oct 21 2014 %o A249112 (PARI) a(n,s=2)=my(k);until(isprime(n+=k++)&&!s--,);k \\ allows one to get A249113(n) as a(n,3). - _M. F. Hasler_, Oct 21 2014 %Y A249112 Cf. A085415, A249113. %K A249112 easy,nonn %O A249112 1,1 %A A249112 _Gil Broussard_, Oct 21 2014