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.

A344208 Numbers k such that iterating x -> digsum(x)^2 + 1 from k one or more times results in a number < 10.

This page as a plain text file.
%I A344208 #49 Jun 13 2021 16:09:24
%S A344208 1,2,3,6,9,10,11,12,15,18,19,20,21,24,27,28,30,33,36,37,39,42,45,46,
%T A344208 48,51,54,55,57,60,63,64,66,69,72,73,75,78,81,82,84,87,90,91,93,96,99,
%U A344208 100,101,102,105,108,109,110,111,114,117,118,120,123,126,127
%N A344208 Numbers k such that iterating x -> digsum(x)^2 + 1 from k one or more times results in a number < 10.
%C A344208 The number of iterations must be nonzero.
%C A344208 From _Michael S. Branicky_, May 15 2021: (Start)
%C A344208 f(x) = digsum(x)^2 + 1 < x for x >= 400.
%C A344208 All iterations terminate or lead to the cycle 65 -> 122 -> 26.
%C A344208 There are 5, 47, 395, 3213, 27724, 253490, 2362998, 22649995, 224689951, 2236788357 terms with 1..10 digits, resp. (End)
%H A344208 Michael S. Branicky, <a href="/A344208/b344208.txt">Table of n, a(n) for n = 1..10000</a>
%e A344208 15 is a term because (1+5)^2 + 1 = 37, (3+7)^2 + 1 = 101, (1+0+1)^2 + 1 = 5.
%e A344208 13 is not a term in this sequence because iterating 13 through this function will never yield a single-digit number.  Specifically, 13 -> 17 -> 65 -> 122 -> 26 -> 65 -> ... .
%o A344208 (Python)
%o A344208 def f(x): return sum(map(int, str(x)))**2 + 1
%o A344208 def ok(n):
%o A344208   iter = f(n)  # set to n for number of iterations >= 0
%o A344208   while iter > 9:
%o A344208     if iter in {65, 122, 26}: return False
%o A344208     iter = f(iter)
%o A344208   return True
%o A344208 print(list(filter(ok, range(1, 128)))) # _Michael S. Branicky_, May 14 2021
%Y A344208 Cf. A007953, A344214.
%K A344208 nonn,base
%O A344208 1,2
%A A344208 _Joseph Brown_, May 11 2021