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!)
A085927 a(n) is the digitwise absolute difference between the n-th palindrome and its 9's complement. 1
7, 5, 3, 1, 1, 3, 5, 7, 9, 77, 55, 33, 11, 11, 33, 55, 77, 99, 797, 777, 757, 737, 717, 717, 737, 757, 777, 797, 595, 575, 555, 535, 515, 515, 535, 555, 575, 595, 393, 373, 353, 333, 313, 313, 333, 353, 373, 393, 191, 171, 151, 131, 111, 111, 131, 151, 171, 191 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
EXAMPLE
a(24) = 717 because A002113(24) = 151 and A061601(151) = 848. 8-1 = 7 and 5-4 = 1, thus 717.
PROG
(Python)
from sympy import isprime
from itertools import count, product
def f(s): return int("".join(str(abs(9 - 2*int(c))) for c in s))
def pals(base=10): # all (nonzero) palindromes as strings
digits = "".join(str(i) for i in range(base))
for d in count(1):
for p in product(digits, repeat=d//2):
if d > 1 and p[0] == "0": continue
left = "".join(p); right = left[::-1]
for mid in [[""], digits][d%2]:
t = left + mid + right
if t != '0': yield t
def aupton(nn): p = pals(); return [f(next(p)) for i in range(nn)]
print(aupton(58)) # Michael S. Branicky, Jul 05 2021
CROSSREFS
Sequence in context: A199794 A106040 A320158 * A180597 A219242 A330920
KEYWORD
base,easy,nonn
AUTHOR
Amarnath Murthy and Jason Earls, Jul 13 2003
EXTENSIONS
Edited and extended by David Wasserman, Feb 11 2005
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 April 24 20:08 EDT 2024. Contains 371963 sequences. (Running on oeis4.)