cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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.

Original entry on oeis.org

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

Views

Author

Rémy Sigrist, Jan 07 2021

Keywords

Comments

It is not known if this sequence reaches the value 1 and stops, or if it enters a cycle or diverges.

Examples

			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.
		

Crossrefs

Programs

  • PARI
    v=397; for (n=1, 32, print1 (v", "); v=if (v%2==0, v/2, isprime(v), v^2-1, v-1))