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 A115518 #17 Aug 20 2017 23:17:09 %S A115518 1,133,315,803,1148,1547,2196 %N A115518 Numbers n such that the sum of the digits of n times the sum of the digits squared of n equals n. %C A115518 (a_1 + a_2 + ... + a_k)*(a_1^2 + a_2^2 + ... + a_k^2) = n, the k-digit number a_k...a_2a_1, in base 10. %C A115518 The sequence is finite and all terms are listed. Proof: Each natural number n has no more than log_10(n) + 1 digits. Furthermore each digit is, of course, not bigger than 9. This gives the inequality (a1+a2+..ap)(a1^2+a2^2+..+ap^2) <= 9*(log_10(n)+1)*81*(log_10(n)+1) = 729*(log_10(n)+1)^2. On the other hand, for all n > 20582 we have 729*(log_10(n)+1)^2 < n. Therefore all terms of the sequence have to be smaller than this upper bound. A simple computer search shows that indeed all terms are listed. - _Stefan Steinerberger_ %e A115518 (2 + 1 + 9 + 6)(2^2 + 1^2 + 9^2 + 6^2) = 2196. %p A115518 p := proc (K) options operator, arrow; floor((log[10])(K))+1 end proc; A := proc (K) options operator, arrow; convert(K, base, 10) end proc; g := proc (K) options operator, arrow; sum(A(K)[i], i = 1 .. p(K)) end proc p := proc (K) options operator, arrow; floor((log[10])(K))+1 end proc; A := proc (K) options operator, arrow; convert(K, base, 10) end proc; g := proc (K) options operator, arrow; sum(A(K)[i], i = 1 .. p(K)) end proc %t A115518 fQ[n_] := Block[{id = IntegerDigits@n}, Plus @@ id * Plus @@ (id^2) == n]; lst = {}; Do[ If[fQ@n, AppendTo[lst, n]], {n, 10^8}]; lst (* _Robert G. Wilson v_ *) %t A115518 For[n = 1, n < 30000, n++, b = IntegerDigits[n]; If[Sum[b[[i]], {i, 1, Length[b]}]*Sum[b[[i]]^2, {i, 1, Length[b]}] == n, Print[n]]] (* _Stefan Steinerberger_ *) %t A115518 Select[Range[2200],Total[IntegerDigits[#]]*Total[IntegerDigits[#]^2]==#&] (* _Harvey P. Dale_, Jul 10 2014 *) %K A115518 base,fini,full,nonn %O A115518 1,2 %A A115518 _Yalcin Aktar_, Jun 24 2007 %E A115518 Edited by _Robert G. Wilson v_ and _Stefan Steinerberger_, Jun 28 2007