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.

A060792 Numbers that are palindromic in bases 2 and 3.

This page as a plain text file.
%I A060792 #104 Sep 04 2023 10:11:37
%S A060792 0,1,6643,1422773,5415589,90396755477,381920985378904469,
%T A060792 1922624336133018996235,2004595370006815987563563,
%U A060792 8022581057533823761829436662099,392629621582222667733213907054116073,32456836304775204439912231201966254787,428027336071597254024922793107218595973
%N A060792 Numbers that are palindromic in bases 2 and 3.
%C A060792 a(18) (if it exists) is greater than 3^93. - _Ilya Nikulshin_, Feb 22 2016
%H A060792 Ilya Nikulshin, <a href="/A060792/b060792.txt">Table of n, a(n) for n = 1..17</a> (terms a(11)..a(15) from Alan Grimes and _Keith F. Lynch_; a(16) from _Japheth Lim_)
%H A060792 Attila Bérczes and Volker Ziegler, <a href="http://arxiv.org/abs/1403.0787">On Simultaneous Palindromes</a>, arXiv:1403.0787 [math.NT], 2014.
%H A060792 Alan Grimes, Keith F. Lynch, et al., <a href="http://alt.math.recreational.narkive.com/JnDSktfU/palindrome-numbers">Palindrome numbers</a>.
%H A060792 Keith F. Lynch, <a href="http://chesswanks.com/txt/BigDualPalindromes.txt">How I found big dual palindromes</a>.
%e A060792 6643 is a term: since 6643 = 1100111110011_2 = 100010001_3.
%e A060792 1422773 is a term: 1422773 = 101011011010110110101_2 = 2200021200022_3. - _Vladimir Joseph Stephan Orlovsky_, Sep 19 2009
%t A060792 pal2Q[n_Integer] := IntegerDigits[n, 2] == Reverse[IntegerDigits[n, 2]]; pal3Q[n_Integer] := IntegerDigits[n, 3] == Reverse[IntegerDigits[n, 3]]; A060792 = {}; Do[If[pal2Q[n] && pal3Q[n], AppendTo[A060792, n]], {n, 12!}]; A060792 (* _Vladimir Joseph Stephan Orlovsky_, Sep 19 2009 *)
%t A060792 b1=2; b2=3; lst={}; Do[d1=IntegerDigits[n, b1]; d2=IntegerDigits[n, b2]; If[d1==Reverse[d1]&&d2==Reverse[d2], AppendTo[lst, n]], {n, 0, 2 10^7}]; lst (* _Vincenzo Librandi_, Feb 24 2016 *)
%o A060792 (PARI) ispal(n,b)=my(d=digits(n,b)); d==Vecrev(d)
%o A060792 is(n)=ispal(n,2)&&ispal(n,3) \\ _Charles R Greathouse IV_, Jun 17 2014
%o A060792 (Python)
%o A060792 from itertools import chain
%o A060792 from gmpy2 import digits, mpz
%o A060792 A060792 = [int(n,2) for n in chain(map(lambda x:bin(x)[2:]+bin(x)[2:][::-1],range(1,2**16)),map(lambda x:bin(x)[2:]+bin(x)[2:][-2::-1], range(1,2**16))) if mpz(int(n,2)).digits(3) == mpz(int(n,2)).digits(3)[::-1]] # _Chai Wah Wu_, Aug 12 2014
%o A060792 (Magma) [n: n in [0..2*10^7] | Intseq(n, 3) eq Reverse(Intseq(n, 3))and Intseq(n, 2) eq Reverse(Intseq(n, 2))]; // _Vincenzo Librandi_, Feb 24 2016
%Y A060792 a(3) = A048268(2) = A056749(3).
%Y A060792 Intersection of A006995 and A014190.
%K A060792 nonn,base,hard,nice
%O A060792 1,3
%A A060792 Ulrich Schimke (ulrschimke(AT)aol.com)
%E A060792 a(7) found by François Boisson, using a Caml program running on an AMD-64 machine. - Bruno Petazzoni, program co-author, Jan 31 2006
%E A060792 a(8) from the same source, May 26 2006
%E A060792 a(9) from Alan Grimes, Dec 16 2013
%E A060792 a(10) from _Keith F. Lynch_, Jan 07 2014
%E A060792 Term 0 prepended by _Robert G. Wilson v_, Oct 08 2014
%E A060792 a(11)-a(15) (from Alan Grimes and _Keith F. Lynch_) added by _Japheth Lim_, Jan 30 2014