OFFSET
1,3
LINKS
EXAMPLE
273 is in the sequence because 273_10 = 333_9 = 100010001_2.
MATHEMATICA
(* first load nthPalindromeBase from A002113 *) palQ[n_Integer, base_Integer] := Block[{}, Reverse[ idn = IntegerDigits[n, base]] == idn]; k = 0; lst = {}; While[k < 21000000, pp = nthPalindromeBase[k, 9]; If[palQ[pp, 2], AppendTo[lst, pp]; Print[pp]]; k++]; lst
PROG
(Python)
def nextpal(n, base): # m is the first palindrome successor of n in base base
m, pl = n+1, 0
while m > 0:
m, pl = m//base, pl+1
if n+1 == base**pl:
pl = pl+1
n = n//(base**(pl//2))+1
m, n = n, n//(base**(pl%2))
while n > 0:
m, n = m*base+n%base, n//base
return m
n, a2, a9 = 0, 0, 0
while n <= 30:
if a2 < a9:
a2 = nextpal(a2, 2)
elif a9 < a2:
a9 = nextpal(a9, 9)
else: # a2 == a9
print(a2, end=", ")
a2, a9, n = nextpal(a2, 2), nextpal(a9, 9), n+1 # A.H.M. Smeets, Jun 03 2019
CROSSREFS
Cf. A048268, A060792, A097856, A097928, A182232, A259374, A097929, A182233, A259375, A259376, A097930, A182234, A259377, A259378, A249156, A097931, A259380, A259381, A259382, A259383, A259384, A099145, A259385, A259386, A259387, A259388, A259389, A259390, A099146, A007632, A007633, A029961, A029962, A029963, A029964, A029804, A029965, A029966, A029967, A029968, A029969, A029970, A029731, A097855, A250408, A250409, A250410, A250411, A099165, A250412.
KEYWORD
nonn,base
AUTHOR
Eric A. Schmidt and Robert G. Wilson v, Jul 16 2015
STATUS
approved