The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A214878 Least k such that Fibonacci(n) + Fibonacci(n+1) + ... + Fibonacci(n+k-1) is prime. 2
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 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,1
COMMENTS
Next term, if it exists, is bigger than 95000.
LINKS
EXAMPLE
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.
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 *)
PROG
(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);
}
}
}
CROSSREFS
Sequence in context: A366911 A077450 A328330 * A086138 A170822 A054546
KEYWORD
nonn,hard,more
AUTHOR
Alex Ratushnyak, Jul 29 2012
EXTENSIONS
a(37)-a(60) from T. D. Noe, Jul 30 2012
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 20 14:08 EDT 2024. Contains 372717 sequences. (Running on oeis4.)