cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A357045 Lexicographically earliest sequence of distinct non-palindromic numbers (A029742) such that a(n)+a(n+1) is always a palindrome (A002113).

This page as a plain text file.
%I A357045 #16 Dec 21 2024 20:37:03
%S A357045 10,12,21,23,32,34,43,45,54,47,19,14,30,25,41,36,52,49,17,16,28,27,39,
%T A357045 38,50,51,15,18,26,29,37,40,48,53,13,20,24,31,35,42,46,65,56,75,76,85,
%U A357045 86,95,96,106,116,126,136,146,157,105,97,64,57,74
%N A357045 Lexicographically earliest sequence of distinct non-palindromic numbers (A029742) such that a(n)+a(n+1) is always a palindrome (A002113).
%C A357045 Conjecture: The sequence contains all non-palindromic numbers (A029742).
%H A357045 Eric Angelini, <a href="http://cinquantesignes.blogspot.com/2022/09/sums-with-palindromes.html">Sums with palindromes</a>, personal blog "Cinquante signes" on blogspot.com, and post to the math-fun list, Sep 12 2022
%H A357045 Eric Angelini, <a href="/A357044/a357044.pdf">Sums with palindromes</a>, personal blog "Cinquante signes" on blogspot.com, and post to the math-fun list, Sep 12 2022 [Cached copy]
%o A357045 (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)}
%o A357045 (Python)
%o A357045 from itertools import count, islice
%o A357045 def ispal(n): s = str(n); return s == s[::-1]
%o A357045 def agen():
%o A357045     aset, k, mink = {10}, 10, 12
%o A357045     while True:
%o A357045         an = k; yield an; aset.add(an); k = mink
%o A357045         while k in aset or ispal(k) or not ispal(an+k): k += 1
%o A357045         while mink in aset: mink += 1
%o A357045 print(list(islice(agen(), 60))) # _Michael S. Branicky_, Sep 14 2022
%Y A357045 Cf. A029742 (non-palindromes), A002113 (palindromes), A357044 (palindromes with non-palindromic sum of neighbors).
%K A357045 nonn,base
%O A357045 1,1
%A A357045 _Eric Angelini_ and _M. F. Hasler_, Sep 14 2022