A200065 Start with n, concatenate its trivial divisors, and repeat until a prime is reached. a(n) = 0 if no prime is ever reached.
0, 0, 13, 0, 0, 0, 17, 0, 19, 0, 1111111111111111111, 0, 113, 0, 0, 0, 1117, 0, 11119, 0, 111121, 0, 1123, 0, 0, 0, 127, 0, 1129, 0, 131, 0
Offset: 1
Examples
17 -> {1, 17} = 117 (composite) -> {1, 117} = 1117 (prime), so a(17) = 1117.
Links
- Arkadiusz Wesolowski, Table of n, a(n) for n = 1..1032
Programs
-
Mathematica
lst = {}; Do[If[DivisorSigma[0, n] == 1 || Divisible[n, 5] || EvenQ[n], AppendTo[lst, 0], If[PrimeQ[n], n = 10^Length[IntegerDigits[n]] + n]; While[True, If[PrimeQ[n], Break[]]; n = FromDigits[Flatten[IntegerDigits[{1, n}]]]]; AppendTo[lst, n]], {n, 32}]; lst
Comments