OFFSET
1,2
COMMENTS
Called "Second-order Harshad numbers" by Pal and Gopalan (2023).
If k is a term, then 10*k is also a term.
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.
EXAMPLE
10 is a term since 10 is divisible by (1^2 + 0^2)^2 = 1.
1100 is a term since 1100 is divisible by (1^2 + 1^2 + 0^2 + 0^2)^2 = 4.
MATHEMATICA
Select[Range[10^5], Divisible[#, (Plus @@ (IntegerDigits[#]^2))^2] &]
PROG
(PARI) isok(k) = !(k % vecsum(apply(x -> x^2, digits(k)))^2);
(Python)
def ok(n): return n and n%sum(di**2 for di in map(int, str(n)))**2 == 0
print([k for k in range(100001) if ok(k)]) # Michael S. Branicky, Jan 10 2025
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
Amiram Eldar, Jan 07 2025
STATUS
approved