login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A255562 A reversed prime Fibonacci sequence: a(n+2) is the smallest odd prime such that a(n) is the smallest odd prime divisor of a(n+1)+a(n+2). 1
3, 5, 7, 3, 11, 7, 37, 19, 277, 331, 223, 439, 7, 406507, 67, 330515394367, 967, 10576492618777, 116041, 223724392248491824062507397, 3691561, 100105207373914057144918297314160710207525630111509317, 423951181 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

COMMENTS

The sequence satisfies a(1) = 3, a(2) = 5, and a(n+2) is the smallest odd prime with the following property: a(n) is the smallest odd prime divisor of a(n+1)+a(n+2). It is a provably infinite sequence. It is also the "reverse" of a prime Fibonacci sequence terminating in 5,3. A prime Fibonacci sequence satisfies the following relation: a(n+2) is the smallest odd prime dividing a(n)+a(n+1), unless a(n)+a(n+1) is a power of two, in which case the sequence terminates. Prime Fibonacci sequences provably terminate, but provably can be extended indefinitely to the left.

LINKS

Table of n, a(n) for n=1..23.

J. F. Alm and T. Herald, A Note on Prime Fibonacci Sequences, Fibonacci Quarterly 54:1 (2016), pp. 55-58. arXiv:1507.04807 [math.NT], 2015.

PROG

(Python)

import math

def sieve(n):

    r = int(math.floor(math.sqrt(n)))

    composites = [j for i in range(2, r+1) for j in range(2*i, n, i)]

    primes = set(range(2, n)).difference(set(composites))

    return sorted(primes)

Primes = sieve(1000000)

Odd_primes = Primes[1:]

def find_smallest_odd_div(n):

    for p in Odd_primes:

        if n % p == 0:

            return p

def next_term(a, b):

    for p in Odd_primes:

        if (p + b) % a == 0:

            if find_smallest_odd_div(p+b) == a:

                return p

def compute_reversed_seq(a, b):

    seq = [a, b]

    while seq[-1] != None:

        seq.append(next_term(seq[-2], seq[-1]))

    return seq[:len(seq)-1]

print  compute_reversed_seq(3, 5)

(PARI) lista(nn) = {print1(pp=3, ", "); print1(p=5, ", "); for (n=1, nn, forprime(q=3, , s = (p+q)/ 2^(valuation(p+q, 2)); if ((s!=1) && pp == factor(s)[1, 1], np = q; break); ); print1(np, ", "); pp = p; p = np; ); } \\ Michel Marcus, Jul 11 2015

CROSSREFS

Cf. A214674.

Sequence in context: A121573 A196407 A156030 * A130140 A051417 A090368

Adjacent sequences:  A255559 A255560 A255561 * A255563 A255564 A255565

KEYWORD

nonn

AUTHOR

Jeremy F. Alm, Jul 10 2015

EXTENSIONS

a(16)-a(23) from Giovanni Resta, Jul 17 2015

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy .

Last modified February 24 05:37 EST 2018. Contains 299597 sequences. (Running on oeis4.)