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.

A379980 Numbers that are divisible by the square of the sum of the squares of their digits.

Original entry on oeis.org

1, 10, 100, 1000, 1100, 1200, 1300, 2000, 2023, 2100, 2400, 3100, 4332, 5000, 10000, 10100, 10200, 10300, 11000, 12000, 13000, 20000, 20100, 20230, 20400, 21000, 24000, 30100, 30324, 31000, 31311, 42000, 43011, 43320, 50000, 52022, 52215, 55000, 71824, 100000
Offset: 1

Views

Author

Amiram Eldar, Jan 07 2025

Keywords

Comments

Called "Second-order Harshad numbers" by Pal and Gopalan (2023).
If k is a term, then 10*k is also a term.

Examples

			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.
		

Crossrefs

Cf. A003132, A005349, A072081, A180490 (binary analog).
Subsequence of A034087.
Subsequences: A379981, A379982.

Programs

  • Mathematica
    Select[Range[10^5], Divisible[#, (Plus @@ (IntegerDigits[#]^2))^2] &]
  • 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