A120716 a(1)=1, a(p)=p if p is a prime. Otherwise, start with n and iterate the map (k -> concatenation of nontrivial divisors of k) until we reach a prime q; then a(n) = q. If we never reach a prime, a(n) = -1.
1, 2, 3, 2, 5, 23, 7
Offset: 1
Examples
4 -> 2, prime, so a(4) = 2. 6 -> 2,3 -> 23, prime, so a(6) = 23. 8 -> 2,4 -> 24 -> 2,3,4,6,8,12 -> 2346812 -> 2,4,13,26,52,45131,90262,180524,586703,1173406 -> 2413265245131902621805245867031173406 -> ? (see link for the continuation) 9 -> 3, prime, so a(9) = 3. 21 -> 3,7 -> 37, prime, so a(21) = 37.
Links
- N. J. A. Sloane et al., Notes on the attempt to find a(8)
Programs
-
Mathematica
A120716[n_] := Module[{x}, If[n == 1, Return[1]]; If[PrimeQ[n], Return[n]]; x = FromDigits[Flatten[IntegerDigits[Rest[Most[Divisors[n]]]]]]; If[x > 10^50, Return[">10^50"], A120716[x]]]; Table[A120716[n], {n, 1, 100}] (* Robert Price, Mar 27 2019 *)
Extensions
Edited by Michel Marcus, Mar 09 2023
Comments