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

 

Logo

"Email this user" was broken Aug 14 to 9am Aug 16. If you sent someone a message in this period, please send it again.

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A164960 The minimum number of steps needed to generate prime(n) under the map x -> A060264(x) starting from any x taken from {2,3} or from A164333. 3
0, 0, 1, 1, 2, 0, 2, 0, 3, 1, 0, 3, 1, 0, 4, 0, 2, 0, 1, 0, 0, 4, 2, 1, 5, 0, 0, 1, 0, 0, 1, 0, 2, 0, 1, 0, 0, 5, 3, 0, 2, 0, 0, 0, 6, 0, 1, 1, 1, 0, 0, 0, 0, 0, 2, 1, 0, 0, 3, 1, 0, 0, 1, 0, 0, 1, 6, 4, 1, 0, 0, 3, 1, 0, 0, 1, 1, 7, 1 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,5

LINKS

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

V. Shevelev, On critical small intervals containing primes arXiv:0908.2319

EXAMPLE

a(3) = 1  because prime(3)=5 can be generated in 1 step starting from x=2.

a(4) = 1 because prime(4) =7 can be generated in 1 step starting from x=3.

MAPLE

# include source from A164333 and A060264 here

A164333 := proc(n)

        if n = 1 then

                13;

        else

                for a from procname(n-1)+1 do

                        if isA164333(a) then

                                return a;

                        end if;

                end do;

        end if;

end proc:

A164960aux := proc(p, strt)

        local a, x;

        if strt > p then

                return 1000000000;

        end if;

        a := 0 ;

        x := strt ;

        while x < p do

                x := A060264(x) ;

                a := a+1 ;

        end do;

        if x = p then

                return a ;

        else

                return 1000000000;

        end if;

end proc:

A164960 := proc(n)

        local p, a, strt, i;

        p := ithprime(n) ;

        a := A164960aux(p, 2) ;

        a := min(a, A164960aux(p, 3)) ;

        for i from 1 do

                strt := A164333(i) ;

                if strt > p then

                        return a;

                else

                        a := min(a, A164960aux(p, strt)) ;

                end if;

        end do:

        return a;

end proc:

seq(A164960(n), n=1..90) ; # R. J. Mathar, Oct 29 2011

CROSSREFS

Cf. A164333.

Sequence in context: A094098 A261079 A182485 * A124137 A164092 A025804

Adjacent sequences:  A164957 A164958 A164959 * A164961 A164962 A164963

KEYWORD

nonn

AUTHOR

Vladimir Shevelev, Sep 02 2009

EXTENSIONS

One term corrected, sequence extended, examples added . - R. J. Mathar, Oct 29 2011

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 August 17 03:38 EDT 2017. Contains 290631 sequences.