Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Starts of record-length sequences of primes under iteration of the map x goes to (3*x+1)/2.
0

%I #35 Aug 30 2020 09:22:58

%S 2,3,7,31,2111,89599,44102911,35014031359,42884741301247,

%T 4322284854745087,571673085017796607,2374135870748049407

%N Starts of record-length sequences of primes under iteration of the map x goes to (3*x+1)/2.

%C Dickson's conjecture implies this sequence is infinite.

%C For all n > 2, a(n) mod 10 == 1, 7 or 9. - _Chai Wah Wu_, Aug 21 2020

%e a(3)=7 is in the sequence because iterating x -> (3*x+1)/2 starting with 7 we get a sequence of three primes 7 -> 11 -> 17, and there is no such sequence of three or more primes starting with a prime less than 7.

%p f:= proc(n) local R,x;

%p if not isprime(n) then return 0 fi;

%p x:= n;

%p R:= 1;

%p do

%p x:= (3*x+1)/2;

%p if not (x::integer and isprime(x)) then return R fi;

%p R:= R+1;

%p od

%p end proc:

%p R:= 2: x:= 2: rec:= 1:

%p while rec < 10 do

%p for x from ceil(x/2^rec)*2^rec-1 by 2^rec do

%p v:= f(x);

%p if v > rec then rec:= v; R:= R, x; break fi

%p od od:

%p R;

%t g[n_] := Length@NestWhileList[(3 # + 1)/2 &, n, PrimeQ] - 1;

%t r = {2}; x = 2; rec = 1;

%t While[rec < 10,

%t For[x = Ceiling[x/2^rec]*2^rec-1, x<Infinity, x=x+2^rec,

%t v = g[x];

%t If[v > rec, rec = v; AppendTo[r, x]; Break[]]]]; r (* _Robert Price_, Aug 28 2020, based on Maple program by Robert Israel *)

%K nonn,more

%O 1,1

%A _J. M. Bergot_ and _Robert Israel_, Aug 19 2020

%E a(8) from _Chai Wah Wu_, Aug 20 2020

%E a(9) from _Chai Wah Wu_, Aug 21 2020

%E a(10) from _Bert Dobbelaere_, Aug 27 2020

%E a(11) from _Bert Dobbelaere_, Aug 29 2020

%E a(12) from _Bert Dobbelaere_, Aug 30 2020