Sum of squared digits
( go to the article → https://www.johndcook.com/blog/2020/02/28/sumofsquareddigits/ )
Take a positive integer x, square each of its digits, and sum. Now do the same to the result, over and over. What happens? To find out, let’s write a little Python code that sums the squares of the digits. def G(x): return sum(int(d)**2 for d in str(x)) This function turns a number into a […]
Feb. 28, 2020, 1:13 p.m.
You may be interested in:
Newest in: Math
Fundamental Theorem of Arithmetic
