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.

A294656 Size of the orbit of n under iteration of the map A125256: x -> smallest odd prime divisor of n^2+1.

Original entry on oeis.org

3, 3, 4, 2, 4, 3, 3, 6, 5, 7, 3, 2, 4, 4, 4, 3, 3, 6, 5, 3, 3, 3, 4, 4, 4, 3, 3, 4, 4, 3, 3, 3, 3, 4, 4, 3, 3, 5, 5, 5, 3, 3, 3, 4, 5, 3, 3, 4, 6, 5, 3, 3, 4, 4, 4, 3, 3, 6, 3, 6, 3, 3, 4, 4, 4, 3, 3, 7, 3, 5, 3, 3, 4, 5, 4, 3, 3, 6, 4, 4, 3, 3, 4, 4, 3, 3, 3, 4, 8, 6, 3
Offset: 2

Views

Author

M. F. Hasler, Nov 06 2017

Keywords

Comments

The orbit or trajectory under A125256 appears to end in the cycle 5 -> 13 -> 5 -> etc. for any initial value n.
Sequence A294658 gives the number of steps to reach either 5 or 13, i.e. an element of this terminating cycle. Therefore a(n) (which counts these two elements as well as the initial value) is 2 more than A294658(n) for all n. This is confirmed by careful examination of special cases - assuming, of course, that all trajectories end in the cycle (5, 13).

Examples

			For n = 1 the map A125256 is not defined.
a(2) = 3 = # { 2, 5, 13 }, because under A125256, 2 -> 2^2+1 = 5 (= its smallest odd prime factor), 5 -> least odd prime factor(5^2+1 = 26) = 13, 13 -> least odd prime factor(13^2 + 1 = 170 = 2*5*17) = 5, etc.
a(3) = 3 = # { 3, 5, 13 }, because under A125256, 3 -> smallest odd prime factor(3^2+1 = 10) = 5, 5 -> 13, 13 -> 5 etc.
a(4) = 4 = # { 4, 17, 5, 13 }, because under A125256, 4 -> 4^2+1 = 17 (= its smallest odd prime factor), 17 -> smallest odd prime factor(17^2+1 = 290 = 2*5*29) = 5, 5 -> 13, 13 -> 5 etc.
		

Crossrefs

Cf. A125256, A294657: largest number in the orbit, A294658: number of steps to reach the cycle (5, 13).

Programs

  • PARI
    A294656(n,f=A125256,S=[n])={while(#S<#S=setunion(S,[n=f(n)]),); #S} \\ Does not assume the terminating cycle is (5, 13): also works correctly in case there are other terminating cycles.

Formula

a(n) = A294658(n) + 2.