login
A357045
Lexicographically earliest sequence of distinct non-palindromic numbers (A029742) such that a(n)+a(n+1) is always a palindrome (A002113).
1
10, 12, 21, 23, 32, 34, 43, 45, 54, 47, 19, 14, 30, 25, 41, 36, 52, 49, 17, 16, 28, 27, 39, 38, 50, 51, 15, 18, 26, 29, 37, 40, 48, 53, 13, 20, 24, 31, 35, 42, 46, 65, 56, 75, 76, 85, 86, 95, 96, 106, 116, 126, 136, 146, 157, 105, 97, 64, 57, 74
OFFSET
1,1
COMMENTS
Conjecture: The sequence contains all non-palindromic numbers (A029742).
LINKS
Eric Angelini, Sums with palindromes, personal blog "Cinquante signes" on blogspot.com, and post to the math-fun list, Sep 12 2022
PROG
(PARI) A357045_first(n, U=[9], a=1)={vector(n, k, k=U[1]; until( is_A002113(a+k) && !is_A002113(k) && !setsearch(U, k), k++); U=setunion(U, [a=k]); while(#U>1 && U[2]==U[1]+1+is_A002113(U[1]+1), U=U[^1]); a)}
(Python)
from itertools import count, islice
def ispal(n): s = str(n); return s == s[::-1]
def agen():
aset, k, mink = {10}, 10, 12
while True:
an = k; yield an; aset.add(an); k = mink
while k in aset or ispal(k) or not ispal(an+k): k += 1
while mink in aset: mink += 1
print(list(islice(agen(), 60))) # Michael S. Branicky, Sep 14 2022
CROSSREFS
Cf. A029742 (non-palindromes), A002113 (palindromes), A357044 (palindromes with non-palindromic sum of neighbors).
Sequence in context: A215940 A368550 A337866 * A320170 A082927 A108965
KEYWORD
nonn,base
AUTHOR
Eric Angelini and M. F. Hasler, Sep 14 2022
STATUS
approved