A037278 Replace n with concatenation of its divisors.
1, 12, 13, 124, 15, 1236, 17, 1248, 139, 12510, 111, 1234612, 113, 12714, 13515, 124816, 117, 1236918, 119, 12451020, 13721, 121122, 123, 1234681224, 1525, 121326, 13927, 12471428, 129, 12356101530, 131, 12481632, 131133, 121734, 15735, 123469121836, 137
Offset: 1
Links
- Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
Programs
-
Haskell
a037278 = read . concatMap show . a027750_row :: Integer -> Integer -- Reinhard Zumkeller, Jul 13 2013, May 01 2012, Aug 07 2011
-
MATLAB
m=1; for u=1:34 div=divisors(u); conc=str2num(strrep(num2str(div), ' ', '')); sol(m)=conc; m=m+1; end sol % Marius A. Burtea, Jun 01 2019
-
Magma
k:=1; sol:=[]; for u in [1..34] do D:=Divisors(u); conc:=D[1]; for u1 in [2..#D] do a:=#Intseq(conc); a1:=#Intseq(D[u1]); conc:=10^a1*conc+D[u1];end for; sol[u]:=conc; k:=k+1; end for; sol; // Marius A. Burtea, Jun 01 2019
-
Mathematica
a[n_] := ToExpression[ StringJoin[ ToString /@ Divisors[n] ] ]; Table[ a[n], {n, 1, 34}] (* Jean-François Alcover, Dec 01 2011 *) FromDigits[Flatten[IntegerDigits/@Divisors[#]]]&/@Range[40] (* Harvey P. Dale, Nov 09 2012 *)
-
PARI
a(n) = my(s=""); fordiv(n, d, s = concat(s, Str(d))); eval(s); \\ Michel Marcus, Jun 01 2019 and Sep 22 2022
-
Python
from sympy import divisors def a(n): return int("".join(str(d) for d in divisors(n))) print([a(n) for n in range(1, 35)]) # Michael S. Branicky, Dec 31 2020
Formula
Extensions
More terms from Erich Friedman
Comments