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.

Showing 1-3 of 3 results.

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

Original entry on oeis.org

1, 1, 5, 1, 6, 1, 8, 2, 5, 1, 7, 1, 5, 2, 5, 1, 7, 1, 5, 3, 6, 1, 6, 2, 5, 2, 13, 1, 6, 1, 5, 2, 5, 4, 6, 1, 8, 2, 5, 1, 6, 1, 5, 10, 5, 1, 7, 2, 8, 3, 5, 1, 7, 2, 5, 2, 7, 1, 6, 1, 5, 2, 6, 4, 6, 1, 8, 2, 5, 1, 6, 1, 5, 2, 5, 27, 7, 1, 5, 11, 5, 1, 15, 2, 5
Offset: 1

Views

Author

Joseph L. Pe, Jan 19 2002

Keywords

Comments

Is a(n) nonzero for all n? If so, then every n can be represented as the difference of a prime and a partial sum of the nonprime numbers series. See A066753 for a related possible representation of n as the difference of a prime and a partial sum of the prime numbers series.

Examples

			3 + (1 + 4 + 6 + 8 + 9) = 31, a prime and 5 consecutive nonprime numbers starting with 1 are required to achieve this. Hence a(3) = 5.
		

Crossrefs

Programs

  • PARI
    a(n) = my(c=0, s=n); for(k=1, oo, until(!isprime(c), c++); if(isprime(s+=c), return(k))); \\ Jinyuan Wang, Jul 30 2020

Extensions

More terms from Larry Reeves (larryr(AT)acm.org), Jun 12 2002

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

Original entry on oeis.org

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, 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, 2, 1, 10, 1, 8, 3, 2, 15, 4, 1, 2, 3, 4, 1, 4, 5, 2, 7, 4
Offset: 1

Views

Author

Joseph L. Pe, Jan 19 2002

Keywords

Comments

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.

Examples

			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.
		

Crossrefs

Programs

  • 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

Extensions

a(53) corrected by and more terms from Jinyuan Wang, Jul 30 2020

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

Original entry on oeis.org

2, 1, 10, 5, 2, 1, 2, 1, 12, 5, 2, 1, 4, 1, 4, 5, 2, 1, 2, 3, 4, 7, 12, 1, 2, 1, 4, 7, 2, 3, 2, 1, 4, 5, 2, 1, 4, 1, 6, 17, 2, 1, 4, 3, 6, 5, 2, 1, 2, 3, 4, 11, 12, 1, 2, 1, 4, 5, 2, 3, 2, 1, 4, 5, 14, 1, 2, 1, 10, 5, 2, 7, 10, 1, 6, 7, 2, 1, 8, 3, 4, 7, 26, 1
Offset: 1

Views

Author

Joseph L. Pe, Jan 21 2002

Keywords

Comments

Conjecture: a(n) is nonzero for all n, so every n can be represented as the difference between a prime and a partial sum of the safe primes series. See A066753 for a similar conjecture.

Examples

			4 + (5 + 7 + 11 + 23 + 47) = 97, a prime and 5 consecutive safe primes, starting from the first safe prime 5, are needed to achieve this. Hence a(4) = 5.
		

Crossrefs

Programs

  • PARI
    a(n) = my(p=3, s=n); for(k=1, oo, until(isprime((p-1)/2), p=nextprime(p+1)); if(isprime(s+=p), return(k))); \\ Jinyuan Wang, Jul 30 2020

Extensions

Offset changed to 1 by Jinyuan Wang, Jul 30 2020
Showing 1-3 of 3 results.