login
A372754
a(n) is the least base in which the Fibonacci number A000045(n) is a palindrome.
1
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,1
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).
LINKS
Chai Wah Wu, Table of n, a(n) for n = 1..138 (terms 1..102 from Robert Israel)
FORMULA
a(n) = A016026(A000045(n)).
EXAMPLE
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.
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 *)
PROG
(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
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Robert Israel, May 12 2024
STATUS
approved