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.

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

A138183 Smallest Fibonacci number not less than the n-th prime.

Original entry on oeis.org

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

Views

Author

Colm Mulcahy, Mar 04 2008

Keywords

Examples

			a(4) = 8 because the 8 is the smallest Fibonacci number not less than 7 (the 4th prime).
		

Crossrefs

Programs

  • Mathematica
    With[{fibs=Fibonacci[Range[20]]},Table[SelectFirst[fibs,#>=n&],{n,Prime[ Range[60]]}]] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Apr 22 2018 *)
  • PARI
    a(n) = {p = prime(n); i = 0; until ((f = fibonacci(i)) >= p, i++); f;} \\ Michel Marcus, Aug 31 2013

A375751 a(n) is the difference between F=A000045(n) and the largest prime not exceeding F.

Original entry on oeis.org

0, 0, 0, 1, 0, 2, 3, 2, 0, 5, 0, 4, 3, 4, 0, 5, 4, 2, 7, 4, 0, 17, 8, 14, 31, 14, 0, 37, 20, 26, 9, 20, 22, 11, 6, 12, 15, 32, 18, 17, 0, 16, 43, 24, 0, 17, 20, 26, 27, 20, 6, 9, 12, 34, 29, 36, 30, 47, 48, 4, 45, 32, 54, 27, 132, 22, 31, 4, 32, 11, 12, 60, 7, 76
Offset: 3

Views

Author

Hugo Pfoertner, Aug 27 2024

Keywords

Crossrefs

Programs

  • Maple
    a:= n-> (F-> F-prevprime(F+1))(combinat[fibonacci](n)):
    seq(a(n), n=3..76);  # Alois P. Heinz, Aug 27 2024
  • Mathematica
    a[n_]:=Module[{p=2},While[(f=Fibonacci[n])>=p, pold=p;p=NextPrime[p]]; d=f-pold;If[d>0,f-pold,d=0]; d]; Array[a,74,3] (* Stefano Spezia, Aug 27 2024 *)
    Map[(# - NextPrime[# + 1, -1]) &, Fibonacci[Range[3, 76]]] (* Amiram Eldar, Aug 29 2024 *)
  • PARI
    a(n) = my(F=fibonacci(n)); F-precprime(F)
    
  • Python
    from sympy import prevprime, fibonacci
    def A375753(n): return (F:=fibonacci(n)) - prevprime(F+1) # Karl-Heinz Hofmann, Aug 27 2024

Formula

a(n) = A000045(n) - A138184(n).
a(n) = 0 <=> n in { A001605 }. - Alois P. Heinz, Aug 27 2024

A218557 Smallest prime >= n-th Lucas number.

Original entry on oeis.org

2, 2, 3, 5, 7, 11, 19, 29, 47, 79, 127, 199, 331, 521, 853, 1367, 2207, 3571, 5779, 9349, 15131, 24481, 39607, 64081, 103687, 167771, 271451, 439217, 710663, 1149857, 1860503, 3010349, 4870861, 7881221, 12752053, 20633279, 33385291, 54018521, 87403831
Offset: 0

Views

Author

Michel Lagneau, Nov 02 2012

Keywords

Examples

			a(6) = 19 because 19 is the smallest prime not less than 18 (the 6th Lucas number).
		

Crossrefs

Programs

  • Mathematica
    NextPrime/@(LucasL[Range[0,50]]-1)
Showing 1-4 of 4 results.