OFFSET
0,3
COMMENTS
From M. F. Hasler, Nov 09 2013: (Start)
At each step, choose the smallest number not occurring earlier and such that a(n+1)+a(n) are palindromes, for all n.
Conjectured to be a permutation of the nonnegative integers.
See A062932 where injectivity is replaced by monotonicity; the sequences differ from a(16)=15 on.
LINKS
Paul Tek, Table of n, a(n) for n = 0..10000 (corrected by Michel Marcus, Jan 19 2019)
Paul Tek, PERL program for this sequence
EXAMPLE
a(1) + a(2) = 3.
a(2) + a(3) = 5.
a(3) + a(4) = 7.
a(4) + a(5) = 9.
a(5) + a(6) = 11.
a(6) + a(7) = 22.
a(7) + a(8) = 33.
PROG
(Perl) See Link section.
(PARI) {a=0; u=0; for(n=1, 99, u+=1<<a; print1(a", "); for(k=1, 9e9, !bittest(u, k)&&is_A002113(a+k)&&(a=k)&&next(2)))} \\ M. F. Hasler, Nov 09 2013
(Python)
from itertools import islice
def ispal(n): s = str(n); return s == s[::-1]
def agen(): # generator of terms
aset, an, mink = {0}, 0, 1
yield 0
while True:
k = mink
while k in aset or not ispal(an + k): k += 1
an = k; aset.add(an); yield an
while mink in aset: mink += 1
print(list(islice(agen(), 70))) # Michael S. Branicky, Nov 07 2022
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Paul Tek, Aug 31 2013
EXTENSIONS
a(0)=0 added by M. F. Hasler, Nov 15 2013
STATUS
approved