login
This site is supported by donations 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

Cf. A007632, A007633, A029961, A029962, A029963, A029964, A029804, A029965, A029966, A029967, A029968, A029969, A029970, A029731, A097855, A250408, A250409, A250411, A099165, A250412.

Sequence in context: A103357 A055931 A250411 * A250409 A303002 A167152

Adjacent sequences:  A250407 A250408 A250409 * A250411 A250412 A250413

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 | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 23 05:36 EDT 2019. Contains 321422 sequences. (Running on oeis4.)