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 A284798 #17 Nov 04 2023 14:34:55 %S A284798 1,4,6,13,21,34,40,46,60,66,72,97,121,145,177,201,225,268,286,304,346, %T A284798 364,382,424,442,460,510,528,546,588,606,624,666,684,702,781,853,925, %U A284798 1021,1093,1165,1261,1333,1405,1509,1581,1653,1749,1821,1893,1989,2061,2133 %N A284798 Antipalindromic numbers in base 3. %C A284798 Fixed points of the transform A284797. %C A284798 A b-adic "antipalindrome" is a string of digits x where the application of the map d -> b-1-d to each digit, followed by reversal of all digits, is equal to x. This sequence lists the integers whose base-3 representation (with no leading zeros) has this property. %H A284798 Lubomira Dvorakova, Stanislav Kruml, and David Ryzak, <a href="https://arxiv.org/abs/2008.06864">Antipalindromic numbers</a>, arXiv preprint arXiv:2008.06864 [math.CO], August 16 2020. %e A284798 34 is a term of the sequence because 34 in base 3 is 1021, its digit-by-digit complement in base 3 is 1201 and the digit reverse is again 1021. %p A284798 P:=proc(q,h) local a,b,k,n; for n from 1 to q do a:=convert(n,base,h); b:=0; %p A284798 for k from 1 to nops(a) do a[k]:=h-1-a[k]; b:=h*b+a[k]; od; if b=n then print(n); fi; od; end: P(10^2,8); %o A284798 (Python) %o A284798 from itertools import count, islice %o A284798 from gmpy2 import digits %o A284798 def A284798_gen(): return (n for n in count(0) if not n+int((s:=digits(n,3)[::-1]),3)+1-3**len(s)) %o A284798 A284798_list = list(islice(A284798_gen(),35)) # _Chai Wah Wu_, Feb 04 2022 %Y A284798 Cf. A035928, A284797. %K A284798 nonn,base,easy %O A284798 1,2 %A A284798 _Paolo P. Lava_, Apr 03 2017 %E A284798 New name from _Jeffrey Shallit_, Nov 04 2023