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.
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
Offset: 2
Keywords
Examples
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.
Links
- Ray Chandler, Table of n, a(n) for n = 2..20001
Programs
Formula
a(n) = A294656(n) - 2.
Comments