A372754 a(n) is the least base in which the Fibonacci number A000045(n) is a palindrome.
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
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.
Links
- Chai Wah Wu, Table of n, a(n) for n = 1..138 (terms 1..102 from Robert Israel)
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
Comments