Fibonacci Sequences

I could not find a single topic, despite numerous searches. Sorry if this has already been described here.

Can someone point me in the right direction for further research on the following topic:

I played recently with a Fibonacci sequence and primes. I noticed that, at least for some source elements in this sequence, if you marked all the primes in the sequence (I did this for numbers: 2 (odd prime), 3,5,13,89,233,1597,28657) and check their place in the sequence, it also turns out to be simple. I affirm that 0 is the 0th item. Here are a few examples: for 2 (an odd prime), which is the third number of the sequence - 3, is also simple, since the 13th - 7th number of the sequence - 7 is also prime, for 233 - this is the 17th number of the sequence - 17 is also prime . This seems to be true for all primes up to 17 elements in a sequence, then it starts to diverge, since 19 (19 is a prime) sequence number is 4181,which is not simple.

To a good example:

    item number Fib number  
    0       0   
    1       1   
    2       1   
prime   3       2   prime   !
not prm 4       3   prime
prime   5       5   prime   !
    6       8   
prime   7       13  prime   !
    8       21  
    9       34  
    10      55  
prime   11      89  prime   !
    12      144 
prime   13      233 prime   !
    14      377 
    15      610 
    16      987 
prime   17      1597    prime   !
    18      2584    
prime   19      4181    not prime
    20      6765    
    21      10946   
    22      17711   
prime   23      28657   prime   !
    24      46368   
    25      75025   
    26      121393  
    27      196418  
    28      317811  
prime   29      514229  prime   !
    30      832040  
prime   31      1346269 not prime
    32      2178309 
    33      3524578 
    34      5702887 
    35      9227465 
    36      14930352    
prime   37      24157817    not prime
    38      39088169    
    39      63245986    
    40      102334155   
    41      165580141

Despite the fact that there are certain numbers in the sequence that are strokes, but their sequence number is not simple and vice versa, it is still quite interesting to know why such a pattern exists, and if this is true for most Fibonacci sequence numbers.

Again, apologies if this is something obvious.

TIA for any clarification on this!

+4
source share
2 answers

You can look at A001605 and follow the links from there. The online encyclopedia of whole sequences is a fantastic resource for such things.

I also discuss fibonacci examples on my blog .

+4

, :

  • , ?

  • , ?

:

n = 4, ,..., .

, 1 , 19, 2 , Fibonacci prime 3, 4.

, Python (sorta):

def is_prime(n):
    if n > 1 and n % 2 != 0 or n == 2:
        for i in range(3, int(n ** 0.5) + 1, 2):
            if n % i == 0:
                break
        else:
            return n

    return '*' * len(str(n))

print('n', 'f', sep='\t')

f, p, n = 0, 1, 0

while True:
    print(is_prime(n), is_prime(f), sep='\t')

    f, p, n = f + p, f, n + 1

OUTPUT

n   f
*   *
*   *
2   *
3   2
*   3
5   5
*   *
7   13
*   **
*   **
**  **
11  89
**  ***
13  233
**  ***
**  ***
**  ***
17  1597
**  ****
19  ****
**  ****
**  *****
**  *****
23  28657
**  *****
**  *****
**  ******
**  ******
**  ******
29  514229
**  ******
31  *******
**  *******
**  *******
**  *******
**  *******
**  ********
37  ********
**  ********
**  ********
**  *********
41  *********
**  *********
43  433494437
**  *********
**  **********
**  **********
47  2971215073
**  **********
**  **********
**  ***********
**  ***********
**  ***********
53  ***********
**  ***********
**  ************
**  ************
**  ************
**  ************
59  ************
**  *************
61  *************
**  *************
**  *************
**  **************
**  **************
**  **************
67  **************
**  **************
**  ***************
**  ***************
71  ***************
**  ***************
73  ***************
**  ****************
**  ****************
**  ****************
**  ****************
**  ****************
79  *****************
**  *****************
**  *****************
**  *****************
83  99194853094755497
**  ******************
**  ******************
**  ******************
**  ******************
**  *******************
89  *******************
**  *******************
**  *******************
**  *******************
**  ********************
+2

Source: https://habr.com/ru/post/1684219/


All Articles