OFFSET
1,1
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.
FORMULA
52022 is a term since 52022 is divisible by (5^2 + 2^2 + 0^2 + 2^2 + 2^2)^2 = 1369, but it is not divisible by 5 + 2 + 0 + 2 + 2 = 11.
MATHEMATICA
Select[Range[1.3*10^6], ! Divisible[#, Plus @@ IntegerDigits[#]] && Divisible[#, (Plus @@ (IntegerDigits[#]^2))^2] &]
PROG
(PARI) isok(k) = k % sumdigits(k) && !(k % vecsum(apply(x->x^2, digits(k)))^2);
(Python)
def ok(n):
d = list(map(int, str(n)))
return n and n%sum(d) and n%sum(di**2 for di in d)**2 == 0
print([k for k in range(10**6) if ok(k)]) # Michael S. Branicky, Jan 10 2025
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Amiram Eldar, Jan 07 2025
STATUS
approved