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.
%I A084228 #29 May 26 2025 23:50:17 %S A084228 1,2,3,6,3,6,3,6,3,6,12,6,12,15,12,15,3,6,3,6,12,6,12,15,12,15,3,6,3, %T A084228 6,12,6,12,15,12,15,12,6,12,6,12,15,12,15,12,15,12,6,12,15,12,15,12, %U A084228 15,12,15,12,15,12,15,21,15,12,15,12,15,21,24,12,15,12,15,21,24,12,15,21,15 %N A084228 a(1)=1, a(2)=2; thereafter a(n) = sum of digits of (a(1)+a(2)+a(3)+...+a(n-1)). %C A084228 a(n) == 3 or 6 (mod 9) n>2. %C A084228 a(n) = 3 for n in A084229. %C A084228 a(n) = 6 for n = 4, 6, 8, 10, 12, 18, 20, 22, 28, 30, 32, 38, 40, 48, 86, 88, 90, 96, 98, 100, 106, 108, 116, 160, 162, 168, 170, 178, ..., 17630. - _Robert G. Wilson v_, Jun 27 2014 %H A084228 Robert G. Wilson v, <a href="/A084228/b084228.txt">Table of n, a(n) for n = 1..10000</a> %H A084228 <a href="/index/Coi#Colombian">Index entries for Colombian or self numbers and related sequences</a> %t A084228 a[1] = 1; a[2] = 2; a[n_] := a[n] = Sum[ Total@ IntegerDigits@ a@ i, {i, n - 1}]; Array[ Total@ IntegerDigits@ a@# &, 78] (* _Robert G. Wilson v_, Jun 27 2014 *) %t A084228 nxt[{t_,a_}]:=Module[{c=Total[IntegerDigits[t]]},{t+c,c}]; Join[{1},NestList[nxt,{3,2},80][[;;,2]]] (* _Harvey P. Dale_, Jul 13 2023 *) %o A084228 (PARI) %o A084228 sumdig(n)=sum(k=0,ceil(log(n)/log(10)),floor(n/10^k)%10) %o A084228 an=vector(10000); a(n)=if(n<0,0,an[n]) %o A084228 an[1]=1; an[2]=2; for(n=3,300,an[n]=sumdig(sum(k=1,n-1,a(k)))) %o A084228 (Haskell) %o A084228 a084228 n = a084228_list !! (n-1) %o A084228 a084228_list = 1 : 2 : f 3 where %o A084228 f x = y : f (x + y) where y = a007953 x %o A084228 -- _Reinhard Zumkeller_, Nov 13 2014 %Y A084228 Cf. A065075, A016052, A230286, A230287, A004207, A084229. %K A084228 base,nonn %O A084228 1,2 %A A084228 _Benoit Cloitre_, Jun 21 2003