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-2 of 2 results.

A025282 Smallest number requiring n Fibonacci numbers to build using + and *.

Original entry on oeis.org

1, 4, 12, 51, 373, 7724, 370555, 27284157, 2075178956
Offset: 1

Views

Author

Keywords

Comments

The n Fibonacci numbers need not be distinct. - Robert Israel, Jan 25 2015
a(10) > 4427000000. - Sean A. Irvine, Aug 23 2019

Examples

			a(12) = 1 + 3 + 8 but can't be represented using fewer than 3 Fibonacci numbers, and is the least number with this property. - _Robert Israel_, Jan 25 2015
		

Crossrefs

Programs

  • Maple
    N:= 50000: # to get a(n) where a(n) <= N
    P:= Vector(N):
    for i from 1 do
      f:= combinat:-fibonacci(i);
    if f > N then break fi;
    P[f]:= 1
    od:
    A[1]:= 1:
    rmax:= 1:
    for n from 1 to N do
      if P[n] = 0 then
         m:= floor(n/2);
         r:= min(P[1..m] + P[[seq(n-i, i=1..m)]]);
         for a in select(`<=`, numtheory:-divisors(n) minus {1}, floor(sqrt(n))) do
            r:= min(r, P[a] + P[n/a])
         od:
         P[n]:= r;
         if r > rmax then
           A[r]:= n;
           rmax:= r;
         fi
      fi
    od:
    seq(A[i], i=1..rmax); # Robert Israel, Jan 25 2015

Extensions

a(7)-a(9) from Sean A. Irvine, Aug 23 2019

A254123 Least number of terms needed to build n from Fibonacci numbers using + and *.

Original entry on oeis.org

1, 1, 1, 2, 1, 2, 2, 1, 2, 2, 2, 3, 1, 2, 2, 2, 3, 2, 3, 3, 1, 2, 2, 2, 2, 2, 3, 3, 2, 3, 3, 3, 3, 1, 2, 2, 2, 3, 2, 2, 3, 2, 3, 3, 3, 3, 2, 3, 3, 3, 4, 3, 3, 3, 1, 2, 2, 2, 3, 2, 3, 3, 2, 2, 2, 3, 3, 2, 3, 3, 3, 3, 3, 3, 3, 2, 3, 3, 3, 3, 3, 4, 4, 3, 3, 3, 3, 3, 1, 2, 2, 2
Offset: 1

Views

Author

Robert Israel, Jan 25 2015

Keywords

Comments

a(n) = 1 iff n is a Fibonacci number (A000045).
a(n) = 2 iff n is in A254122.
a(A025282(n)) = n.

Examples

			a(40) = 2 because 40 = 5*8; 5 and 8 are Fibonacci numbers but 40 is not.
		

Crossrefs

Programs

  • Maple
    N:= 1000: # to get a(1) to a(N)
    A:= Vector(N):
    for i from 1 do
      f:= combinat:-fibonacci(i);
      if f > N then break fi;
      A[f]:= 1
    od:
    for n from 1 to N do
      if A[n] = 0 then
         m:= floor(n/2);
         r:= min(A[1..m] + A[[seq(n-i,i=1..m)]]);
         for a in select(`<=`, numtheory:-divisors(n) minus {1}, floor(sqrt(n))) do
            r:= min(r, A[a] + A[n/a])
         od:
         A[n]:= r;
      fi
    od:
    seq(A[i],i=1..N);
Showing 1-2 of 2 results.