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.

A075420 Trajectory of n under the Reverse and Add! operation carried out in base 4 (presumably) does not reach a palindrome.

This page as a plain text file.
%I A075420 #25 Oct 18 2019 04:11:38
%S A075420 290,318,378,381,438,444,462,498,501,504,510,545,567,573,627,633,636,
%T A075420 639,693,696,699,717,719,732,751,753,756,759,765,775,795,799,800,822,
%U A075420 823,828,835,847,859,882,883,888,894,895,915,919,927,948,954,967,972
%N A075420 Trajectory of n under the Reverse and Add! operation carried out in base 4 (presumably) does not reach a palindrome.
%C A075420 Base-4 analog of A023108 (base 10) and A066059 (base 2).
%H A075420 A.H.M. Smeets, <a href="/A075420/b075420.txt">Table of n, a(n) for n = 1..20000</a>
%H A075420 <a href="/index/Res#RAA">Index entries for sequences related to Reverse and Add!</a>
%t A075420 limit = 10^3; (* Assumes that there is no palindrome if none is found before "limit" iterations *)
%t A075420 Select[Range[1000],
%t A075420 Length@NestWhileList[# + IntegerReverse[#, 4] &, #, # !=
%t A075420 IntegerReverse[#, 4]  &, 1, limit] == limit + 1 &] (* _Robert Price_, Oct 16 2019 *)
%o A075420 (PARI) {stop=1000; for(n=1,980,k=n; c=0; while(c<stop,a=k; rev=0; while(a>0,d=divrem(a,4); a=d[1]; rev=4*rev+d[2]); if(rev==k,c=stop+1,k=k+rev; c++)); if(c==stop,print1(n,",")))}
%Y A075420 Cf. A023108, A066059, A075421, A075299, A075153.
%K A075420 base,nonn
%O A075420 1,1
%A A075420 _Klaus Brockhaus_, Sep 18 2002
%E A075420 Offset changed to 1 by _A.H.M. Smeets_, Feb 10 2019