# Greetings from The On-Line Encyclopedia of Integer Sequences! http://oeis.org/ Search: id:a130139 Showing 1-1 of 1 %I A130139 #24 Mar 09 2023 08:40:45 %S A130139 1,3,5,7,3,11,13,1129,17,19,37,23,5,313,29,31,311,1129,37,313,41,43 %N A130139 Let f denote the map that replaces k with the concatenation of its nontrivial divisors, written in increasing order, each divisor being written in base 10 in the normal way. Then a(n) = prime reached when starting at 2n+1 and iterating f. %C A130139 If 2n+1 is 1 or a prime, set a(n) = 2n+1. If no prime is ever reached, set a(n) = -1. %e A130139 n = 7: 2n+1 = 15 = 3*5 -> 35 = 5*7 -> 57 = 3*19 -> 319 = 11*29 -> 1129, prime, so a(7) = 1129. %o A130139 (Python) %o A130139 from sympy import divisors, isprime %o A130139 def f(n): return int("".join(str(d) for d in divisors(n)[1:-1])) %o A130139 def a(n): %o A130139 if n == 0: return 1 %o A130139 fn, c = 2*n + 1, 0 %o A130139 while not isprime(fn): %o A130139 fn, c = f(fn), c+1 %o A130139 return fn %o A130139 print([a(n) for n in range(22)]) # _Michael S. Branicky_, Jul 11 2022 %Y A130139 Cf. A037279, A130140, A130141, A130142. A bisection of A120716. %K A130139 nonn,base,more %O A130139 0,2 %A A130139 _N. J. A. Sloane_, Jul 30 2007 %E A130139 Name edited by _Michel Marcus_, Mar 09 2023 # Content is available under The OEIS End-User License Agreement: http://oeis.org/LICENSE