login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A098129 Concatenate 1 once, 2 twice, 3 three times, up to n n times. 8
1, 122, 122333, 1223334444, 122333444455555, 122333444455555666666, 1223334444555556666667777777, 122333444455555666666777777788888888, 122333444455555666666777777788888888999999999 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
a(n) is composite for all 2 <= n <= 1000. - David Cleaver, Mar 22 2023
LINKS
EXAMPLE
a(4) = 1223334444 because 1 concatenated once then concatenated with 2 twice and 3 three times and 4 four times gives 1223334444.
MAPLE
a:= n-> parse(cat(seq(i$i, i=1..n))):
seq(a(n), n=1..12); # Alois P. Heinz, Mar 07 2018
MATHEMATICA
nn = 12; a[0] = {}; Do[Set[a[n], Join[a[n - 1], Flatten@ ConstantArray[IntegerDigits[n], n]]], {n, nn}]; Array[FromDigits @* a, nn] (* Michael De Vlieger, Mar 29 2023 *)
PROG
(PARI)
a(n) = {my(a=0, i, k);
for(i=1, n, k = logint(i, 10)+1;
a = a*10^(i*k) + i*(10^(i*k)-1)/(10^k-1);
); return(a); } \\ David Cleaver, Mar 29 2023
(Python)
def A098129(n): return int(''.join(str(j)*j for j in range(1, n+1))) # Chai Wah Wu, Mar 29 2023
CROSSREFS
Cf. A000461, A300517, A361751 (number of decimal digits).
Sequence in context: A208390 A282274 A208397 * A198603 A237640 A258489
KEYWORD
easy,nonn,base
AUTHOR
Michael Joseph Halm, Jan 04 2005
EXTENSIONS
Offset and a(8) corrected by Seiichi Manyama, Mar 07 2018
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 26 06:40 EDT 2024. Contains 373715 sequences. (Running on oeis4.)