A138756 Indices of record values in A138753 (a "prime" variation of the Collatz (3n+1) problem).
1, 2, 3, 8, 11, 17, 18, 27, 42, 72, 125, 219, 221, 401, 515, 556, 754, 841, 1146
Offset: 1
Programs
-
Mathematica
A138754[n_]:=A138754[n]=With[{p=Prime[n]},PrimePi[NextPrime[If[Mod[p,3]==2,p/2,2p]]]]; A138753[n_]:=Length[NestWhileList[A138754,n,UnsameQ,{1,4}]]-1; A138756list[upto_]:=Module[{v,r=0},Table[If[(v=A138753[n])>r,r=v;n,Nothing],{n,upto}]]; A138756list[500] (* Paolo Xausa, Jul 30 2023 *)
-
PARI
m=0; for( i=1,#A138753, A138753[i] > m || next; m=A138753[i]; print1(i", "))
Formula
Extensions
a(15)-a(19) from Paolo Xausa, Jul 30 2023
Comments