login
Indices of record values in A138753 (a "prime" variation of the Collatz (3n+1) problem).
3

%I #10 Aug 02 2023 14:11:42

%S 1,2,3,8,11,17,18,27,42,72,125,219,221,401,515,556,754,841,1146

%N Indices of record values in A138753 (a "prime" variation of the Collatz (3n+1) problem).

%C "Indices of ..." is equivalent to "starting values for ..."

%F a(n) = min { k | A138753(k) = A171938(n) }

%F Equals { m | A138753(k) < A138753(m) for all k<m }

%t A138754[n_]:=A138754[n]=With[{p=Prime[n]},PrimePi[NextPrime[If[Mod[p,3]==2,p/2,2p]]]];

%t A138753[n_]:=Length[NestWhileList[A138754,n,UnsameQ,{1,4}]]-1;

%t A138756list[upto_]:=Module[{v,r=0},Table[If[(v=A138753[n])>r,r=v;n,Nothing],{n,upto}]];

%t A138756list[500] (* _Paolo Xausa_, Jul 30 2023 *)

%o (PARI) m=0; for( i=1,#A138753, A138753[i] > m || next; m=A138753[i]; print1(i", "))

%Y Cf. A124123, A138750-A138754, A171938, A006877 (analog for Collatz problem).

%K nonn,hard,more

%O 1,2

%A _M. F. Hasler_, Apr 01 2008

%E a(15)-a(19) from _Paolo Xausa_, Jul 30 2023