OFFSET
0,1
COMMENTS
a(0)=14831 is a prime; the next prime number in the sequence is a(18604) = 2278143...6069, which has 3893 digits. (The initial values are chosen for this particularly long chain of consecutive composites.)
LINKS
Colin Barker, Table of n, a(n) for n = 0..1000
D. E. Knuth, A Fibonacci-like sequence of composite numbers, Math. Mag. 63 (1) (1990) 21-25.
Index entries for linear recurrences with constant coefficients, signature (1,1).
FORMULA
From R. J. Mathar, Dec 12 2010: (Start)
a(n) = a(n-1) + a(n-2).
G.f.: (14831+26238*x) / (1-x-x^2).
(End)
a(n) = (2^(-1-n)*((1-sqrt(5))^n*(-67307+14831*sqrt(5)) + (1+sqrt(5))^n*(67307+14831*sqrt(5)))) / sqrt(5). - Colin Barker, May 03 2017
MAPLE
a:= n-> (<<0|1>, <1|1>>^n. <<14831, 41069>>)[1, 1]:
seq(a(n), n=0..30); # Alois P. Heinz, Oct 06 2021
MATHEMATICA
q=2; Do[Do[If[GCD[x, y]!=1, Break[]]; a=x; b=y; lst={a, b}; k=2; Do[If[PrimeQ[c=a+b], Break[]]; k++; AppendTo[lst, c]; a=b; b=c, {n, 10!}]; If[k>q, q=k; Print[If[Length[lst]>9, Take[lst, 9], lst], k, "=", c]], {y, 2*x+1, 4*x+1}], {x, 0, 10!}]
PROG
(PARI) Vec((14831+26238*x) / (1-x-x^2) + O(x^30)) \\ Colin Barker, May 03 2017
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Vladimir Joseph Stephan Orlovsky, Dec 10 2010
STATUS
approved