cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A095081 Fibodd primes, i.e., primes p whose Zeckendorf-expansion A014417(p) ends with one.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Jun 01 2004

Keywords

Crossrefs

Intersection of A000040 and A003622. Union of A095086 and A095089. Cf. A095061, A095080.

Programs

  • 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 *)
  • 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