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!)
A110002 Palindromes whose perfect deficiency (A109883) is also palindromic. 1
1, 2, 3, 4, 5, 6, 7, 8, 9, 22, 44, 222, 292, 414, 646, 717, 848, 979, 27072, 28882, 45954, 74247, 90109, 96569, 118811, 2376732, 5136315, 5185815, 5266625, 5635365, 5684865, 6344436, 7424247, 7481847, 7484847, 7929297, 9858589, 12333321, 21922912, 32255223 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
LINKS
Michael S. Branicky, Table of n, a(n) for n = 1..101 (all terms < 10^14)
MATHEMATICA
subtract = If[ #1 < #2, Throw[ #1], #1 - #2]&; d[n_] := Catch @ Fold[subtract, n, Divisors @ n]; Select[Range[10000000], PalindromeQ[#]&&PalindromeQ[d[#]]&] (* James C. McMahon, Mar 31 2024 *)
PROG
(Python) # uses imports, function in A109883
from itertools import count, islice, product
def ispal(n): return (s:=str(n)) == s[::-1]
def pals(): # generator of palindromes
digits = "0123456789"
yield from map(int, digits)
for d in count(2):
for f in "123456789":
for p in product(digits, repeat=d//2-1):
left = f + "".join(p); right = left[::-1]
for mid in [[""], digits][d%2]:
yield int(left + mid + right)
def agen(): yield from (p for p in pals() if p>0 and ispal(A109883(p)))
print(list(islice(agen(), 40))) # Michael S. Branicky, Mar 31 2024
CROSSREFS
Sequence in context: A274124 A045910 A128290 * A232709 A249334 A338257
KEYWORD
base,nonn
AUTHOR
Jason Earls, Sep 02 2005
EXTENSIONS
a(38) and beyond from Michael S. Branicky, Mar 31 2024
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.)