login
A303501
Lexicographically earliest sequence of distinct positive terms such that the digits of a(n) together with the first digit of a(n+1) can be arranged to form a base-10 palindrome.
2
1, 10, 11, 2, 20, 21, 12, 13, 3, 30, 31, 14, 4, 40, 41, 15, 5, 50, 51, 16, 6, 60, 61, 17, 7, 70, 71, 18, 8, 80, 81, 19, 9, 90, 91, 92, 22, 23, 24, 25, 26, 27, 28, 29, 93, 32, 33, 34, 35, 36, 37, 38, 39, 94, 42, 43, 44, 45, 46, 47, 48, 49, 95, 52, 53, 54, 55, 56, 57, 58, 59, 96, 62, 63, 64
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
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
Cf. A002113 (Palindromes in base 10).
The palindromes arising here are listed in A303570.
Sequence in context: A173821 A101807 A248025 * A368347 A289985 A065517
KEYWORD
nonn,base
AUTHOR
STATUS
approved