login
A340419
Trajectory of 397 under the map A340008: n -> n/2 if n is even, n-> n^2 - 1 if n is an odd prime, otherwise n -> n - 1.
5
397, 157608, 78804, 39402, 19701, 19700, 9850, 4925, 4924, 2462, 1231, 1515360, 757680, 378840, 189420, 94710, 47355, 47354, 23677, 560600328, 280300164, 140150082, 70075041, 70075040, 35037520, 17518760, 8759380, 4379690, 2189845, 2189844, 1094922, 547461
OFFSET
0,1
COMMENTS
It is not known if this sequence reaches the value 1 and stops, or if it enters a cycle or diverges.
LINKS
EXAMPLE
a(0) = 397 is an odd prime, so a(1) = 397^2 - 1 = 157608.
a(1) = 157608 is even, so a(2) = a(1)/2 = 78804.
PROG
(PARI) v=397; for (n=1, 32, print1 (v", "); v=if (v%2==0, v/2, isprime(v), v^2-1, v-1))
CROSSREFS
Sequence in context: A152309 A298124 A327592 * A376801 A191942 A158316
KEYWORD
nonn,easy,look
AUTHOR
Rémy Sigrist, Jan 07 2021
STATUS
approved