OFFSET
1,1
COMMENTS
This sequence provides a record of the search for the home prime for 49.
This sequence has now been followed for 117 steps without a prime being reached (after which of course it would simply repeat).
LINKS
Patrick De Geest, Table of n, a(n) for n = 1..119
P. De Geest, Home Primes
Eric Weisstein's World of Mathematics, Home Prime
MATHEMATICA
g[n_] := (x = n; d = {}; While[FactorInteger[x] != {}, f = FactorInteger[x, FactorComplete -> True][[1, 1]]; x = x/f; AppendTo[d, IntegerDigits[f]]]; FromDigits[Flatten[d]]); NestList[g, 49, 25]
(* Second program: *)
NestList[FromDigits@ Flatten@ Map[IntegerDigits, FactorInteger[#] /. {p_, e_} /; p >= 1 :> If[p == 1, 1, ConstantArray[p, e]]] &, 49, 16] (* Michael De Vlieger, Apr 27 2017 *)
PROG
(PARI) a=vector(35); a[1]=49; for(k=2, length(a), f=factor(a[k-1]); for(i=1, matsize(f)[1], l=10^ceil(log(f[i, 1])/log(10)); for(j=1, f[i, 2], a[k]=a[k]*l+f[i, 1]))) \\ M. F. Hasler, Mar 09 2007
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Robert G. Wilson v, Sep 05 2000
EXTENSIONS
b-file updated by Max Alekseyev, Nov 28 2017
STATUS
approved