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.

This page as a plain text file.
%I A340419 #16 Jan 07 2021 16:44:00
%S A340419 397,157608,78804,39402,19701,19700,9850,4925,4924,2462,1231,1515360,
%T A340419 757680,378840,189420,94710,47355,47354,23677,560600328,280300164,
%U A340419 140150082,70075041,70075040,35037520,17518760,8759380,4379690,2189845,2189844,1094922,547461
%N 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.
%C A340419 It is not known if this sequence reaches the value 1 and stops, or if it enters a cycle or diverges.
%H A340419 Rémy Sigrist, <a href="/A340419/b340419.txt">Table of n, a(n) for n = 0..3998</a>
%e A340419 a(0) = 397 is an odd prime, so a(1) = 397^2 - 1 = 157608.
%e A340419 a(1) = 157608 is even, so a(2) = a(1)/2 = 78804.
%o A340419 (PARI) v=397; for (n=1, 32, print1 (v", "); v=if (v%2==0, v/2, isprime(v), v^2-1, v-1))
%Y A340419 Cf. A339991, A340008.
%K A340419 nonn,easy,look
%O A340419 0,1
%A A340419 _Rémy Sigrist_, Jan 07 2021