OFFSET
1,2
LINKS
N. J. A. Sloane, Table of n, a(n) for n = 1..20000 [First 10000 terms from T. D. Noe]
Patrick De Geest, Home Primes
N. J. A. Sloane, Confessions of a Sequence Addict (AofA2017), slides of invited talk given at AofA 2017, Jun 19 2017, Princeton. Mentions this sequence.
N. J. A. Sloane, Three (No, 8) Lovely Problems from the OEIS, Experimental Mathematics Seminar, Rutgers University, Oct 05 2017, Part I, Part 2, Slides. (Mentions this sequence)
Eric Weisstein's World of Mathematics, Home Prime
EXAMPLE
If n = 2^3*5^5*11^2 = 3025000, a(n) = 222555551111 (n=2*2*2*5*5*5*5*5*11*11, then remove the multiplication signs).
MAPLE
# This is for n>1
read("transforms") ;
A037276 := proc(n)
local L, p ;
L := [] ;
for p in ifactors(n)[2] do
L := [op(L), seq(op(1, p), i=1..op(2, p))] ;
end do:
digcatL(L) ;
end proc: # R. J. Mathar, Oct 29 2012
MATHEMATICA
co[n_, k_] := Nest[Flatten[IntegerDigits[{#, n}]] &, n, k - 1]; Table[FromDigits[Flatten[IntegerDigits[co @@@ FactorInteger[n]]]], {n, 54}] (* Jayanta Basu, Jul 04 2013 *)
FromDigits@ Flatten@ IntegerDigits[Table[#1, {#2}] & @@@ FactorInteger@ #] & /@ Range@ 54 (* Michael De Vlieger, Jul 14 2015 *)
PROG
(PARI) a(n)={ n<4 & return(n); for(i=1, #n=factor(n)~, n[1, i]=concat(vector(n[2, i], j, Str(n[1, i])))); eval(concat(n[1, ]))} \\ M. F. Hasler, Jun 19 2011
(Haskell)
a037276 = read . concatMap show . a027746_row
-- Reinhard Zumkeller, Apr 03 2012
(Python)
from sympy import factorint
def a(n):
f=factorint(n)
l=sorted(f)
return 1 if n==1 else int("".join(str(i)*f[i] for i in l))
print([a(n) for n in range(1, 101)]) # Indranil Ghosh, Jun 23 2017
CROSSREFS
KEYWORD
nonn,easy,base
AUTHOR
STATUS
approved