login
Concatenate n and number of divisors of n.
2

%I #11 Aug 22 2019 11:56:29

%S 11,22,32,43,52,64,72,84,93,104,112,126,132,144,154,165,172,186,192,

%T 206,214,224,232,248,253,264,274,286,292,308,312,326,334,344,354,369,

%U 372,384,394,408,412,428,432,446,456,464,472,4810,493,506,514,526,532

%N Concatenate n and number of divisors of n.

%H Harry J. Smith, <a href="/A065998/b065998.txt">Table of n, a(n) for n=1..1000</a>

%t cnd[n_]:=Module[{ds=DivisorSigma[0,n]},n*10^IntegerLength[ds]+ds]; Array[ cnd,60] (* _Harvey P. Dale_, Aug 22 2019 *)

%o (PARI) digitsIn(x)= { local(d); if (x==0, return(1)); d=1 + log(x)\log(10); if (10^d == x, d++, if (10^(d-1) > x, d--)); return(d) }

%o Concat(a, b)= { return(a*10^digitsIn(b) + b) }

%o { for (n=1, 1000, a=Concat(n, numdiv(n)); write("b065998.txt", n, " ", a) ) } \\ _Harry J. Smith_, Nov 06 2009

%o (PARI) a(n) = fromdigits(concat(digits(n), digits(numdiv(n)))); \\ _Michel Marcus_, Apr 02 2017

%Y Cf. A000005.

%K nonn,base

%O 1,1

%A _Jeff Burch_, Feb 28 2001