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

A138182 Smallest summand in the Zeckendorf representation of the n-th prime.

Original entry on oeis.org

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

Views

Author

Colm Mulcahy, Mar 04 2008

Keywords

Examples

			a(5) = 3 because the Zeckendorf representation of the 5th prime is 11 = 3 + 8.
		

Crossrefs

Programs

  • Python
    from sympy import prime
    def A138182(n):
        m, tlist = prime(n), [1,2]
        while tlist[-1]+tlist[-2] <= m:
            tlist.append(tlist[-1]+tlist[-2])
        for d in tlist[::-1]:
            if d == m:
                return d
            elif d < m:
                m -= d # Chai Wah Wu, Jun 14 2018

Formula

a(n) = A139764(A000040(n)). [From R. J. Mathar, Oct 23 2010]

Extensions

a(8) replaced by 1. Sequence extended beyond a(18) - R. J. Mathar, Oct 23 2010

A138184 Largest prime not exceeding Fibonacci(n) = A000045(n).

Original entry on oeis.org

2, 3, 5, 7, 13, 19, 31, 53, 89, 139, 233, 373, 607, 983, 1597, 2579, 4177, 6763, 10939, 17707, 28657, 46351, 75017, 121379, 196387, 317797, 514229, 832003, 1346249, 2178283, 3524569, 5702867, 9227443, 14930341, 24157811, 39088157, 63245971
Offset: 3

Views

Author

Colm Mulcahy, Mar 04 2008

Keywords

Examples

			a(8) = 19 because 19 is the largest prime not exceeding 21 = A000045(8).
		

Crossrefs

Programs

  • Maple
    A138184 := proc(n) prevprime(combinat[fibonacci](n)+1) ; end: seq(A138184(n),n=3..45) ; # R. J. Mathar, Apr 22 2008
  • Mathematica
    PrimePrev[n_]:=Module[{k=n},While[ !PrimeQ[k],k-- ];k];f[n_]:=Fibonacci[n];lst={};Do[AppendTo[lst,PrimePrev[f[n]]],{n,5!}];lst (* Vladimir Joseph Stephan Orlovsky, Feb 26 2010 *)

Formula

a(n) = A000040(A054782(n)). - R. J. Mathar, Apr 22 2008

Extensions

Edited and extended by R. J. Mathar, Apr 22 2008
Offset changed from 4 to 3 by Harry J. Smith, Jan 02 2009

A138181 Largest Fibonacci number not exceeding the n-th prime.

Original entry on oeis.org

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

Views

Author

Colm Mulcahy, Mar 04 2008

Keywords

Comments

a(n) = largest summand in the Zeckendorf representation of the n-th prime

Examples

			a(4)=5 because 5 is the largest Fibonacci number not exceeding 7 (the 4th prime)
		

Crossrefs

Programs

  • Mathematica
    With[{rf=Reverse[Fibonacci[Range[20]]]},Flatten[Table[Select[rf,#<=Prime[ n]&,1],{n,60}]]] (* Harvey P. Dale, May 25 2013 *)

Extensions

Corrected by Harvey P. Dale, May 25 2013
Showing 1-3 of 3 results.