cp's OEIS Frontend

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.

A066818 a(n) is the least k such that n + Sum_{i=1..k} A005384(i) is prime; or 0 if none exists.

This page as a plain text file.
%I A066818 #11 Jul 31 2020 15:45:04
%S A066818 1,2,1,12,1,2,3,2,1,4,1,2,3,2,1,4,1,2,3,4,1,4,5,2,7,2,1,6,1,6,3,2,3,6,
%T A066818 1,2,3,2,1,4,1,2,3,8,1,4,11,2,3,4,1,4,5,2,13,2,1,4,1,8,3,2,3,6,1,2,7,
%U A066818 2,1,10,1,8,3,2,15,4,1,2,3,4,1,4,5,2,7,4
%N A066818 a(n) is the least k such that n + Sum_{i=1..k} A005384(i) is prime; or 0 if none exists.
%C A066818 There is some empirical evidence to suggest a(n) is nonzero for every n. That is, every n can be expressed as the difference between a prime and a partial sum of the Sophie Germain primes series. See A066753 for a similar conjecture.
%e A066818 7 + (2 + 3 + 5) = 17, a prime and three consecutive Sophie Germain primes starting from 2, the first Sophie Germain prime, are needed to achieve this. So a(7) = 3.
%o A066818 (PARI) a(n) = my(p=0, s=n); for(k=1, oo, until(isprime(2*p+1), p=nextprime(p+1)); if(isprime(s+=p), return(k))); \\ _Jinyuan Wang_, Jul 30 2020
%Y A066818 Cf. A005384, A066753.
%K A066818 nonn
%O A066818 1,2
%A A066818 _Joseph L. Pe_, Jan 19 2002
%E A066818 a(53) corrected by and more terms from _Jinyuan Wang_, Jul 30 2020