OFFSET
1,1
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..100
MATHEMATICA
f[ n_Integer ] := (d = Divisors[ n ]; l = Length[ d ]; If[ EvenQ[ l ], ToExpression[ ToString[ d[[ l/2 ] ] ] <> ToString[ d[[ l/2 + 1 ] ] ] ], ToExpression[ ToString[ d[[ l/2 + .5 ] ] ] <> ToString[ d[[ l/2 + .5 ] ] ] ] ] ); NestList[ f, 6, 25 ]
tcf[n_]:=Module[{d=Divisors[n], len}, len=Length[d]/2; FromDigits[Flatten[ IntegerDigits/@Take[d, {len, len+1}]]]]; ctc[n_]:=If[PrimeQ[ n], 10^IntegerLength[ n]+n, tcf[n]]; NestList[ctc, 6, 30] (* Harvey P. Dale, May 19 2019 *)
PROG
(Python)
from sympy import divisors, isprime
def aupton(terms):
alst = [6]
for n in range(2, terms+1):
if isprime(alst[-1]): alst.append(int('1' + str(alst[-1])))
else:
divs = divisors(alst[-1])
d1 = divs[(len(divs)-1)//2]
d2 = alst[-1]//d1
alst.append(int(str(d1) + str(d2)))
return alst
print(aupton(27)) # Michael S. Branicky, Jun 23 2021
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Robert G. Wilson v, Aug 08 2001
EXTENSIONS
Definition clarified by Harvey P. Dale, May 19 2019
STATUS
approved