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 A008469 #19 Mar 29 2018 18:18:55 %S A008469 1,8,30,67,125,222,349,512,738,1009,1340,1740,2200,2744,3390,4102, %T A008469 4913,5850,6877,8018,9282,10660,12176,13848,15631,17576,19710,21979, %U A008469 24416,27003,29794,32768,35943,39337,42902,46692,50662,54881,59331,64030,68921 %N A008469 a(n) = n OR n^3 (applied to ternary expansions). %H A008469 Alois P. Heinz, <a href="/A008469/b008469.txt">Table of n, a(n) for n = 1..10000</a> %p A008469 a:= proc(n) option remember; local g, h, i, r; %p A008469 g, h, r:= n, n^3, 0; for i from 0 while h>0 do %p A008469 r:= r + 3^i * max(irem(g, 3, 'g'), irem(h, 3, 'h')) od; r %p A008469 end: %p A008469 seq(a(n), n=1..140); # _Alois P. Heinz_, Mar 29 2018 %t A008469 (* program should not be used to extend this sequence *) %t A008469 b=3; d=12; Mb=Array[ b^(d-#)&, d ]; Map[ Plus@@(Mb*#)&, Array[ Max /@ Transpose[ {IntegerDigits[ #, b, d ], IntegerDigits[ #^3, b, d ]} ]&, 80 ] ] %Y A008469 Cf. A007745, A008467, A008468. %K A008469 base,nonn,easy %O A008469 1,2 %A A008469 _Olivier Gérard_