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 A162216 #17 Jan 17 2020 10:43:13 %S A162216 0,1,2,5,8,17,33,34,65,66,67,131,258,259,386,512,513,514,1026,1027, %T A162216 2049,2050,3075,3076,4100,16388,16389,16390,57345,57346,65538,65539, %U A162216 196610,262149,262150,458754,458755,786438,786439,1048581,1048582,1310724 %N A162216 Base-3 perfect digital invariants (written in base 10): numbers equal to the sum of the k-th powers of their base-3 digits, for some k. %C A162216 Whenever 3|a(n), then a(n+1) = a(n) + 1 (for the same k). The first 6 terms are exactly all the base-3 narcissistic numbers (where k = number of base-3 digits). For these numbers in other bases b = 4, ..., 16 see A010344 - A161953. - _M. F. Hasler_, Nov 18 2019 %H A162216 Joseph Myers, <a href="/A162216/b162216.txt">Table of n, a(n) for n = 1..6130</a> (complete to 2000 base-3 digits) %o A162216 (PARI) select( is_A162216(n,b=3)={n<b||forstep(k=logint(n, max(vecmax(b=digits(n, b)), 2)), 2, -1, my(s=vecsum([d^k|d<-b])); s>n||return(s==n))}, [0..10^5]) \\ _M. F. Hasler_, Nov 21 2019 %Y A162216 Cf. A162217 (corresponding exponents), A033835, A162218. In other bases: A162219 (base 4), A162222 (base 5), A162225 (base 6), A162228 (base 7), A162231 (base 8), A162234 (base 9), A023052 (base 10). %K A162216 base,nonn %O A162216 1,3 %A A162216 _Joseph Myers_, Jun 28 2009