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-1 of 1 results.

A214874 Starting with Fibonacci(0), the sum of a(n) successive Fibonacci numbers is prime.

Original entry on oeis.org

3, 1, 1, 1, 5, 1, 5, 1, 5, 1, 11, 13, 131, 31, 65, 49, 47, 13, 2231, 389, 5269, 72211, 12587, 51193
Offset: 1

Views

Author

Alex Ratushnyak, Jul 28 2012

Keywords

Comments

a(22), if it exists, is bigger than 60300.
The sequence with corresponding primes begins: 2, 2, 3, 5, 131, 89, 2351, 1597, 42187, 28657, 14855327, 7763811697. The prime corresponding to a(21) = 5269 has 1729 decimal digits.

Examples

			0+1+1 = 2 is prime, three summands,
2 is prime,
3 is prime,
5 is prime,
8+13+21+34+55 = 131 is prime, five summands,
89 is prime,
144+233+377+610+987 = 2351 is prime, five summands,
1597 is prime.
		

Crossrefs

Programs

  • Java
    import static java.lang.System.out;
    import java.math.BigInteger;
    public class A214874 {
      public static void main (String[] args) {
        long i, n=0;
        BigInteger prpr = BigInteger.ZERO;
        BigInteger prev = BigInteger.ONE, curr;
        while (true) {
          BigInteger bsum = BigInteger.ZERO;
          for (i=n; ; ++i) {
            bsum = bsum.add(prpr);
            curr = prev.add(prpr);
            prpr = prev;
            prev = curr;
            if (bsum.isProbablePrime(2)) {
                    if (bsum.isProbablePrime(80)) break;
                    out.printf("(%d)",i);
            }
          }
          out.printf("%d, ", i+1-n);
          n=i+1;
        }
      }
    }

Extensions

a(22)-a(24) from Michael S. Branicky, Nov 21 2024
Showing 1-1 of 1 results.