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.

A372754 a(n) is the least base in which the Fibonacci number A000045(n) is a palindrome.

Original entry on oeis.org

2, 2, 3, 2, 2, 3, 3, 2, 4, 4, 8, 11, 3, 11, 9, 11, 15, 29, 25, 29, 29, 29, 40, 17, 121, 76, 76, 69, 147, 39, 148, 199, 199, 199, 311, 361, 10876, 428, 521, 521, 1026, 1364, 1025, 1364, 1364, 1364, 2100, 2018, 4973, 3571, 3571, 3571, 5802, 6461, 11343, 9349, 9349, 9349, 31952, 24476, 15885, 24476
Offset: 1

Views

Author

Robert Israel, May 12 2024

Keywords

Comments

With F = A000045 the Fibonacci numbers and L = A000032 the Lucas numbers, for j odd we have F(3*j+k) = F(j+k)*L(j)^2 + F(k)*L(j) + F(j+k), thus this is a palindrome mod L(j) if F(k) >= 0 and 0 <= F(j+k) < L(j). Therefore a(6*n), a(6*n+2), a(6*n+3) and a(6*n+4) all <= L(2*n+1).

Examples

			A000045(6) = 8.  In base 2 this is 1000, not a palindrome, but in base 3 it is 22, a palindrome.  Thus a(6) = 3.
		

Crossrefs

Programs

  • Maple
    f:= proc(x) local b,L;
      for b from 2 do
        L:= convert(x,base,b);
        if L = ListTools:-Reverse(L) then return b fi
      od
    end proc:
    map(f, [seq(combinat:-fibonacci(n), n=1..70)]);
  • Mathematica
    A372754[n_] := Block[{b = 1}, While[!PalindromeQ[IntegerDigits[#, ++b]]] & [Fibonacci[n]]; b]; Array[A372754, 70] (* Paolo Xausa, May 18 2024 *)
  • Python
    from itertools import count
    from sympy import fibonacci
    from sympy.ntheory.factor_ import digits
    def A372754(n): return next(b for b in count(2) if (s := digits(fibonacci(n),b)[1:])[:(t:=len(s)+1>>1)]==s[:-t-1:-1]) # Chai Wah Wu, May 13 2024

Formula

a(n) = A016026(A000045(n)).