OFFSET
1,1
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..10000
A. Karttunen and J. Moyer, C-program for computing the initial terms of this sequence
MATHEMATICA
r = Map[Fibonacci, Range[2, 12]]; Select[Prime@ Range@ 144, Last@ Flatten@ Map[Position[r, #] &, Abs@ Differences@ NestWhileList[Function[k, k - SelectFirst[Reverse@ r, # < k &]], # + 1, # > 1 &]] == 1 &] (* Michael De Vlieger, Mar 27 2016, Version 10 *)
PROG
(PARI)
genit(maxx)={for(n=1, maxx, q=(n-1)+(n+sqrtint(5*n^2))\2; if(isprime(q), print1(q, ", "))); } \\ Bill McEachen, Mar 26 2016
(Python)
from sympy import fibonacci, primerange
def a(n):
k=0
x=0
while n>0:
k=0
while fibonacci(k)<=n: k+=1
x+=10**(k - 3)
n-=fibonacci(k - 1)
return x
def ok(n):
return str(a(n))[-1]=="1"
print([n for n in primerange(1, 1001) if ok(n)]) # Indranil Ghosh, Jun 07 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Jun 01 2004
STATUS
approved