login
Fib101 primes, i.e., primes p whose Zeckendorf-expansion A014417(p) ends as one, zero, one.
3

%I #17 May 07 2021 13:30:37

%S 17,59,67,101,127,211,271,313,347,373,389,449,457,491,499,593,601,643,

%T 661,677,787,821,881,983,991,1033,1093,1109,1237,1279,1321,1381,1423,

%U 1499,1559,1567,1601,1609,1669,1753,1787,1847,1889,1931,1999

%N Fib101 primes, i.e., primes p whose Zeckendorf-expansion A014417(p) ends as one, zero, one.

%H A. Karttunen and J. Moyer, <a href="/A095062/a095062.c.txt">C-program for computing the initial terms of this sequence</a>

%o (Python)

%o from sympy import fibonacci, primerange

%o def a(n):

%o k=0

%o x=0

%o while n>0:

%o k=0

%o while fibonacci(k)<=n: k+=1

%o x+=10**(k - 3)

%o n-=fibonacci(k - 1)

%o return x

%o def ok(n): return str(a(n))[-3:]=="101"

%o print([n for n in primerange(1, 2001) if ok(n)]) # _Indranil Ghosh_, Jun 08 2017

%Y Intersection of A000040 and A134860. Cf. A014417, A095069.

%K nonn

%O 1,1

%A _Antti Karttunen_, Jun 01 2004