The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A360697 The sum of the squares of the digits of n, repeated until reaching a single-digit number. 0
0, 1, 4, 9, 4, 4, 4, 1, 4, 4, 1, 2, 5, 1, 4, 4, 4, 4, 4, 1, 4, 5, 8, 1, 4, 4, 4, 4, 1, 4, 9, 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 4, 4, 4, 4, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 4, 1, 4, 4, 4, 4, 4, 4, 4, 2, 1, 4, 4, 1, 4, 4, 4, 1, 2, 4, 4, 4, 1, 4, 4, 1, 4, 4, 1, 4, 4, 1 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
COMMENTS
Square the digits of n, then sum the squares. Repeat the process until the sum is less than 10.
LINKS
EXAMPLE
For n=28, the sum of the squares of the digits gives 4+64 = 68. Repeating the process gives 36+64 = 100; repeating once more gives 1+0+0 = 1. Therefore a(28) is 1.
a(n) = 4 for 72 of the first 100 n (0 to 99 inclusive.)
MATHEMATICA
f[n_] := Plus @@ (IntegerDigits[n]^2); a[n_] := NestWhile[f, f[n], # > 9 &]; Array[a, 100, 0] (* Amiram Eldar, Feb 17 2023 *)
CROSSREFS
Sequence in context: A341767 A281152 A238849 * A197582 A086277 A271948
KEYWORD
nonn,base
AUTHOR
Will Nicholes, Feb 16 2023
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 28 01:34 EDT 2024. Contains 372900 sequences. (Running on oeis4.)