OFFSET
1,2
COMMENTS
The sequence starts with a(1) = 1 and is always extended with the smallest integer not present that doesn't lead to a contradiction.
Comment from N. J. A. Sloane, Apr 27 2018: (Start)
It is not difficult to prove that a(n+1) always exists. As in the proof that A228407 contains every number, classify numbers m into 2^10 classes according to the parity of the numbers of 0's, 1's, ..., 9's they contain. Let W(m) denote the binary weight of the class that m belongs to.
A necessary and sufficient condition for there to exist a digit x such that the digits of a(n) and x can be rearranged to form a palindrome is that W(a(n)) = 0 or 1. If W(a(n)) = 0 then x can be any nonzero digit, while if W(a(n)) = 1 then x can be chosen to be the digit that appears an odd number of times in a(n), as long as that digit is not zero.
We now choose a(n+1) to begin with x, and choose the remaining digits of a(n+1) so that the digits of a(n+1) again have the required property. (End)
LINKS
Jean-Marc Falcoz, Table of n, a(n) for n = 1..10001
EXAMPLE
The digit of a(1) = 1 together with the 1 of a(2) = 10 forms 11;
the digits of a(2) = 10 together with the 1 of a(3) = 11 form 101;
the digits of a(3) = 11 together with the 2 of a(4) = 2 form 121;
the digit of a(4) = 2 together with the 2 of a(5) = 20 forms 22;
the digits of a(5) = 20 together with the 2 of a(6) = 21 form 202;
the digits of a(6) = 21 together with the 1 of a(7) = 12 form 121;
the digits of a(7) = 12 together with the 1 of a(8) = 13 form 121;
the digits of a(8) = 13 together with the 3 of a(9) = 3 form 313;
etc.
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Eric Angelini and Jean-Marc Falcoz, Apr 25 2018
STATUS
approved