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.

A054494 Largest Fibonacci factor of n.

This page as a plain text file.
%I A054494 #22 May 06 2024 11:04:30
%S A054494 1,2,3,2,5,3,1,8,3,5,1,3,13,2,5,8,1,3,1,5,21,2,1,8,5,13,3,2,1,5,1,8,3,
%T A054494 34,5,3,1,2,13,8,1,21,1,2,5,2,1,8,1,5,3,13,1,3,55,8,3,2,1,5,1,2,21,8,
%U A054494 13,3,1,34,3,5,1,8,1,2,5,2,1,13,1,8,3,2,1,21,5,2,3,8,89,5,13,2,3,2,5,8,1,2,3,5
%N A054494 Largest Fibonacci factor of n.
%H A054494 Charles R Greathouse IV, <a href="/A054494/b054494.txt">Table of n, a(n) for n = 1..10000</a>
%F A054494 a(n) = n/A054495(n).
%e A054494 a(10)=5 because 1, 2 and 5 are the Fibonacci numbers which divide 10 and 5 is the largest.
%t A054494 With[{fibs=Fibonacci[Range[20]]},Table[Max[Select[fibs,Divisible[ n,#]&]],{n,100}]] (* _Harvey P. Dale_, Jul 17 2012 *)
%o A054494 (PARI) A010056(n)=my(k=n^2); k+=(k+1)<<2; issquare(k) || (n>0 && issquare(k-8))
%o A054494 a(n)=fordiv(n,d,if(A010056(n/d), return(n/d))) \\ _Charles R Greathouse IV_, Nov 05 2014
%o A054494 (Python)
%o A054494 from sympy import divisors
%o A054494 from sympy.ntheory.primetest import is_square
%o A054494 def A054494(n): return next(d for d in sorted(divisors(n,generator=True),reverse=True) if is_square(m:=5*d**2-4) or is_square(m+8)) # _Chai Wah Wu_, May 06 2024
%Y A054494 Cf. A000045, A005086, A010056, A054495.
%Y A054494 Sequences with similar definitions: A047930 (smallest Fibonacci multiple), A280686 (restricted to proper divisors), A280694 (equivalent for Lucas numbers).
%Y A054494 Positions of 1's: A147956.
%K A054494 easy,nonn
%O A054494 1,2
%A A054494 _Henry Bottomley_, Apr 04 2000
%E A054494 Corrected by _Harvey P. Dale_, Jul 17 2012