cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A300517 a(n) is the concatenation of n n times, n-1 n-1 times, ..., 22, 1.

This page as a plain text file.
%I A300517 #35 May 01 2023 10:03:09
%S A300517 1,221,333221,4444333221,555554444333221,666666555554444333221,
%T A300517 7777777666666555554444333221,888888887777777666666555554444333221,
%U A300517 999999999888888887777777666666555554444333221,10101010101010101010999999999888888887777777666666555554444333221
%N A300517 a(n) is the concatenation of n n times, n-1 n-1 times, ..., 22, 1.
%C A300517 a(n) is composite for all 2 <= n <= 1000. - _David Cleaver_, Apr 14 2023
%H A300517 Alois P. Heinz, <a href="/A300517/b300517.txt">Table of n, a(n) for n = 1..31</a>
%e A300517 a(4) = 4444333221 because 4 concatenated four times then concatenated with 3 three times and 2 twice and 1 once gives 4444333221.
%p A300517 a:= n-> parse(cat(seq((n-i)$(n-i), i=0..n-1))):
%p A300517 seq(a(n), n=1..12);  # _Alois P. Heinz_, Mar 07 2018
%o A300517 (Ruby)
%o A300517 def A300517(n)
%o A300517   a = '1'
%o A300517   [1] + (2..n).map{|i| a = (i.to_s * i + a.to_s).to_i}
%o A300517 end
%o A300517 p A300517(20)
%o A300517 (PARI)
%o A300517 a(n) = {my(a=0, b=0, d=1, i);
%o A300517   for(i=1, n, b = logint(i, 10)+1;
%o A300517     a += d*i*(10^(i*b)-1)/(10^b-1);
%o A300517     d *= 10^(i*b); ); return(a); } \\ _David Cleaver_, Apr 14 2023
%Y A300517 Cf. A000461, A098129, A361751 (number of decimal digits).
%K A300517 nonn,base
%O A300517 1,2
%A A300517 _Seiichi Manyama_, Mar 07 2018