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.

A214878 Least k such that Fibonacci(n) + Fibonacci(n+1) + ... + Fibonacci(n+k-1) is prime.

Original entry on oeis.org

3, 2, 2, 1, 1, 1, 5, 1, 4, 2, 4, 1, 5, 1, 4, 2, 4, 1, 5, 7, 29, 2, 37, 1, 11, 163, 5, 2, 4, 1, 5, 73, 19, 1433, 4, 13, 347, 61201, 4, 47, 43, 2, 41, 1, 4, 2, 13, 1, 131, 19, 4, 5, 7, 787, 173, 31, 13, 1265, 4, 11, 53
Offset: 0

Views

Author

Alex Ratushnyak, Jul 29 2012

Keywords

Comments

Next term, if it exists, is bigger than 95000.

Examples

			0+1+1=2, three summands, so a(0)=3,
1+1=2, two summands,
1+2=3, two summands,
2,
3,
5,
8+13+21+34+55=131, five summands, so a(6)=5, and so on.
		

Crossrefs

Programs

  • Java
    import static java.lang.System.out;
    import java.math.BigInteger;
    public class A214878 {
      public static void main (String[] args) {
        BigInteger prpr=BigInteger.ZERO, prpr0;
        BigInteger prev=BigInteger.ONE, prev0, curr, sum, prevSum;
        long i, n;
        for (n=0; ; ++n) {
          prpr0 = prpr;
          prev0 = prev;
          sum = BigInteger.ZERO;
          for (i=n; ; ++i) {
            sum = sum.add(prpr);
            if (sum.isProbablePrime(2)) {
              if (sum.isProbablePrime(80)) break;
            }
            curr = prev.add(prpr);
            prpr = prev;
            prev = curr;
          }
          out.printf("%d, ", i+1-n);
          prpr = prev0;
          prev = prev0.add(prpr0);
        }
      }
    }
  • Mathematica
    Table[k = n; p = Fibonacci[k]; While[! PrimeQ[p], k++; p = p + Fibonacci[k]]; k - n + 1, {n, 0, 30}] (* T. D. Noe, Jul 30 2012 *)

Extensions

a(37)-a(60) from T. D. Noe, Jul 30 2012
Showing 1-1 of 1 results.