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!)
A253147 Palindromes in base 10 >= 256 that remain palindromes when the digits are reversed in base 256. 3
8448, 31613, 32123, 55255, 63736, 92929, 96769, 108801, 450054, 516615, 995599, 1413141, 1432341, 1539351, 1558551, 2019102, 2491942, 2513152, 2712172, 2731372, 2750572, 2807082, 2838382, 2857582, 2876782, 3097903, 3740473, 3866683, 3885883, 4201024, 4220224, 4327234 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
Reversing the digits in base 256 is equivalent to reading a number in big-endian format using little-endian order with 8-bit words. See also A238853.
LINKS
Wikipedia, Endianness
EXAMPLE
2857582 is in the sequence since 2857582 is 2b 9a 6e in base 16 and 6e 9a 2b = 7248427 is a palindrome.
PROG
(Python)
from __future__ import division
def palgen(l, b=10): # generator of palindromes in base b of length <= 2*l
....if l > 0:
........yield 0
........for x in range(1, l+1):
............n = b**(x-1)
............n2 = n*b
............for y in range(n, n2):
................k, m = y//b, 0
................while k >= b:
....................k, r = divmod(k, b)
....................m = b*m + r
................yield y*n + b*m + k
............for y in range(n, n2):
................k, m = y, 0
................while k >= b:
....................k, r = divmod(k, b)
....................m = b*m + r
................yield y*n2 + b*m + k
def reversedigits(n, b=10): # reverse digits of n in base b
....x, y = n, 0
....while x >= b:
........x, r = divmod(x, b)
........y = b*y + r
....return b*y + x
A253147_list = []
for n in palgen(4):
....x = reversedigits(n, 256)
....if n > 255 and x == reversedigits(x, 10):
........A253147_list.append(n)
CROSSREFS
Sequence in context: A116258 A116311 A116351 * A046336 A046384 A170787
KEYWORD
nonn,base
AUTHOR
Chai Wah Wu, Dec 29 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 March 28 12:59 EDT 2024. Contains 371254 sequences. (Running on oeis4.)