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.
%I A349238 #30 Apr 01 2024 11:53:34 %S A349238 0,1,1,1,4,1,6,4,1,9,6,4,12,1,14,9,6,19,4,17,12,1,22,14,9,30,6,27,19, %T A349238 4,25,17,12,33,1,35,22,14,48,9,43,30,6,40,27,19,53,4,38,25,17,51,12, %U A349238 46,33,1,56,35,22,77,14,69,48,9,64,43,30,85,6,61,40,27 %N A349238 Reverse the digits in the Zeckendorf representation of n (A189920). %C A349238 Fixed points a(n) = n are the Zeckendorf palindromes n = A094202. %C A349238 Apart from a(0)=0, all terms end with a 1 digit so are "odd" A003622. %C A349238 a(n) = 1 iff n is a Fibonacci number >= 1 (A000045) since they are Zeckendorf 100..00 which reverses to 00..001. %C A349238 A given k first occurs as a(n) = k at its reversal n = a(k), and thereafter at this n with any number of least significant 0's appended. %C A349238 The equivalent reversal in binary is A030101 so that a conversion to Fibbinary (A003714) and back gives a(n) = A022290(A030101(A003714(n))). %C A349238 A reverse and reverse again loses any least significant 0 digits as in A348853 so that a(a(n)) = A348853(n). %H A349238 Kevin Ryde, <a href="/A349238/b349238.txt">Table of n, a(n) for n = 0..10000</a> %H A349238 Kevin Ryde, <a href="/A349238/a349238.gp.txt">PARI/GP Code</a>. %F A349238 There is a linear representation of rank 6 for this sequence. - _Jeffrey Shallit_, May 13 2023 %e A349238 n = 1445 = Zeckendorf 101000101001000 %e A349238 a(n) = 313 = Zeckendorf 000100101000101 reversal %o A349238 (PARI) \\ See links. %o A349238 (Python) %o A349238 def NumToFib(n): # n > 0 %o A349238 f0, f1, k = 1, 1, 0 %o A349238 while f0 <= n: %o A349238 f0, f1, k = f0+f1, f0, k+1 %o A349238 s = "" %o A349238 while k > 0: %o A349238 f0, f1, k = f1, f0-f1, k-1 %o A349238 if f0 <= n: %o A349238 s, n = s+"1", n-f0 %o A349238 else: %o A349238 s = s+"0" %o A349238 return s %o A349238 def RevFibToNum(s): %o A349238 f0, f1 = 1, 1 %o A349238 n, k = 0, 0 %o A349238 while k < len(s): %o A349238 if s[k] == "1": %o A349238 n = n+f0 %o A349238 f0, f1, k = f0+f1, f0, k+1 %o A349238 return n %o A349238 n, a = 0, 0 %o A349238 print(a, end = ", ") %o A349238 while n < 71: %o A349238 n += 1 %o A349238 print(RevFibToNum(NumToFib(n)), end = ", ") # _A.H.M. Smeets_, Nov 14 2021 %Y A349238 Cf. A189920 (Zeckendorf digits), A094202 (fixed points), A003622 (range), A348853 (delete trailing 0's). %Y A349238 Cf. A003714 (Fibbinary), A022290 (its inverse). %Y A349238 Cf. A343150 (reverse below MSB). %Y A349238 Other base reversals: A030101 (binary), A004086 (decimal). %K A349238 base,easy,nonn %O A349238 0,5 %A A349238 _Kevin Ryde_, Nov 11 2021