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.

A066145 In base 2, records for the number of 'Reverse and Add' steps needed to reach a palindrome.

This page as a plain text file.
%I A066145 #22 May 16 2022 16:20:34
%S A066145 0,1,2,4,5,11,21,32,37,46,48,49,53,89,99,142,147,273,297,345,515,550,
%T A066145 573
%N A066145 In base 2, records for the number of 'Reverse and Add' steps needed to reach a palindrome.
%C A066145 The analog of A065199 in base 2. A066144 gives the corresponding starting points.
%C A066145 Terms a(19..22) obtained by assuming that a(n+1) <= a(n) + 300. - _A.H.M. Smeets_, Apr 30 2022
%H A066145 <a href="/index/Res#RAA">Index entries for sequences related to Reverse and Add!</a>
%e A066145 Starting with 74, 11 'Reverse and Add' steps are needed to reach a palindrome; starting with n < 74, at most 5 steps are needed.
%t A066145 limit = 10^3; (* Assumes that there is no palindrome if none is found before "limit" iterations *)
%t A066145 best = -1; lst = {};
%t A066145 For[n = 0, n <= 10000, n++,
%t A066145 np = n; i = 0;
%t A066145 While[np != IntegerReverse[np, 2] && i < limit,
%t A066145   np = np + IntegerReverse[np, 2]; i++];
%t A066145 If[i < limit && i > best, best = i; AppendTo[lst, i]]]; lst (* _Robert Price_, Oct 14 2019 *)
%Y A066145 Record values in base b: A077407 (b=3), A075687 (b=4), A306600 (b=8), A065199 (b=10), A348572 (Zeckendorf).
%Y A066145 Cf. A062130, A066057, A066058, A066059, A066144.
%K A066145 base,more,nonn
%O A066145 1,3
%A A066145 _Klaus Brockhaus_, Dec 08 2001
%E A066145 Offset corrected and a(19)-a(23) by _A.H.M. Smeets_, Apr 30 2022