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

%I #65 Feb 23 2024 07:29:19

%S 1,122,122333,1223334444,122333444455555,122333444455555666666,

%T 1223334444555556666667777777,122333444455555666666777777788888888,

%U 122333444455555666666777777788888888999999999

%N Concatenate 1 once, 2 twice, 3 three times, up to n n times.

%C a(n) is composite for all 2 <= n <= 1000. - _David Cleaver_, Mar 22 2023

%H Seiichi Manyama, <a href="/A098129/b098129.txt">Table of n, a(n) for n = 1..31</a>

%e a(4) = 1223334444 because 1 concatenated once then concatenated with 2 twice and 3 three times and 4 four times gives 1223334444.

%p a:= n-> parse(cat(seq(i$i, i=1..n))):

%p seq(a(n), n=1..12); # _Alois P. Heinz_, Mar 07 2018

%t 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 *)

%o (PARI)

%o a(n) = {my(a=0,i,k);

%o for(i=1,n, k = logint(i,10)+1;

%o a = a*10^(i*k) + i*(10^(i*k)-1)/(10^k-1);

%o ); return(a); } \\ _David Cleaver_, Mar 29 2023

%o (Python)

%o def A098129(n): return int(''.join(str(j)*j for j in range(1,n+1))) # _Chai Wah Wu_, Mar 29 2023

%Y Cf. A000461, A300517, A361751 (number of decimal digits).

%K easy,nonn,base

%O 1,2

%A _Michael Joseph Halm_, Jan 04 2005

%E Offset and a(8) corrected by _Seiichi Manyama_, Mar 07 2018

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 July 11 14:43 EDT 2024. Contains 374234 sequences. (Running on oeis4.)