login
A231921
Terms of A231920 written in base 10: the binary expansions of a(n) and a(n+1) taken together can be rearranged to form a palindrome.
7
0, 4, 1, 3, 9, 5, 2, 6, 10, 8, 12, 20, 24, 27, 11, 7, 13, 17, 23, 25, 28, 14, 16, 18, 22, 26, 29, 15, 19, 21, 31, 35, 37, 39, 47, 51, 59, 61, 65, 69, 73, 75, 81, 30, 36, 40, 44, 50, 52, 56, 60, 68, 70, 72, 76, 80, 82, 32, 34, 38, 42, 46, 48, 54, 58, 62, 64, 66, 74, 78
OFFSET
0,2
COMMENTS
See A231920 for precise definition.
This is a permutation of the nonnegative integers - see the Comments in A228407 for the proof.
MATHEMATICA
a[0] = 0; a[n_] := a[n] = Block[{k = 1, idm = IntegerDigits[ a[n - 1], 3], t = a@# & /@ Range[n - 1]}, Label[ start]; While[ MemberQ[t, k], k++]; While[ Select[ Permutations[ Join[ idm, IntegerDigits[k, 3]]], #[[1]] != 0 && # == Reverse@# &] == {}, k++; Goto[ start]]; k]; s = Array[a, 100, 0]
KEYWORD
nonn,base,easy
AUTHOR
STATUS
approved