A379982 Nonmultiples of 10 that are divisible by the square of the sum of the squares of their digits.
1, 2023, 4332, 30324, 31311, 43011, 52022, 52215, 71824, 101376, 110201, 116964, 120213, 120472, 120612, 131072, 141312, 145152, 202312, 230202, 233928, 244634, 298374, 305252, 320305, 327184, 409374, 506056, 511104, 519168, 565152, 615627, 652118, 667815, 680625
Offset: 1
Examples
2023 is a term since 2023 is not divisible by 10 and it is divisible by (2^2 + 0^2 + 2^2 + 3^2)^2 = 289.
Links
- Amiram Eldar, Table of n, a(n) for n = 1..10000
- Pradip Kumar Pal and Kaushik Gopalan, Second Order Harshad Number, International Journal of Mathematical Education, Vol. 13, No. 1 (2023), pp. 25-26.
Programs
-
Mathematica
Select[Range[10^6], ! Divisible[#, 10] && Divisible[#, (Plus @@ (IntegerDigits[#]^2))^2] &]
-
PARI
isok(k) = k % 10 && !(k % vecsum(apply(x -> x^2, digits(k)))^2);
-
Python
def ok(n): return n%10 and n%sum(di**2 for di in map(int, str(n)))**2 == 0 print([k for k in range(10**6) if ok(k)]) # Michael S. Branicky, Jan 10 2025