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

A130473 Partial sums of A087172.

Original entry on oeis.org

1, 3, 6, 9, 14, 19, 24, 32, 40, 48, 56, 64, 77, 90, 103, 116, 129, 142, 155, 168, 189, 210, 231, 252, 273, 294, 315, 336, 357, 378, 399, 420, 441, 475, 509, 543, 577, 611, 645, 679, 713, 747, 781, 815, 849, 883, 917, 951, 985, 1019, 1053, 1087, 1121, 1155, 1210
Offset: 1

Views

Author

Hieronymus Fischer, May 28 2007

Keywords

Crossrefs

Programs

  • Mathematica
    Accumulate[Flatten[Map[ConstantArray[Fibonacci[#],Fibonacci[#-1]]&,Range[15]]]] (* Peter J. C. Moses, May 02 2022 *)

Formula

a(n) = (1/2)*(Fib(2*b(n)+1) - 3*Fib(b(n))*Fib(b(n)+1)-1) + (n+1)*Fib(b(n)) where b(n) = A130233(n) = A130234(n+1)-1 and Fib(n)=A000045(n).

A139764 Smallest term in Zeckendorf representation of n.

Original entry on oeis.org

1, 2, 3, 1, 5, 1, 2, 8, 1, 2, 3, 1, 13, 1, 2, 3, 1, 5, 1, 2, 21, 1, 2, 3, 1, 5, 1, 2, 8, 1, 2, 3, 1, 34, 1, 2, 3, 1, 5, 1, 2, 8, 1, 2, 3, 1, 13, 1, 2, 3, 1, 5, 1, 2, 55, 1, 2, 3, 1, 5, 1, 2, 8, 1, 2, 3, 1, 13, 1, 2, 3, 1, 5, 1, 2, 21, 1, 2, 3, 1, 5, 1, 2, 8, 1, 2, 3, 1, 89
Offset: 1

Views

Author

Steve Witham (sw(AT)tiac.net), May 15 2008

Keywords

Comments

Also called a "Fibonacci fractal".
Appears to be the same as the "ruler of Fibonaccis" mentioned by Knuth. - N. J. A. Sloane, Aug 03 2012
a(n) is also the number of matches to take away to win in a certain match game (see Rocher et al.).
The frequencies of occurrences of the values in this sequence and A035614 are related by the golden ratio.

Examples

			The Zeckendorf representation of 7 = 5 + 2, so a(7) = 2.
		

References

  • D. E. Knuth, The Art of Computer Programming, Vol. 4A, Section 7.1.3, p. 82, solution to Problem 179. - From N. J. A. Sloane, Aug 03 2012

Crossrefs

Programs

  • Haskell
    a139764 = head . a035517_row  -- Reinhard Zumkeller, Mar 10 2013
  • Maple
    A000045 := proc(n) combinat[fibonacci](n) ; end:
    A087172 := proc(n)
    local a,i ;
    a := 0 ;
    for i from 0 do
    if A000045(i) <= n then
    a := A000045(i) ;
    else
    RETURN(a) ;
    fi ;
    od:
    end:
    A139764 := proc(n)
    local nResid,prevF ;
    nResid := n ;
    while true do
    prevF := A087172(nResid) ;
    if prevF = nResid then
    RETURN(prevF) ;
    else
    nResid := nResid-prevF ;
    fi ;
    od:
    end:
    seq(A139764(n),n=1..120) ;
    # R. J. Mathar, May 22 2008
  • Mathematica
    f[n_] := (k = 1; ff = {}; While[(fi = Fibonacci[k]) <= n, AppendTo[ff, fi]; k++]; Drop[ff, 1]); a[n_] := First[ If[n == 0, 0, r = n; s = {}; fr = f[n]; While[r > 0, lf = Last[fr]; If[lf <= r, r = r - lf; PrependTo[s, lf]]; fr = Drop[fr, -1]]; s]]; Table[a[n], {n, 1, 89}] (* Jean-François Alcover, Nov 02 2011 *)
  • PARI
    a(n)=my(f);forstep(k=log(n*sqrt(5))\log(1.61803)+2, 2, -1, f=fibonacci(k);if(f<=n,n-=f;if(!n,return(f));k--)) \\ Charles R Greathouse IV, Nov 02 2011
    

Formula

a(n) = n if n is a Fibonacci number, else a( n - (largest Fibonacci number < n) ).
a(n) = the value of the (exactly one) digit that turns on between the Fibonacci-base representations of n-1 and n. E.g., from 6 (1001) to 7 (1010), the two's digit turns on.
a(n) = top element of the column of the Wythoff array that contains n.
a(n) = A000045(A035614(n-1) + 2). [Offsets made precise by Peter Munn, Apr 13 2021]
a(n) = A035517(n,0). - Reinhard Zumkeller, Mar 10 2013

Extensions

More terms from T. D. Noe and R. J. Mathar, May 22 2008

A066628 a(n) = n - the largest Fibonacci number <= n.

Original entry on oeis.org

0, 0, 0, 0, 1, 0, 1, 2, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30
Offset: 0

Views

Author

Amarnath Murthy, Dec 25 2001

Keywords

Crossrefs

Programs

  • Mathematica
    f[n_] := Block[{k = 1}, While[Fibonacci[k] <= n, k++ ]; Return[n - Fibonacci[k - 1]]]; Table[ f[n], {n, 0, 100} ]
  • PARI
    a(n) = { my(k=0); while(fibonacci(k) <= n, k++); n-fibonacci(k-1) } \\ Harry J. Smith, Mar 14 2010

Formula

a(n) = n - A087172(n). - Michel Marcus, Feb 02 2016

Extensions

Corrected and extended by Robert G. Wilson v, Dec 28 2001

A256654 Least Fibonacci number not less than n.

Original entry on oeis.org

1, 2, 3, 5, 5, 8, 8, 8, 13, 13, 13, 13, 13, 21, 21, 21, 21, 21, 21, 21, 21, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89
Offset: 1

Views

Author

Clark Kimberling, Apr 08 2015

Keywords

Comments

This sequence plays a role in the definition of minimal alternating Fibonacci representations, introduced at A256655.
Essentially the same as A246104. - R. J. Mathar, Apr 14 2015

Crossrefs

Programs

  • Mathematica
    h[0] = {1}; h[n_] := Join[h[n - 1], Table[Fibonacci[n + 2], {k, 1, Fibonacci[n]}]]; h[10]

Formula

Concatenate these numbers: F(2), F(3), F(4), then F(3) F(5)'s, then F(4) F(6)'s, then F(5) F(7)'s, ... F(n+2) F(n)'s, ..., where F = A000045, the Fibonacci numbers.
Sum_{n>=1} 1/a(n)^2 = 1 + Sum_{n>=1} F(n)/F(n+2)^2 = 1.5651369873... . - Amiram Eldar, Aug 16 2022

A375428 The maximum exponent in the unique factorization of n in terms of distinct terms of A115975 using the Zeckendorf representation of the exponents in the prime factorization of n; a(1) = 0.

Original entry on oeis.org

0, 1, 1, 2, 1, 1, 1, 3, 2, 1, 1, 2, 1, 1, 1, 3, 1, 2, 1, 2, 1, 1, 1, 3, 2, 1, 3, 2, 1, 1, 1, 5, 1, 1, 1, 2, 1, 1, 1, 3, 1, 1, 1, 2, 2, 1, 1, 3, 2, 2, 1, 2, 1, 3, 1, 3, 1, 1, 1, 2, 1, 1, 2, 5, 1, 1, 1, 2, 1, 1, 1, 3, 1, 1, 2, 2, 1, 1, 1, 3, 3, 1, 1, 2, 1, 1, 1, 3, 1, 2, 1, 2, 1, 1, 1, 5, 1, 2, 2, 2, 1, 1, 1, 3, 1
Offset: 1

Views

Author

Amiram Eldar, Aug 15 2024

Keywords

Comments

Differs from A095691 and A365552 at n = 1, 32, 36, 64, 72, 96, 100, ... . Differs from A368105 at n = 1, 36, 72, 100, 108, ... .
When the exponents in the prime factorization of n are expanded as sums of distinct Fibonacci numbers using the Zeckendorf representation (A014417), we get a unique factorization of n in terms of distinct terms of A115975, i.e., n is represented as a product of prime powers (A246655) whose exponents are Fibonacci numbers. a(n) is the maximum exponent of these prime powers. Thus all the terms are Fibonacci numbers.

Examples

			For n = 16 = 2^4, the Zeckendorf representation of 4 is 101, i.e., 4 = Fibonacci(2) + Fibonacci(4) = 1 + 3. Therefore 16 = 2^(1+3) = 2^1 * 2^3, and a(16) = 3.
		

Crossrefs

Programs

  • Mathematica
    A087172[n_] := Module[{k = 2}, While[Fibonacci[k] <= n, k++]; Fibonacci[k-1]]; a[n_] := A087172[Max[FactorInteger[n][[;;, 2]]]]; a[1] = 0; Array[a, 100]
  • PARI
    A087172(n) = {my(k = 2); while(fibonacci(k) <= n, k++); fibonacci(k-1);}
    a(n) = if(n == 1, 0, A087172(vecmax(factor(n)[,2])));

Formula

a(n) = A087172(A051903(n)) for n >= 2.
a(n) = A000045(A375429(n)).
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = 2 - 1/zeta(2) + Sum_{k>=4} Fibonacci(k) * (1 - 1/zeta(Fibonacci(k))) = 1.64419054900327345836... .

A273156 Product of all parts in Zeckendorf representation of n.

Original entry on oeis.org

0, 1, 2, 3, 3, 5, 5, 10, 8, 8, 16, 24, 24, 13, 13, 26, 39, 39, 65, 65, 130, 21, 21, 42, 63, 63, 105, 105, 210, 168, 168, 336, 504, 504, 34, 34, 68, 102, 102, 170, 170, 340, 272, 272, 544, 816, 816, 442, 442, 884, 1326, 1326, 2210, 2210, 4420, 55, 55, 110, 165
Offset: 0

Views

Author

Peter Kagey, May 16 2016

Keywords

Examples

			a(33) = 21*8*3*1 because 33 = 21+8+3+1.
		

Crossrefs

Programs

  • Haskell
    a273156 = product . a035516_row
  • Maple
    A273156 := proc(n)
        local nred,a,f ;
        if n = 0 then
            0;
        else
            nred := n ;
            a := 1 ;
            while nred > 1 do
                f := A087172(nred) ;
                a := a*f ;
                nred := nred-f ;
            end do:
            a ;
        end if;
    end proc: # R. J. Mathar, May 17 2016
  • Mathematica
    t = Fibonacci /@ Range@ 21; {0}~Join~Table[Times @@ If[MemberQ[t, n], {n}, Most@ MapAt[# + 1 &, Abs@ Differences@ FixedPointList[# - First@ Reverse@ TakeWhile[t, Function[k, # >= k]] &, n], -1]], {n, 58}] (* Michael De Vlieger, May 17 2016 *)
    a[0]=0; a[n_]:=Block[{m=n, p=1, f, k=0}, While[Fibonacci@ ++k <= n]; While[ m>1, f= Fibonacci@ --k; If[ f<=m, m-=f; p*=f]]; p]; Array[a, 80, 0] (* Giovanni Resta, May 17 2016 *)

A107017 Second largest term in Zeckendorf representation of n, a(n)=0 if n itself is a Fibonacci number.

Original entry on oeis.org

0, 0, 0, 1, 0, 1, 2, 0, 1, 2, 3, 3, 0, 1, 2, 3, 3, 5, 5, 5, 0, 1, 2, 3, 3, 5, 5, 5, 8, 8, 8, 8, 8, 0, 1, 2, 3, 3, 5, 5, 5, 8, 8, 8, 8, 8, 13, 13, 13, 13, 13, 13, 13, 13, 0, 1, 2, 3, 3, 5, 5, 5, 8, 8, 8, 8, 8, 13, 13, 13, 13, 13, 13, 13, 13, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 0, 1, 2
Offset: 1

Views

Author

Reinhard Zumkeller, May 09 2005

Keywords

Comments

a(A000045(n)) = 0;
a(A000045(n) + k) = A087172(k) with 0 < k < A000045(n-1).

Examples

			n = 20 = 13+5+2: a(20) = 5.
		

Crossrefs

Cf. A007895.

A352717 Greatest Lucas number that does not exceed n.

Original entry on oeis.org

1, 1, 3, 4, 4, 4, 7, 7, 7, 7, 11, 11, 11, 11, 11, 11, 11, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47
Offset: 1

Views

Author

Clark Kimberling, Apr 01 2022

Keywords

Examples

			The Lucas numbers, beginning with 1, are 1, 3, 4, 7, 11, 18, ..., so that a(5) = 4.
		

Crossrefs

Programs

  • Mathematica
    Flatten[Map[ConstantArray[LucasL[#], LucasL[# - 1]] &, Range[15]]] (* Peter J. C. Moses, Apr 30 2022 *)
  • Python
    from itertools import islice
    def A352717_gen(): # generator of terms
        a, b = 1, 3
        while True:
            yield from (a,)*(b-a)
            a, b = b, a+b
    A352717_list = list(islice(A352717_gen(),40)) # Chai Wah Wu, Jun 08 2022

A333907 For n >= 1, a(n) = Sum_{k=1..n} prevfib(k) + nextfib(k) - 2*k, where prevfib(k) is the largest Fibonacci number < k, nextfib(k) is the smallest Fibonacci number > k.

Original entry on oeis.org

0, 0, 1, 1, 2, 3, 2, 4, 7, 8, 7, 4, 7, 13, 17, 19, 19, 17, 13, 7, 12, 23, 32, 39, 44, 47, 48, 47, 44, 39, 32, 23, 12, 20, 39, 56, 71, 84, 95, 104, 111, 116, 119, 120, 119, 116, 111, 104, 95, 84, 71, 56, 39, 20, 33, 65, 95, 123, 149, 173, 195, 215, 233, 249, 263, 275
Offset: 1

Views

Author

Ctibor O. Zizka, Apr 09 2020

Keywords

Examples

			a(1) = (0 + 2 - 2*1) = 0;
a(2) = (0 + 2 - 2*1) + (1 + 3 - 2*2) = 0;
a(3) = (0 + 2 - 2*1) + (1 + 3 - 2*2) + (2 + 5 - 2*3) = 1;
a(4) = (0 + 2 - 2*1) + (1 + 3 - 2*2) + (2 + 5 - 2*3) + (3 + 5 - 2*4) = 1.
		

Crossrefs

Programs

  • PARI
    isfib(k) = my(m=5*k^2); issquare(m-4) || issquare(m+4);
    nextfib(n) = my(k=n+1); while (!isfib(k), k++); k;
    prevfib(n) = my(k=n-1); while (!isfib(k), k--); k;
    a(n) = sum(k=1, n, prevfib(k) + nextfib(k) - 2*k); \\ Michel Marcus, Apr 10 2020

A351628 Partial sums of A352717.

Original entry on oeis.org

1, 2, 5, 9, 13, 17, 24, 31, 38, 45, 56, 67, 78, 89, 100, 111, 122, 140, 158, 176, 194, 212, 230, 248, 266, 284, 302, 320, 349, 378, 407, 436, 465, 494, 523, 552, 581, 610, 639, 668, 697, 726, 755, 784, 813, 842, 889, 936, 983, 1030, 1077, 1124, 1171, 1218
Offset: 1

Views

Author

Clark Kimberling, May 04 2022

Keywords

Crossrefs

Programs

  • Mathematica
    Accumulate[Flatten[Map[ConstantArray[LucasL[#],LucasL[#-1]]&,Range[15]]]] (* Peter J. C. Moses, May 02 2022 *)
  • Python
    from itertools import islice
    def A351628_gen(): # generator of terms
        a, b, c = 1, 3, 0
        while True:
            yield from (c+i*a for i in range(1,b-a+1))
            a, b, c = b, a+b, c + a*(b-a)
    A351628_list = list(islice(A351628_gen(),40)) # Chai Wah Wu, Jun 09 2022
Showing 1-10 of 10 results.