cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A094202 Integers k whose Zeckendorf representation A014417(k) is palindromic.

This page as a plain text file.
%I A094202 #39 Mar 22 2021 03:41:49
%S A094202 0,1,4,6,9,12,14,22,27,33,35,51,56,64,74,80,88,90,116,127,145,158,174,
%T A094202 184,197,203,216,232,234,276,294,326,368,378,399,425,441,462,472,493,
%U A094202 519,525,546,572,588,609,611,679,708,760,828,847,915,944,988,1022,1064,1090
%N A094202 Integers k whose Zeckendorf representation A014417(k) is palindromic.
%D A094202 C. G. Lekkerkerker, Voorstelling van natuurlijke getallen door een som van getallen van Fibonacci, Simon Stevin vol. 29, 1952, pages 190-195.
%D A094202 E. Zeckendorf, Représentation des nombres naturels par une somme de nombres de Fibonacci ou de nombres de Lucas, Bulletin de la Société Royale des Sciences de Liège vol. 41 (1972) pages 179-182.
%H A094202 Alois P. Heinz, <a href="/A094202/b094202.txt">Table of n, a(n) for n = 1..20000</a> (first 129 terms from Indranil Ghosh)
%H A094202 Ron Knott, <a href="http://www.maths.surrey.ac.uk/hosted-sites/R.Knott/Fibonacci/fibrep.html">Fibonacci Bases</a>.
%e A094202 Fibonacci base columns are ...,8,5,3,2,1 with column entries 0 or 1 and no two consecutive ones (the Zeckendorf representation) so that each n has a unique representation.
%e A094202 12 is in the sequence because 12 = 8 + 3 + 1 = 10101 base Fib; 14 = 13 + 1 = 100001 base Fib.
%t A094202 zeck[n_Integer] := Block[{k = Ceiling[ Log[ GoldenRatio, n*Sqrt[5]]], t = n, fr = {}}, While[k > 1, If[t >= Fibonacci[k], AppendTo[ fr, 1]; t = t - Fibonacci[k], AppendTo[fr, 0]]; k-- ]; FromDigits[fr]]; a = {}; Do[z = zeck[n]; If[ FromDigits[ Reverse[ IntegerDigits[z]]] == z, AppendTo[a, n]], {n, 1123}]; a (* _Robert G. Wilson v_, May 29 2004 *)
%t A094202 mirror[dig_, s_] := Join[dig, s, Reverse[dig]]; select[v_, mid_] := Select[v, Length[#] == 0 || Last[#] != mid &]; fib[dig_] := Plus @@ (dig * Fibonacci[Range[2, Length[dig] + 1]]); pals = Rest[IntegerDigits /@ FromDigits /@ Select[Tuples[{0, 1}, 7], SequenceCount[#, {1, 1}] == 0 &]]; Union@Join[{0, 1}, fib /@ Join[mirror[#, {}] & /@ (select[pals, 1]), mirror[#, {1}] & /@ (select[pals, 1]), mirror[#, {0}] & /@ pals]] (* _Amiram Eldar_, Jan 11 2020 *)
%o A094202 (Python)
%o A094202 from sympy import fibonacci
%o A094202 def a(n):
%o A094202     k=0
%o A094202     x=0
%o A094202     while n>0:
%o A094202         k=0
%o A094202         while fibonacci(k)<=n: k+=1
%o A094202         x+=10**(k - 3)
%o A094202         n-=fibonacci(k - 1)
%o A094202     return x
%o A094202 def ok(n):
%o A094202     x=str(a(n))
%o A094202     return x==x[::-1]
%o A094202 print([n for n in range(1101) if ok(n)]) # _Indranil Ghosh_, Jun 07 2017
%Y A094202 Cf. A014417, A035517.
%Y A094202 Gives the positions of zeros in A095734. Subsets: A095730, A048757. A006995 gives the integers whose binary expansion is palindromic.
%K A094202 nonn,base
%O A094202 1,3
%A A094202 _Ron Knott_, May 25 2004
%E A094202 More terms from _Robert G. Wilson v_, May 28 2004
%E A094202 Offset changed to 1 by _Alois P. Heinz_, Aug 02 2017