login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A294658 Number of steps required to reach either 5 or 13, starting with n, when iterating the map A125256: x -> smallest odd prime divisor of n^2+1; or a(n) = -1 in case 5 is never reached. 3
1, 1, 2, 0, 2, 1, 1, 4, 3, 5, 1, 0, 2, 2, 2, 1, 1, 4, 3, 1, 1, 1, 2, 2, 2, 1, 1, 2, 2, 1, 1, 1, 1, 2, 2, 1, 1, 3, 3, 3, 1, 1, 1, 2, 3, 1, 1, 2, 4, 3, 1, 1, 2, 2, 2, 1, 1, 4, 1, 4, 1, 1, 2, 2, 2, 1, 1, 5, 1, 3, 1, 1, 2, 3, 2, 1, 1, 4, 2, 2, 1, 1, 2, 2, 1, 1 (list; graph; refs; listen; history; text; internal format)
OFFSET

2,3

COMMENTS

The orbit or trajectory under A125256 appears to end in the cycle 5 -> 13 -> 5 -> etc. for any initial value n.

Sequence A294656 gives the size of the complete orbit of n under the map A125256, including the two elements 5 and 13 of the terminating cycle. Thus a(n) is 2 less than A294656(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).

LINKS

Ray Chandler, Table of n, a(n) for n = 2..20001

FORMULA

a(n) = A294656(n) - 2.

EXAMPLE

For n = 1 the map A125256 is not defined.

a(2) = 1 because under A125256, 2 -> 2^2+1 = 5 (= its smallest odd prime factor), so 5 is reached after just a(2) = 1 iteration of this map.

a(3) = 1 because A125256(3) = 5, least odd prime factor of 3^2+1 = 10 = 2*5, so here again 5 is reached after just a(2) = 1 iteration of A125256.

a(4) = 2 because A125256(4) = 4^2 + 1 = 17, and A125256(17) = 5 = least odd prime factor of 17^2 + 1 = 289 + 1 = 2*5*29, so 5 is reached after a(4) = 2 iterations of A125256.

a(5) = a(13) = 0 because for these initial values 5 and 13, no iteration is needed until either 5 or 13 is reached.

PROG

(PARI) A294658(n)=for(k=0, oo, bittest(8224, n)&&return(k); n=A125256(n)) \\ 8224 = 2^5 + 2^13. One could add 2^0 + 2^1 = 3 to avoid an error message for initial values 0 and 1, for which A125256 is not defined.

CROSSREFS

Cf. A125256, A294656, A294657.

Sequence in context: A112467 A112466 A166348 * A127543 A280830 A068907

Adjacent sequences:  A294655 A294656 A294657 * A294659 A294660 A294661

KEYWORD

nonn

AUTHOR

M. F. Hasler, Nov 06 2017

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 3 13:15 EST 2021. Contains 341762 sequences. (Running on oeis4.)