The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A250410 Numbers palindromic in bases 10 and 25. 20
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 22, 494, 626, 676, 1001, 6886, 7887, 8338, 9339, 622226, 626626, 2828282, 2859582, 3304033, 3309033, 3330333, 3335333, 3361633, 3366633, 3392933, 3397933, 6603066, 6608066, 6634366, 6639366, 8986898, 9400049, 9405049, 9431349, 9436349, 9462649, 9467649, 9493949, 9498949 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
LINKS
Robert G. Wilson v, Table of n, a(n) for n = 1..94 (first 82 terms from Chai Wah Wu)
MATHEMATICA
palQ[n_Integer, base_Integer] := Block[{}, Reverse[ idn = IntegerDigits[n, base]] == idn]; genPal[n_] := Block[{id = IntegerDigits@ n, insert = {{}, {0}, {1}, {2}, {3}, {4}, {5}, {6}, {7}, {8}, {9}}}, FromDigits@ Join[id, #, Reverse@ id] & /@ insert]; k = 1; lst = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9}; While[k < 1000001, s = Select[ genPal[k], palQ[#, 25] &]; If[s != {}, AppendTo[lst, s]; Print@ s; lst = Sort@ Flatten@ lst]; k++]; lst
PROG
(Magma) [n: n in [0..10000000] | Intseq(n) eq Reverse(Intseq(n))and Intseq(n, 25) eq Reverse(Intseq(n, 25))]; // Vincenzo Librandi, Nov 23 2014
(Python)
from gmpy2 import digits
def palQ(n, b): # check if n is a palindrome in base b
s = digits(n, b)
return s == s[::-1]
def palQgen10(l): # unordered generator of palindromes of length <= 2*l
if l > 0:
yield 0
for x in range(1, 10**l):
s = str(x)
yield int(s+s[-2::-1])
yield int(s+s[::-1])
A250410_list = sorted([n for n in palQgen10(6) if palQ(n, 25)])
# Chai Wah Wu, Nov 25 2014
CROSSREFS
Sequence in context: A103357 A055931 A250411 * A250409 A303002 A167152
KEYWORD
nonn,base
AUTHOR
Robert G. Wilson v, Nov 22 2014
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 12 18:11 EDT 2024. Contains 373359 sequences. (Running on oeis4.)