login
A342180
a(1)=2, a(2)=3, a(n+1) is the smallest prime obtainable using the Fibonacci recurrence, with a(n-1) and a(n-2) as start terms.
0
2, 3, 5, 13, 31, 313, 2659, 96979, 97340263, 96133996771, 288596670839, 35613385860024917251, 1210855125301377274153, 41916955363307350583473, 15591408363472449707385195674347327, 1169745412471464144682860140699762684239, 3996415043088150608161205763193030023888222461378463323
OFFSET
1,1
COMMENTS
33 terms have been calculated; the last, having 13189 decimal digits, required 25197 iterations to compute. It is not known if the sequence continues beyond a(33).
EXAMPLE
a(1)+a(2)=2+3=5, so a(3)=5.
a(2)+a(3)=3+5=8 and 5+8=13, so a(4)=13.
MATHEMATICA
Block[{a = {2, 3}, j, k, s}, Do[Set[{j, k}, a[[-2 ;; -1]]]; While[! PrimeQ[Set[s, j + k]], Set[{j, k}, {k, s}]]; AppendTo[a, s], {i, Length@ a + 1, 12}]; a] (* Michael De Vlieger, Mar 04 2021 *)
PROG
(Python)
from sympy import isprime
def aupton(terms):
alst = [2, 3]
for n in range(3, terms+1):
fnm2, fnm1 = alst[-2:]
while not isprime(fnm2 + fnm1): fnm2, fnm1 = fnm1, fnm2+fnm1
alst.append(fnm2 + fnm1)
return alst
print(aupton(16)) # Michael S. Branicky, Mar 04 2021
CROSSREFS
Sequence in context: A060434 A072999 A175093 * A345076 A353582 A233515
KEYWORD
nonn
AUTHOR
STATUS
approved