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.

A372075 a(1) = 1; thereafter a(n+1) is obtained by prepending the digit-sum of a(n) to a(n).

This page as a plain text file.
%I A372075 #19 Jun 16 2024 16:45:42
%S A372075 1,11,211,4211,84211,1684211,231684211,28231684211,3828231684211,
%T A372075 493828231684211,62493828231684211,7062493828231684211,
%U A372075 777062493828231684211,91777062493828231684211,10191777062493828231684211,10310191777062493828231684211
%N A372075 a(1) = 1; thereafter a(n+1) is obtained by prepending the digit-sum of a(n) to a(n).
%H A372075 Paolo Xausa, <a href="/A372075/b372075.txt">Table of n, a(n) for n = 1..270</a>
%e A372075 a(4) = 4211 as a(3) = 211 which has digital sum 2 + 1 + 1 = 4. Concatenating 4 and 211 gives 4211. - _David A. Corneth_, Jun 16 2024
%t A372075 NestList[DigitSum[#]*10^IntegerLength[#] + # &, 1, 20] (* _Paolo Xausa_, Jun 16 2024 *)
%o A372075 (PARI) first(n) = {
%o A372075 	my(res = vector(n));
%o A372075 	res[1] = 1;
%o A372075 	for(i = 2, n,
%o A372075 		res[i] = sumdigits(res[i-1])*10^(#digits(res[i-1]))+res[i-1]
%o A372075 	); res
%o A372075 } \\ _David A. Corneth_, Jun 16 2024
%o A372075 (Python)
%o A372075 from itertools import islice
%o A372075 def A372075_gen(): # generator of terms
%o A372075     yield (a:=1)
%o A372075     while True: yield (a:=a+10**len(s:=str(a))*sum(map(int,s)))
%o A372075 A372075_list = list(islice(A372075_gen(),20)) # _Chai Wah Wu_, Jun 16 2024
%Y A372075 Cf. A004207, A007953, A372074.
%K A372075 nonn,base
%O A372075 1,2
%A A372075 _N. J. A. Sloane_, Jun 16 2024