login
Take sum of squares of digits of previous term; start with 74169.
14

%I #21 Oct 21 2022 22:02:05

%S 74169,183,74,65,61,37,58,89,145,42,20,4,16,37,58,89,145,42,20,4,16,

%T 37,58,89,145,42,20,4,16,37,58,89,145,42,20,4,16,37,58,89,145,42,20,4,

%U 16,37,58,89,145,42,20,4,16,37,58,89,145,42,20,4,16,37,58,89,145,42,20,4

%N Take sum of squares of digits of previous term; start with 74169.

%C From a quiz, cf. Russel & Carter reference.

%D K. Russell and P. Carter, Number Puzzles, W. Foulsham and Co. Ltd. (1993).

%H Vincenzo Librandi, <a href="/A122065/b122065.txt">Table of n, a(n) for n = 1..100</a>

%H <a href="/index/Rec#order_08">Index entries for linear recurrences with constant coefficients</a>, signature (0, 0, 0, 0, 0, 0, 0, 1).

%F a(n) = A000218(n) for n >= 4, a(n) = A000216(n-2) for n >= 6. - _M. F. Hasler_, Apr 27 2018

%t NestList[Total[IntegerDigits[#]^2]&, 74169, 80] (* _Vincenzo Librandi_, Jan 29 2013 *)

%o (Magma) [74169, 183, 74, 65, 61] cat &cat[[37, 58, 89, 145, 42, 20, 4, 16]: n in [0..17]]; // _Vincenzo Librandi_, Jan 29 2013

%o (PARI) A122065_vec=vector(50,n,t=if(n>1,norml2(digits(t)),74169));

%o A122065(n)=A122065_vec[n%8+(n>7)*8] \\ _M. F. Hasler_, Apr 27 2018

%Y Cf. A000216 (main entry for related sequences), A003132 (the iterated "sum digits squared" map).

%K nonn,base,easy

%O 1,1

%A Herman Jamke (hermanjamke(AT)fastmail.fm), Sep 14 2006