[go: up one dir, main page]

login
A171938
Record values in A138753 (a "prime" variation of the Collatz (3n+1) problem).
3
1, 4, 5, 8, 21, 22, 24, 29, 60, 61, 72, 73, 97, 100, 184, 216, 239, 451, 469
OFFSET
1,2
FORMULA
A171938 = { A138753(m) | A138753(k) < A138753(m) for all k<m }.
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;
A171938list[upto_]:=Module[{v, r=0}, Table[If[(v=A138753[n])>r, r=v, Nothing], {n, upto}]];
A171938list[500] (* Paolo Xausa, Jul 29 2023 *)
PROG
(PARI) m=0; for( i=1, #A138753, A138753[i] > m & print1( m=A138753[i], ", "))
CROSSREFS
Cf. A124123, A138750-A138754, A138756, A006878 (analog for Collatz problem).
Sequence in context: A258935 A275929 A240794 * A325878 A352396 A072808
KEYWORD
nonn,hard,more
AUTHOR
M. F. Hasler, Apr 01 2008
EXTENSIONS
Originally submitted as A138755, but mislaid by Editor-in-Chief; renumbered and added to OEIS, Oct 24 2010
a(15)-a(19) from Paolo Xausa, Jul 29 2023
STATUS
approved