login
Numbers whose Zeckendorf representation (A014417) and dual Zeckendorf representation (A104326) are both palindromic.
0

%I #4 Jan 11 2020 21:51:34

%S 0,1,4,6,12,22,33,64,88,174,232,462,609,1216,1596,3190,4180,8358,

%T 10945,21888,28656,57310,75024,150046,196417,392832,514228,1028454,

%U 1346268,2692534,3524577,7049152,9227464,18454926,24157816,48315630,63245985,126491968,165580140

%N Numbers whose Zeckendorf representation (A014417) and dual Zeckendorf representation (A104326) are both palindromic.

%C Apparently union of numbers of the form F(2*k - 1) - 1 (k > 0) and numbers of the form 2 * F(2*k - 1) - 4 (k > 1), where F(m) is the m-th Fibonacci number.

%C The numbers of the form F(2*k - 1) - 1 have the same Zeckendorf and dual Zeckendorf representations. For k > 1 the representation is 1010...01, k-1 1's interleaved with k-2 0's.

%e 6 is a term since its Zeckendorf representation, 1001, and its dual Zeckendorf representation, 111, are both palindromic.

%t mirror[dig_, s_] := Join[dig, s, Reverse[dig]];

%t select[v_, mid_] := Select[v, Length[#] == 0 || Last[#] != mid &];

%t fib[dig_] := Plus @@ (dig*Fibonacci[Range[2, Length[dig] + 1]]);

%t ndig = 12; pals1 = Rest[IntegerDigits /@ FromDigits /@ Select[Tuples[{0, 1}, ndig], SequenceCount[#, {1, 1}] == 0 &]];

%t zeckPals = Union @ Join[{0, 1}, fib /@ Join[mirror[#, {}] & /@ (select[pals1, 1]), mirror[#, {1}] & /@ (select[pals1, 1]), mirror[#, {0}] & /@ pals1]];

%t pals2 = Join[{{}}, Rest[Select[IntegerDigits[Range[0, 2^ndig - 1], 2], SequenceCount[#, {0, 0}] == 0 &]]];

%t dualZeckPals = Union@Join[{0}, fib /@ Join[mirror[#, {}] & /@ (select[pals2, 0]), mirror[#, {0}] & /@ (select[pals2, 0]), mirror[#, {1}] & /@ pals2]];

%t Intersection[zeckPals, dualZeckPals]

%Y Intersection of A094202 and A331191.

%Y Cf. A000045, A000071, A002113, A006995, A014190, A027941, A048268, A060792, A095309, A104326, A329459.

%K nonn,base

%O 1,3

%A _Amiram Eldar_, Jan 11 2020