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.
%I A275218 #22 Jul 21 2016 02:48:57 %S A275218 78,117,156,288,11127,11667,23388,27888,111177,228888,111111777, %T A275218 222888888,1111122267,3333337788,111111117777,222288888888, %U A275218 111111111177777,222228888888888,111111111111777777,222222888888888888 %N A275218 Numbers in 2-cycles of RATS sequences. %C A275218 Numbers n such that A036839(A036839(n)) = n. %C A275218 Subset of A161596. %C A275218 Contains A002275(3*k) + 6*A002275(k) and 2*A002275(3*k)+6*A002275(2*k) for all k>0. %C A275218 In particular, this sequence and A161596 are infinite. %C A275218 Do all sufficiently large members of the sequence have the form A002275(3*k) + 6*A002275(k) or 2*A002275(3*k)+6*A002275(2*k)? %e A275218 78 is in the sequence because A036839(78) = 156 and A036839(156) = 78. %p A275218 rev:= proc(n) local t,L; %p A275218 L:= convert(n,base,10); %p A275218 add(10^j*L[-1-j],j=0..nops(L)-1) %p A275218 end proc: %p A275218 sord:= proc(n) local L,t; %p A275218 L:= sort(convert(n,base,10),`>`); %p A275218 add(10^j*L[1+j],j=0..nops(L)-1) %p A275218 end proc: %p A275218 rats:= proc(n) option remember; sord(n + rev(n)) end proc: %p A275218 Res:= NULL: %p A275218 for d from 1 to 15 do %p A275218 for x1 from 0 to d do %p A275218 for x2 from 0 to d-x1 do %p A275218 for x3 from 0 to d-x1-x2 do %p A275218 for x4 from 0 to d-x1-x2-x3 do %p A275218 for x5 from 0 to d-x1-x2-x3-x4 do %p A275218 for x6 from 0 to d-x1-x2-x3-x4-x5 do %p A275218 for x7 from 0 to d-x1-x2-x3-x4-x5-x6 do %p A275218 for x8 from 0 to d-x1-x2-x3-x4-x5-x6-x7 do %p A275218 x9:= d-x1-x2-x3-x4-x5-x6-x7-x8; %p A275218 L:= [1$x1,2$x2,3$x3,4$x4,5$x5,6$x6,7$x7,8$x8,9$x9]; %p A275218 x:= add(L[-i]*10^(i-1),i=1..d); %p A275218 if rats(rats(x)) = x then Res:= Res,x fi %p A275218 od od od od od od od od od: %p A275218 sort([Res]); %Y A275218 Cf. A002275, A036839, A161596. %K A275218 nonn,base %O A275218 1,1 %A A275218 _Robert Israel_, Jul 20 2016