login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A164918 The smallest starting prime which reaches prime(n) by repeated application of the map x->A060308(x). 4

%I #12 Dec 01 2017 10:29:30

%S 2,2,2,2,11,2,17,11,2,29,17,11,41,2,47,29,59,17,67,71,11,41,2,47,97,

%T 101,29,107,109,17,127,67,137,11,149,151,41,2,167,47,179,181,191,97,

%U 197,29,107,17,227,229,233,239,241,127,67,263,269,137,11,281,283,149,307,311,41

%N The smallest starting prime which reaches prime(n) by repeated application of the map x->A060308(x).

%C a(n) is the starting value of the prime chain described in A164917 which contains (touches) prime(n).

%C By construction, each member of this sequence here is one of the values of A164368, the head elements of all chains of this map.

%H V. Shevelev, <a href="http://arXiv.org/abs/0908.2319">On critical small intervals containing primes</a>, arXiv:0908.2319 [math.NT], 2009.

%e The first four values are 2 because prime(1)=2, prime(2)=3, prime(3)=5 and prime(4)=7 are all in the prime chain starting at 2.

%p A060308 := proc(n) prevprime(2*n+1) ; end:

%p isA164368 := proc(p) local q ; q := nextprime(floor(p/2)) ; return (numtheory[pi](2*q) -numtheory[pi](p) >= 1); end proc:

%p A164368 := proc(n) option remember; local a; if n = 1 then 2; else a := nextprime( procname(n-1)) ; while not isA164368(a) do a := nextprime(a) ; end do : RETURN(a) ; end if; end proc:

%p A164918 := proc(n) local p, a, j, q, itr ; p := ithprime(n) ; a := 1000000000000000 ; for j from 1 do q := A164368(j) ; if q > p then break; end if; itr := 0 ; while q < p do q := A060308(q) ; itr := itr+1 ; end do; if q = p then return A164368(j) ; end if; end do: end proc:

%p seq(A164918(n), n=1..120) ; # _R. J. Mathar_, Mar 12 2010

%t lp[n_] := NextPrime[2n, -1];

%t a[n_] := For[pn = Prime[n]; p = 2, p <= pn, p = NextPrime[p], nwl = NestWhileList[lp, p, # <= Prime[n]&]; If[MemberQ[nwl, pn], Return[p]]];

%t Array[a, 120] (* _Jean-François Alcover_, Dec 01 2017 *)

%Y Cf. A006992, A164917, A104272, A164368, A164288.

%K nonn

%O 1,1

%A _Vladimir Shevelev_, Aug 31 2009

%E Edited and extended by _R. J. Mathar_, Mar 12 2010

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 05:18 EDT 2024. Contains 371964 sequences. (Running on oeis4.)