|
|
A063383
|
|
a(1) = 6, a(n) = concatenation of two closest divisors of a(n-1) whose product equals a(n-1) or if a(n-1) is a prime then the concatenation of 1 and a(n-1).
|
|
1
|
|
|
6, 23, 123, 341, 1131, 2939, 12939, 57227, 89643, 329881, 1073083, 1197553, 7171079, 17171079, 57301247, 208327509, 1171780577, 1219684137, 1478297171, 2587571433, 2795835979, 8663322733, 13666409441, 113666409441, 1030771102733, 2114885171103, 6993025586797
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
LINKS
|
|
|
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
|
|
CROSSREFS
|
|
|
KEYWORD
|
base,nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|