cp's OEIS Frontend

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.

A034087 Numbers divisible by the sum of the squares of their digits.

This page as a plain text file.
%I A034087 #28 Jan 10 2025 09:04:53
%S A034087 1,10,20,50,100,110,111,120,130,133,200,210,240,267,298,310,315,360,
%T A034087 372,376,400,420,480,500,532,550,630,803,917,973,1000,1010,1011,1020,
%U A034087 1030,1071,1100,1101,1110,1134,1148,1200,1211,1222,1290,1300,1302,1316
%N A034087 Numbers divisible by the sum of the squares of their digits.
%H A034087 Amiram Eldar, <a href="/A034087/b034087.txt">Table of n, a(n) for n = 1..10000</a> (terms 1..3465 from Carmine Suriano)
%F A034087 A003132[a(n)] | a(n). - _R. J. Mathar_, Feb 25 2007
%e A034087 a(100) = 4131 since 4^2+1^2+3^2+1^2=27 divides 4131. - _Carmine Suriano_, May 04 2013
%p A034087 isA034087 := proc(n) if n mod A003132(n) = 0 then true ; else false ; end if ; end proc:
%p A034087 for n from 1 to 1800 do if isA034087(n) then printf("%d ",n) ; end if ; end do ; # _R. J. Mathar_, Feb 25 2007
%t A034087 Select[Range[1500], Divisible[#, Plus @@ (IntegerDigits[#]^2)] &] (* _Amiram Eldar_, Jan 31 2021 *)
%o A034087 (PARI) isok(m) = !(m % norml2(digits(m))); \\ _Michel Marcus_, Jan 31 2021
%o A034087 (Python)
%o A034087 def ok(n): return n and n%sum(di**2 for di in map(int, str(n))) == 0
%o A034087 print([k for k in range(1317) if ok(k)]) # _Michael S. Branicky_, Jan 10 2025
%Y A034087 Cf. A003132, A034088, A169665, A169666.
%K A034087 base,easy,nonn
%O A034087 1,2
%A A034087 _Erich Friedman_