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 A191872 #16 Apr 12 2025 03:41:52 %S A191872 1,2,3,4,5,6,7,8,9,130,1265,60,143,154,360,48,1071,396,133,240,693, %T A191872 1386,1817,888,50,286,999,2408,2552,390,372,448,1419,2992,315,2268, %U A191872 1295,266,3666,480,1148,1344,129,11176,360,3818,329,8880,2254,550,1071,2444,2597,2268,12485,2688,399,2552,12449,111960,549,372,693,8000 %N A191872 a(n) is the smallest multiple of n such that the sum of the square of the decimal digits of a(n) is divisible by n. %H A191872 Robert Israel, <a href="/A191872/b191872.txt">Table of n, a(n) for n = 1..467</a> %e A191872 a(11) =1265 because 11*115 = 1265 and 1^2+2^2+6^2+5^2 = 66 = 11*6. %p A191872 with(numtheory):for n from 1 to 80 do:id:=0:for k from 1 to 1000000 while(id=0) %p A191872 do :l:=length(k):n0:=k:s1:=0:for m from 1 to l do:q:=n0:u:=irem(q, 10):v:=iquo(q, %p A191872 10):n0:=v :s1:=s1+u^2 :od: :if irem(k,n) =0 and irem(s1,n)=0 then id:=1:printf(`%d, %p A191872 `, k):else fi:od: od: %t A191872 smn[n_]:=Module[{k=1},While[Mod[Total[IntegerDigits[k n]^2],n]!=0,k++];n k]; Array[smn,70] (* _Harvey P. Dale_, Feb 13 2023 *) %o A191872 (PARI) a(n)=my(s);forstep(k=n,9e9,n,s=eval(Vec(Str(k)));if(sum(i=1,#s,s[i]^2)%n==0,return(k))) \\ _Charles R Greathouse IV_, Jun 20 2011 %Y A191872 Cf. A002998, A131382. %K A191872 nonn,base %O A191872 1,2 %A A191872 _Michel Lagneau_, Jun 18 2011