OFFSET
1,2
COMMENTS
LINKS
Rémy Sigrist, Table of n, a(n) for n = 1..10000
Rémy Sigrist, Illustration of the first terms
EXAMPLE
See illustration of the first terms in Links section.
MATHEMATICA
Array[FromDigits@ Flatten@ Map[IntegerDigits, DeleteCases[#, 1] /. {} -> {1}] &@ Flatten@ FixedPoint[Map[If[PrimeQ@ Last@ # || Last@ # == 1, #, {First@ #, FactorInteger@ Last@ #}] &, #, {Depth@ # - 2}] &, FactorInteger@ #] &, 58] (* or *)
Table[FromDigits@ Flatten@ Map[IntegerDigits, DeleteCases[ Flatten[ FactorInteger[n] //. {p_, e_} /; e > 1 :> {p, FactorInteger@ e}], 1] /. {} -> {1}], {n, 58}] (* Michael De Vlieger, Jun 11 2017 *)
PROG
(PARI) a(n) = my (s="", f=factor(n)); for (i=1, #f~, s=concat(s, Str(f[i, 1])); if (f[i, 2]>1, s=concat(s, Str(a(f[i, 2]))))); return (if(s=="", 1, eval(s)))
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Rémy Sigrist, Jun 11 2017
STATUS
approved