[go: up one dir, main page]

login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A322005 Least prime p such that n + p is a Fibonacci number (A000045). 2
2, 2, 3, 2, 17, 3, 2, 137, 5, 601, 3, 2, 43, 131, 7, 19, 5, 17, 3, 2, 967, 13, 67, 11, 31, 927372692193078999151, 29, 7, 61, 5, 59, 3, 2, 577, 199, 109, 19, 107, 17, 571, 193, 103, 13, 101, 11, 2539, 43, 97, 7, 14930303, 5, 27777890035237, 3, 2, 179, 89, 6709, 10889, 31, 46309, 29, 83, 6703, 547, 313, 79, 23, 46301, 919, 541, 19, 73, 17 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,1
COMMENTS
See A322004 for the indices of the corresponding Fibonacci numbers, and further information.
LINKS
EXAMPLE
a(0) = 2 is the smallest prime p such that p + 0 (= 2) is a Fibonacci number.
a(1) = 2 is the smallest prime p such that p + 1 (= 3) is a Fibonacci number.
a(2) = 3 is the smallest prime p such that p + 2 (= 5) is a Fibonacci number.
MAPLE
f:= proc(n) local p, k, a, b, c;
a:= -n:b:= 1-n:
do
c:= b;
b:= a+b+n;
a:= c;
if isprime(b) then return b fi
od
end proc:
map(f, [$0..80]); # Robert Israel, Dec 14 2018
MATHEMATICA
primeQ[n_] := n>0 && PrimeQ[n]; a[n_] := Module[{i=2}, While[!primeQ[Fibonacci[i] - n], i++]; Fibonacci[i] - n]; Array[a, 27, 0] (* Amiram Eldar, Dec 12 2018 *)
PROG
(PARI) a(n)=for(i=1, oo, ispseudoprime(fibonacci(i)-n)&&return(fibonacci(i)-n))
CROSSREFS
Sequence in context: A334513 A016009 A110088 * A064998 A329352 A300832
KEYWORD
nonn
AUTHOR
M. F. Hasler, Dec 12 2018
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 30 19:17 EDT 2024. Contains 375545 sequences. (Running on oeis4.)