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.

A193995 Maximum number of terms required to determine whether a number is happy or not (A007770 or A031177).

This page as a plain text file.
%I A193995 #7 Mar 30 2012 17:23:02
%S A193995 1,9,13,8,12,17,6,13,12,2,10,13,3,14,11,8,13,11,5,8,13,14,4,9,11,10,
%T A193995 14,4,10,13,3,4,12,12,13,16,8,10,13,9,14,8,12,5,15,12,11,14,5,12,11,
%U A193995 11,13,15,13,10,12,8,10,17,9,10,16,12,10,15,10,3,13,6
%N A193995 Maximum number of terms required to determine whether a number is happy or not (A007770 or A031177).
%C A193995 The number 1 is the only term requiring just one term to determine if it is happy. Although the b-file appears to show that there are only a few numbers having 8 terms, see A193996 for more beginning at 78999.
%H A193995 T. D. Noe, <a href="/A193995/b193995.txt">Table of n, a(n) for n = 1..10000</a>
%e A193995 For n=2, a(n)=9 because the iterations are 2, 4, 16, 37, 58, 89, 145, 42, 20, 4, 16,...
%t A193995 f[n_] := Total[IntegerDigits[n]^2]; Table[Length[NestWhileList[f, n, UnsameQ, All]] - 1, {n, 100}]
%K A193995 nonn,base
%O A193995 1,2
%A A193995 _T. D. Noe_, Aug 23 2011