The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A272893 Number of iterations of the map p -> (p + q)/2 needed to reach the end of the cycle where the initial odd p = prime(n) and q is the smallest prime such that (p+q)/2 is prime, q different from p. 0
 3, 2, 2, 2, 2, 3, 3, 3, 4, 4, 1, 4, 4, 5, 5, 5, 2, 1, 2, 5, 5, 5, 6, 2, 6, 6, 6, 3, 6, 2, 2, 3, 3, 6, 6, 3, 6, 7, 7, 7, 3, 3, 7, 7, 7, 7, 7, 4, 7, 3, 3, 3, 3, 3, 4, 4, 4, 4, 7, 7, 7, 4, 4, 7, 8, 8, 8, 8, 4, 8, 4, 8, 8, 4, 8, 8, 8, 5, 8, 8, 8, 5, 8, 8, 8, 5, 5 (list; graph; refs; listen; history; text; internal format)
 OFFSET 2,1 COMMENTS The growth of a(n) is very slow. It seems that 3 < log_10(n)/log_10(a(n)) < 4 when n tends into infinity. a(n) = 1 for n = 12 and 19 (initial p = 37 and 67) for n < 10^5. Are there other values of n for which a(n) = 1? We observe long subsequences of consecutive identical numbers. For example, a(115) = a(116) = ... = a(132) = 9. LINKS EXAMPLE a(15) = 5 because prime(15) = 47, and we obtain the following trajectory: 47 -> 29 -> 17 -> 11 -> 7 -> 5. The prime 5 is the last term because 5 -> 11 with 11 = (5+17)/2 is already present in the trajectory. The elements of the trajectory are: 29 = (47+11)/2; 17 = (29+5)/2; 11 = (17+5)/2; 7 = (11+3)/2; 5 = (7+3)/2. MAPLE for n from 2 to 50 do: p0:=ithprime(n) :lst:={p0}: for it from 1 to 50 do :   ii:=0:    for m from 2 to 1000 while(ii=0) do:      p:=ithprime(m):q:=(p0+p)/2:       if type(q, prime)=true and q<>p        then        ii:=1:lst:=lst union {q}:        else       fi:     od:      p0:=q:    od:     n0:=nops(lst):printf(`%d, `, n0-1):   od: MATHEMATICA Table[Length@ Union@ NestList[Function[p, (p + SelectFirst[Prime@ Range[10^4], PrimeQ[(p + #)/2] && p != # &])/2], Prime@ n, 10] - 1, {n, 2, 88}] (* Michael De Vlieger, May 09 2016, Version 10 *) CROSSREFS Cf. A000040. Sequence in context: A057934 A058758 A122396 * A037199 A145376 A084402 Adjacent sequences:  A272890 A272891 A272892 * A272894 A272895 A272896 KEYWORD nonn AUTHOR Michel Lagneau, May 09 2016 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
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified May 30 17:35 EDT 2020. Contains 334728 sequences. (Running on oeis4.)