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.

A249155 Palindromic in bases 6 and 15.

This page as a plain text file.
%I A249155 #21 Sep 23 2024 14:19:23
%S A249155 0,1,2,3,4,5,7,14,80,160,301,602,693,994,1295,1627,1777,2365,2666,
%T A249155 5296,5776,6256,17360,34720,51301,52201,105092,155493,209284,587846,
%U A249155 735644,7904800,11495701,80005507,80469907,83165017,89731777,90196177
%N A249155 Palindromic in bases 6 and 15.
%C A249155 Intersection of A029953 and A029960.
%H A249155 Ray Chandler and Chai Wah Wu, <a href="/A249155/b249155.txt">Table of n, a(n) for n = 1..71</a> (terms < 6^28). First 65 terms from Ray Chandler.
%H A249155 Attila Bérczes and Volker Ziegler, <a href="http://arxiv.org/abs/1403.0787">On Simultaneous Palindromes</a>, arXiv:1403.0787 [math.NT], 2014.
%e A249155 301 is a term since 301 = 1221 base 6 and 301 = 151 base 15.
%t A249155 palQ[n_Integer, base_Integer] := Block[{idn = IntegerDigits[n, base]}, idn == Reverse[idn]]; Select[Range[10^6] - 1, palQ[#, 6] && palQ[#, 15] &]
%o A249155 (Python)
%o A249155 from gmpy2 import digits
%o A249155 def palQ(n, b): # check if n is a palindrome in base b
%o A249155     s = digits(n, b)
%o A249155     return s == s[::-1]
%o A249155 def palQgen(l, b): # generator of palindromes in base b of length <= 2*l
%o A249155     if l > 0:
%o A249155         yield 0
%o A249155         for x in range(1, l+1):
%o A249155             for y in range(b**(x-1), b**x):
%o A249155                 s = digits(y, b)
%o A249155                 yield int(s+s[-2::-1], b)
%o A249155             for y in range(b**(x-1), b**x):
%o A249155                 s = digits(y, b)
%o A249155                 yield int(s+s[::-1], b)
%o A249155 A249155_list = [n for n in palQgen(8, 6) if palQ(n, 15)] # _Chai Wah Wu_, Nov 29 2014
%Y A249155 Cf. A007632, A060792, A249156, A249157, A249158.
%K A249155 nonn,base
%O A249155 1,3
%A A249155 _Ray Chandler_, Oct 27 2014