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 A169663 #21 Feb 16 2025 08:33:11 %S A169663 1,10,20,50,100,110,111,120,133,200,210,240,315,360,372,400,420,480, %T A169663 500,550,630,803,1000,1010,1011,1020,1071,1100,1101,1110,1134,1148, %U A169663 1200,1300,1302,1330,1344,1431,1547,2000,2010,2023,2040,2100,2196,2200,2220 %N A169663 Numbers k divisible by the sum of the digits and the sum of the squares of digits of k (in base 10). %H A169663 Amiram Eldar, <a href="/A169663/b169663.txt">Table of n, a(n) for n = 1..10000</a> %H A169663 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/Digit.html">Digit</a>. %F A169663 A007953(k)|k and A003132(k)|k. %e A169663 For k = 2196, 2^2 + 1^2 + 9^2 + 6^2 = 122, 2 + 1 + 9 + 6 = 18, and 2196 = 18*122 so it is divisible by both 18 and 122. %p A169663 with(numtheory):for n from 1 to 1000000 do:l:=evalf(floor(ilog10(n))+1):n0:=n:s1:=0:s2:=0:for m from 1 to l do:q:=n0:u:=irem(q,10):v:=iquo(q,10):n0:=v :s1:=s1+u:s2:=s2+u^2:od:if irem(n,s1)=0 and irem(n,s2)=0 then print(n):else fi:od: %t A169663 Select[Range[2220], Divisible[#, Plus @@ (d = IntegerDigits[#])] && Divisible[#, Plus @@ (d^2)] &] (* _Amiram Eldar_, Mar 04 2023 *) %o A169663 (PARI) sd2(n) = my(d=digits(n)); sum(i=1, #d, d[i]^2); %o A169663 isok(n) = !(n % sumdigits(n)) && !(n % sd2(n)); \\ _Michel Marcus_, Dec 21 2014 %Y A169663 Cf. A003132, A007953, A034087, A072081, A117562. %Y A169663 Intersection of A005349 and A034087. %K A169663 nonn,base %O A169663 1,2 %A A169663 _Michel Lagneau_, Apr 05 2010