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

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
Showing 1-1 of 1 results.