login
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.
7
1, 3, 5, 7, 3, 11, 13, 1129, 17, 19, 37, 23, 5, 313, 29, 31, 311, 1129, 37, 313, 41, 43
OFFSET
0,2
COMMENTS
If 2n+1 is 1 or a prime, set a(n) = 2n+1. If no prime is ever reached, set a(n) = -1.
EXAMPLE
n = 7: 2n+1 = 15 = 3*5 -> 35 = 5*7 -> 57 = 3*19 -> 319 = 11*29 -> 1129, prime, so a(7) = 1129.
PROG
(Python)
from sympy import divisors, isprime
def f(n): return int("".join(str(d) for d in divisors(n)[1:-1]))
def a(n):
if n == 0: return 1
fn, c = 2*n + 1, 0
while not isprime(fn):
fn, c = f(fn), c+1
return fn
print([a(n) for n in range(22)]) # Michael S. Branicky, Jul 11 2022
CROSSREFS
Cf. A037279, A130140, A130141, A130142. A bisection of A120716.
Sequence in context: A099984 A130141 A130142 * A204938 A101088 A134487
KEYWORD
nonn,base,more
AUTHOR
N. J. A. Sloane, Jul 30 2007
EXTENSIONS
Name edited by Michel Marcus, Mar 09 2023
STATUS
approved