Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
A095081
Fibodd primes, i.e., primes p whose Zeckendorf-expansion A014417(p) ends with one.
4
17, 19, 43, 53, 59, 61, 67, 101, 103, 127, 137, 163, 179, 197, 211, 229, 239, 263, 271, 281, 307, 313, 331, 347, 349, 373, 383, 389, 433, 449, 457, 467, 491, 499, 509, 569, 577, 593, 601, 619, 643, 653, 661, 677, 739, 773, 787, 797, 821, 823
OFFSET
1,1
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
Intersection of A000040 and A003622. Union of A095086 and A095089. Cf. A095061, A095080.
Sequence in context: A289492 A262286 A108024 * A243437 A144709 A132239
KEYWORD
nonn
AUTHOR
Antti Karttunen, Jun 01 2004
STATUS
approved