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 A036059 #19 Jun 18 2022 13:24:01 %S A036059 1,1,21,1221,3231,233231,533221,15534221,3514334231,3534533241, %T A036059 3544832231,183544733221,28172544634231,2827162554535241, %U A036059 2827265554337241,2837267544338231,3847264544637221,3847362564636221,2837662564536221,2827863534537221,3837564524538221 %N A036059 The summarize Fibonacci sequence: summarize the previous two terms!. %C A036059 After the 23rd term the sequence goes into a cycle of 16 terms. %H A036059 Reinhard Zumkeller, <a href="/A036059/b036059.txt">Table of n, a(n) for n = 0..181</a>, 10 periods. %H A036059 <a href="/index/Sa#swys">Index to sequences related to say what you see</a> %e A036059 a(20) = 3837564524538221; %e A036059 a(21) = 4837265534637221; %e A036059 a(22+16*k) = 3837365544636221, k >= 0; %e A036059 a(36) = a(20+16) = 3837265554834221 <> a(20); %e A036059 a(37) = a(21+16) = 3837266544735221 <> a(21); %e A036059 a(38) = a(22+16) = 3837365544636221 = a(22). - _Reinhard Zumkeller_, Aug 10 2014 %p A036059 a:= proc(n) option remember; `if`(n<2, 1, (p-> parse(cat(seq((c-> %p A036059 `if`(c=0, [][], [c, 9-i][]))(coeff(p, x, 9-i)), i=0..9))))( %p A036059 add(x^i, i=map(x-> convert(x, base, 10)[], [a(n-1),a(n-2)])))) %p A036059 end: %p A036059 seq(a(n), n=0..20); # _Alois P. Heinz_, Jun 18 2022 %t A036059 a[0] = a[1] = 1; a[n_] := a[n] = FromDigits @ Flatten @ Reverse @ Select[ Transpose @ { DigitCount[a[n-1]] + DigitCount[a[n-2]], Append[ Range[9], 0]}, #[[1]] > 0&]; %t A036059 Table[a[n], {n, 0, 18}] (* _Jean-François Alcover_, Dec 30 2017 *) %o A036059 (Haskell) %o A036059 import Data.List (sort, group) %o A036059 a036059 n = a036059_list !! n %o A036059 a036059_list = map (read . concatMap show) fss :: [Integer] where %o A036059 fss = [1] : [1] : zipWith h (tail fss) fss where %o A036059 h vs ws = concatMap (\us -> [length us, head us]) $ %o A036059 group $ reverse $ sort $ vs ++ ws %o A036059 -- _Reinhard Zumkeller_, Aug 10 2014 %o A036059 (Python) %o A036059 def aupton(nn): %o A036059 alst = [1, 1] %o A036059 for n in range(2, nn+1): %o A036059 prev2, anstr = sorted(str(alst[-2]) + str(alst[-1])), "" %o A036059 for d in sorted(set(prev2), reverse=True): %o A036059 anstr += str(prev2.count(d)) + d %o A036059 alst.append(int(anstr)) %o A036059 return alst %o A036059 print(aupton(20)) # _Michael S. Branicky_, Feb 02 2021 %Y A036059 Cf. A036058, A036066. %K A036059 nonn,base,nice,easy %O A036059 0,3 %A A036059 _Floor van Lamoen_