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 A006287 M3194 #27 Jul 08 2025 16:45:59 %S A006287 0,1,4,1,2,5,4,5,8,1,2,5,2,3,6,5,6,9,4,5,8,5,6,9,8,9,12,1,2,5,2,3,6,5, %T A006287 6,9,2,3,6,3,4,7,6,7,10,5,6,9,6,7,10,9,10,13,4,5,8,5,6,9,8,9,12,5,6,9, %U A006287 6,7 %N A006287 Sum of squares of digits of ternary representation of n. %D A006287 Jeffrey Shallit, personal communication. %D A006287 N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence). %H A006287 R. J. Mathar, <a href="/A006287/b006287.txt">Table of n, a(n) for n = 0..500</a> %H A006287 Michael Gilleland, <a href="/selfsimilar.html">Some Self-Similar Integer Sequences</a> %H A006287 Robert Walker, <a href="http://robertinventor.com/ftswiki/Self_Similar_Sloth_Canon_Number_Sequences">Self Similar Sloth Canon Number Sequences</a> %p A006287 A006287 := proc(n) %p A006287 local d ; %p A006287 convert(n,base,3) ; %p A006287 add(d^2,d=%) ; %p A006287 end proc: # _R. J. Mathar_, Jun 13 2014 %t A006287 Table[Total[IntegerDigits[n,3]^2],{n,0,80}] (* _Harvey P. Dale_, Apr 23 2011 *) %Y A006287 Cf. A053735 %K A006287 nonn,base %O A006287 0,3 %A A006287 _N. J. A. Sloane_