OFFSET
1,2
REFERENCES
F. Smarandache, "Properties of the numbers", Univ. of Craiova Archives, 1975; Arizona State University Special Collections, Tempe, AZ.
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 1..333
Eric Weisstein's World of Mathematics, Smarandache Sequences
FORMULA
a(n) = n*(10^(n*L(n))-1)/(10^L(n)-1) where L(n) = A004216(n)+1 = floor(log_10(10n)). - Henry Bottomley, Jun 01 2000
a(n) = Sum_{i=0..n-1} (n*10^(i*(floor(log(10, n)) + 1))). - José de Jesús Camacho Medina, Dec 10 2014
EXAMPLE
From Bruno Berselli, Oct 05 2018: (Start)
. 1 * 9 = 09
. 22 * 9 = 198
. 333 * 9 = 2997
. 4444 * 9 = 39996
. 55555 * 9 = 499995
. 666666 * 9 = 5999994
. 7777777 * 9 = 69999993
. 88888888 * 9 = 799999992
. 999999999 * 9 = 8999999991
(End)
MAPLE
a:= n-> parse(cat(n$n)):
seq(a(n), n=1..20); # Alois P. Heinz, Apr 26 2011
MATHEMATICA
Table[Sum[(n)*10^(i*(Floor[Log[10, n]] + 1)), {i, 0, n - 1}], {n, 1, 30}] (* José de Jesús Camacho Medina, Dec 10 2014 *)
Table[FromDigits[Flatten[IntegerDigits/@Table[n, {n}]]], {n, 15}] (* Harvey P. Dale, Mar 01 2015 *)
Table[FromDigits[PadRight[{}, n IntegerLength[n], IntegerDigits[n]]], {n, 15}] (* Harvey P. Dale, Jun 19 2016 *)
PROG
(Haskell)
a000461 n = (read $ concat $ replicate n $ show n) :: Integer
-- Reinhard Zumkeller, Apr 26 2011
(PARI) a(n) = eval(concat(apply(x->Str(x), vector(n, k, n)))); \\ Michel Marcus, Oct 05 2018; Feb 12 2023
(Python)
def a(n): return int(str(n)*n)
print([a(n) for n in range(1, 17)]) # Michael S. Branicky, Jan 22 2021
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
John Radu (Suttones(AT)aol.com)
STATUS
approved