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.

Showing 1-4 of 4 results.

A005478 Prime Fibonacci numbers.

Original entry on oeis.org

2, 3, 5, 13, 89, 233, 1597, 28657, 514229, 433494437, 2971215073, 99194853094755497, 1066340417491710595814572169, 19134702400093278081449423917, 475420437734698220747368027166749382927701417016557193662268716376935476241
Offset: 1

Views

Author

Keywords

Comments

a(n) == 1 (mod 4) for n > 2. (Proof. Otherwise 3 < a(n) = F_k == 3 (mod 4). Then k == 4 (mod 6) (see A079343 and A161553) and so k is not prime. But k is prime since F_k is prime and k != 4 - see Caldwell.)
More generally, A190949(n) == 1 (mod 4). - N. J. A. Sloane
With the exception of 3, every term of this sequence has a prime index in the sequence of Fibonacci numbers (A000045); e.g., 5 is the fifth Fibonacci number, 13 is the seventh Fibonacci number, 89 the eleventh, etc. - Alonso del Arte, Aug 16 2013
Note: A001605 gives those indices. - Antti Karttunen, Aug 16 2013
The six known safe primes 2p + 1 such that p is a Fibonacci prime are in A263880; the values of p are in A155011. There are only two known Fibonacci primes p for which 2p - 1 is also prime, namely, p = 2 and 3. Is there a reason for this bias toward prime 2p + 1 over 2p - 1 among Fibonacci primes p? - Jonathan Sondow, Nov 04 2015

References

  • J.-M. De Koninck, Ces nombres qui nous fascinent, Entry 89, p. 32, Ellipses, Paris 2008.
  • R. K. Guy, Unsolved Problems in Number Theory, Section A3.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Subsequence of A178762.
Column k=1 of A303216.

Programs

  • Mathematica
    Select[Fibonacci[Range[400]], PrimeQ] (* Alonso del Arte, Oct 13 2011 *)
  • PARI
    je=[]; for(n=0,400, if(isprime(fibonacci(n)),je=concat(je,fibonacci(n)))); je
    
  • Python
    from itertools import islice
    from sympy import isprime
    def A005478_gen(): # generator of terms
        a, b = 1, 1
        while True:
            if isprime(b):
                yield b
            a, b = b, a+b
    A005478_list = list(islice(A005478_gen(),10)) # Chai Wah Wu, Jun 25 2024
  • Sage
    [i for i in fibonacci_xrange(0,10^80) if is_prime(i)] # Bruno Berselli, Jun 26 2014
    

Formula

a(n) = A000045(A001605(n)). A000040 INTERSECT A000045. - R. J. Mathar, Nov 01 2007

Extensions

Sequence corrected by Enoch Haga, Feb 11 2000
One more term from Jason Earls, Jul 12 2001
Comment and proof added by Jonathan Sondow, May 24 2011

A333087 Array (p(n,k)) read by antidiagonals: p(n,k) is the index of the prime in position (n,k) in the array A333086.

Original entry on oeis.org

1, 2, 4, 3, 5, 9, 6, 10, 12, 7, 24, 15, 25, 21, 8, 51, 46, 37, 43, 11, 13, 251, 98, 271, 140, 32, 28, 20, 3121, 329, 1430, 35505, 231, 40, 93, 22, 42613, 500, 5185, 85968, 349, 130, 311, 151, 35
Offset: 1

Views

Author

Clark Kimberling, Mar 10 2020

Keywords

Comments

As a sequence, this is a permutation of the positive integers.

Examples

			Northwest corner:
   1   2   3    6    24     51
   4   5  10   15    46     98
   9  12  25   37   271   1430
   7  21  43  140 35505  85968
   8  11  32  231   349   4410
  13  28  40  130  5655  20908
The 4th prime is 7, which occurs in the position (2,1) in A333086, so that p(2,1) = 4.
		

Crossrefs

Cf. A000040, A099000 (row 1), A333028, A333086.

Programs

  • Mathematica
    W[n_, k_] := Fibonacci[k + 1] Floor[n*GoldenRatio] + (n - 1) Fibonacci[k];
    t = Table[GCD[W[n, 1], W[n, 2]], {n, 1, 100}];
    u = Flatten[Position[t, 1]] ; v[n_, k_] := W[u[[n]], k];
    p[n_] := Table[v[n, k], {k, 1, 40}];
    TableForm[Table[Select[p[n], PrimeQ], {n, 1, 10}]]
    t1 = Table[PrimePi[Select[p[n], PrimeQ]], {n, 1, 10}]
    tt[n_, k_] := t1[[n]][[k]];
    Table[tt[n, k], {n, 1, 10}, {k, 1, 10}]  (* A333087 array *)
    ttt = Table[tt[n - k + 1, k], {n, 10}, {k, n, 1, -1}] // Flatten  (* A333087 sequence *)

A117517 Numbers k such that F(2*k + 1) is prime where F(m) is a Fibonacci number.

Original entry on oeis.org

1, 2, 3, 5, 6, 8, 11, 14, 21, 23, 41, 65, 68, 179, 215, 216, 224, 254, 284, 285, 1485, 2361, 2693, 4655, 4838, 7215, 12780, 15378, 17999, 18755, 25416, 40919, 52455, 65010, 74045, 100553, 198689, 216890, 295020, 296844, 302355, 465758, 524948, 642803, 818003, 901529, 984360, 1452176
Offset: 1

Views

Author

Parthasarathy Nambi, Apr 26 2006

Keywords

Comments

For F(k) to be prime, with k > 4, it is necessary but not sufficient for k to be prime. Hence after F(4) = 3, every prime F(m) is of the form F(2*k+1) for some k. Every prime divides some Fibonacci number. See also comment to A093062. - Jonathan Vos Post, Apr 29 2006

Examples

			If k=68 then F(2*k + 1) = 19134702400093278081449423917, a prime, so 68 is a term.
		

Crossrefs

Programs

  • Magma
    [n: n in [0..1000] | IsPrime(Fibonacci(2*n+1))]; // Vincenzo Librandi, May 24 2016
  • Mathematica
    Select[Range[0, 5000], PrimeQ[Fibonacci[2 # + 1]] &] (* Vincenzo Librandi, May 24 2016 *)

Formula

a(n) = (A083668(n)-1)/2. - R. J. Mathar, Jul 08 2009
a(n) = (A001605(n+1)-1)/2, n > 1. - Vincenzo Librandi, May 24 2016

Extensions

More terms from Vincenzo Librandi, May 24 2016

A377270 Smallest index k such that the k-th prime number in base-2 contains the n-th Fibonacci number in base-2 as a contiguous substring.

Original entry on oeis.org

1, 1, 1, 2, 3, 7, 6, 14, 33, 48, 24, 106, 51, 240, 362, 305, 251, 1269, 1047, 1752, 2456, 3773, 3121, 8959, 39089, 62223, 33299, 177305, 42613, 238782, 373418, 699763, 916051, 2715933, 2256419, 13103923, 7100513, 16902825, 13833549, 11323041, 66402079, 54299882
Offset: 1

Views

Author

Charles Marsden, Oct 22 2024

Keywords

Comments

The intersections between this sequence and similar sequences in base-B occur at values of n that are the indices of prime Fibonacci numbers, and values of a(n) such that the a(n)-th prime number is a Fibonacci number.

Examples

			For n=1, fib(1)=1 -> 1 in base-2. The first prime containing 1 in its base-2 form is P(1)=2 -> 10. Therefore, a(1)=1.
For n=4, fib(4)=3 -> 11 in base-2. The first prime containing 11 in its base-2 form is P(2)=3 -> 11. Therefore, a(4)=2.
For n=6, fib(6)=8 -> 1000 in base-2. The first prime containing 1000 in its base-2 form is P(7)=17 -> 10001. Therefore, a(6)=7.
		

Crossrefs

Programs

  • Mathematica
    s={}; Do[k=0; Until[SequenceCount[IntegerDigits[Prime[k], 2], IntegerDigits[Fibonacci[n], 2]]>0, k++]; AppendTo[s, k], {n, 31}]; s (* James C. McMahon, Nov 21 2024 *)
  • Python
    # See links.
    
  • Python
    from sympy import fibonacci, nextprime, primepi
    def A377270(n):
        f = fibonacci(n)
        p, k, a = nextprime(f-1), primepi(f-1)+1, bin(f)[2:]
        while True:
            if a in bin(p)[2:]:
                return k
            p = nextprime(p)
            k += 1 # Chai Wah Wu, Nov 20 2024
    
  • Sidef
    for n in (1..35) {
        var bin = n.fib.as_bin
        var min = Inf
        for k in (0..Inf) {
            ['0','1'].variations_with_repetition(k, {|*a|
                [a..., bin].variations(a.len+1, {|*t|
                    var m = Num(t.join, 2)
                    if (m.is_prime && m.as_bin.contains(bin)) {
                        min = m if (m < min)
                    }
                })
            })
            break if (min < Inf)
        }
        print(min.primepi, ", ")
    } # Daniel Suteu, Nov 02 2024

Formula

a(n) = A377483(A000045(n)). - Pontus von Brömssen, Nov 29 2024

Extensions

a(36)-a(42) from Daniel Suteu, Nov 02 2024
Showing 1-4 of 4 results.