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.

Showing 1-4 of 4 results.

A054494 Largest Fibonacci factor of n.

Original entry on oeis.org

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, 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, 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
Offset: 1

Views

Author

Henry Bottomley, Apr 04 2000

Keywords

Examples

			a(10)=5 because 1, 2 and 5 are the Fibonacci numbers which divide 10 and 5 is the largest.
		

Crossrefs

Sequences with similar definitions: A047930 (smallest Fibonacci multiple), A280686 (restricted to proper divisors), A280694 (equivalent for Lucas numbers).
Positions of 1's: A147956.

Programs

  • Mathematica
    With[{fibs=Fibonacci[Range[20]]},Table[Max[Select[fibs,Divisible[ n,#]&]],{n,100}]] (* Harvey P. Dale, Jul 17 2012 *)
  • PARI
    A010056(n)=my(k=n^2); k+=(k+1)<<2; issquare(k) || (n>0 && issquare(k-8))
    a(n)=fordiv(n,d,if(A010056(n/d), return(n/d))) \\ Charles R Greathouse IV, Nov 05 2014
    
  • Python
    from sympy import divisors
    from sympy.ntheory.primetest import is_square
    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

Formula

a(n) = n/A054495(n).

Extensions

Corrected by Harvey P. Dale, Jul 17 2012

A249783 Smallest index of a Fibonacci-like sequence containing n, see comments.

Original entry on oeis.org

0, 1, 1, 1, 2, 1, 2, 3, 1, 3, 2, 3, 4, 1, 4, 3, 2, 5, 3, 5, 4, 1, 6, 4, 3, 5, 2, 7, 5, 3, 6, 5, 4, 6, 1, 7, 6, 4, 7, 3, 5, 7, 2, 8, 7, 5, 8, 3, 6, 8, 5, 9, 4, 6, 9, 1, 7, 9, 6, 10, 4, 7, 10, 3, 8, 5, 7, 11, 2, 8, 11, 7, 9, 5, 8, 12, 3, 9, 6, 8, 10, 5, 9, 13, 4, 10, 6, 9, 11, 1, 10, 7, 9, 11, 6, 10, 12, 4, 11, 7, 10
Offset: 0

Views

Author

Allan C. Wechsler, Nov 05 2014

Keywords

Comments

Any two nonnegative integers F0 and F1 generate a Fibonacci-like sequence where for n > 1, Fn = F[n-1] + F[n-2]. Call F0 + F1 the "index" of such a sequence. In this sequence, a(n) is the smallest occurring index of any Fibonacci-like sequence containing n.

Examples

			For n = 0, the trivial sequence 0, 0, 0, ... has index 0.
For n = 5, the classic Fibonacci sequence 0, 1, 1, 2, 3, 5, ... contains 5 and has index 1.
For n = 7, the Lucas sequence 2, 1, 3, 4, 7, ... contains 7, and no such sequence with a smaller index contains 7.
		

Crossrefs

If n > 0 is an element of A000045, a(n) = 1. If n > 2 is twice such an element, a(n) = 2. If n > 3 is an element of A000032 or of A022086, a(n) = 3.

Programs

  • Haskell
    bi x y = if (x
    				
  • Mathematica
    a[n_] := Module[{a, k, A, B}, If[n<2, Return[n]]; For[k=1, k <= n-1, k++, For[a=0, a <= k-1, a++, A=a; B=k-A; While[BJean-François Alcover, Jan 06 2017, translated from PARI *)
  • PARI
    a(n)=if(n<2,return(n));for(k=1,n-1,for(a=0,k-1,my(A=a,B=k-A);while(BCharles R Greathouse IV, Nov 06 2014

Formula

a(n) <= A054495(n) <= n. - Charles R Greathouse IV, Nov 06 2014

Extensions

Extended by Charles R Greathouse IV, Nov 06 2014

A280695 a(n) = n / A280694(n); n divided by the largest Lucas number (A000032) dividing n.

Original entry on oeis.org

1, 1, 1, 1, 5, 2, 1, 2, 3, 5, 1, 3, 13, 2, 5, 4, 17, 1, 19, 5, 3, 2, 23, 6, 25, 13, 9, 4, 1, 10, 31, 8, 3, 17, 5, 2, 37, 19, 13, 10, 41, 6, 43, 4, 15, 23, 1, 12, 7, 25, 17, 13, 53, 3, 5, 8, 19, 2, 59, 15, 61, 31, 9, 16, 65, 6, 67, 17, 23, 10, 71, 4, 73, 37, 25, 1, 7, 26, 79, 20, 27, 41, 83, 12, 85, 43, 3, 8, 89, 5, 13, 23, 31, 2, 95, 24, 97, 14, 9, 25, 101, 34
Offset: 1

Views

Author

Antti Karttunen, Jan 11 2017

Keywords

Crossrefs

Programs

A246399 Least k such that A249783(k) = n.

Original entry on oeis.org

1, 4, 7, 12, 17, 22, 27, 43, 51, 59, 67, 75, 83, 122, 135, 148, 161, 174, 187, 200, 213, 226, 239, 344, 365, 386, 407, 428, 449, 470, 491, 512, 533, 554, 575, 596, 617, 638, 659, 931, 965, 999, 1033, 1067, 1101, 1135, 1169, 1203, 1237, 1271
Offset: 1

Views

Author

Keywords

Comments

It appears that a(n) exists for each n, and that the sequence is increasing.

Examples

			a(3) = 7 because the Fibonacci-like sequence 2, 1, 3, 4, 7, 11, ... contains 7 and the sum of the first two terms is 3, while no smaller sequences work. (All terms must be nonnegative.)
		

Crossrefs

Programs

  • Mathematica
    A249783[n_] := A249783[n] = Module[{a, k, A, B}, If[n<2, Return[n]]; For[k = 1, k <= n-1, k++, For[a=0, a <= k-1, a++, A = a; B = k-A; While[BA249783[k] == n, Return[k]]]; Array[a, 50] (* Jean-François Alcover, Jan 06 2017, adapted from PARI *)
  • PARI
    A054495(n)=fordiv(n,d,if(A010056(n/d),return(d)))
    A249783(n)=if(n<2,return(n));for(k=1,n-1,for(a=0,k-1,my(A=a,B=k-A);while(B=least&&t<=#v&&v[t]==0,v[t]=n;while(v[least],if(least++>#v,return(v)))))
Showing 1-4 of 4 results.