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

 


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A363533 Least k such that n*F(k)+1 is prime, where F = A000045 is the Fibonacci sequence, or -1 if no such k exists. 5
1, 1, 3, 1, 3, 1, 9, 3, 3, 1, 3, 1, 9, 3, 3, 1, 6, 1, 9, 3, 3, 1, 3, 4, 18, 3, 9, 1, 3, 1, 15, 4, 3, 4, 3, 1, 9, 5, 3, 1, 3, 1, 48, 3, 9, 1, 24, 3, 9, 3, 3, 1, 3, 3, 9, 3, 6, 1, 24, 1, 36, 5, 3, 4, 3, 1, 12, 3, 3, 1, 6, 1, 12, 3, 3, 4, 6, 1, 9, 4, 3, 1, 3, 5
(list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
COMMENTS
2 does not appear because F(1) = F(2).
a(n) is divisible by 3 if n >= 3 is odd (unless a(n) = -1), because F(k) is odd (so n*F(k)+1 > 2 is even) when k is not divisible by 3.
LINKS
FORMULA
a(n) = 1 if and only if n+1 is prime.
EXAMPLE
For n = 17, the least k such that 17*F(k)+1 is prime is k = 6, with 17*F(6)+1 = 17*8+1 = 137, so a(17) = 6.
MATHEMATICA
Array[(k = 1; While[! PrimeQ[# Fibonacci[k] + 1], k++]; k) &, 85] (* Michael De Vlieger, Jun 10 2023 *)
PROG
(Python)
from sympy import isprime, fibonacci
from itertools import count
def A363533(n):
# Note: the function hangs if a(n) = -1.
return next(k for k in count(1) if isprime(n*fibonacci(k)+1))
(PARI) a(n) = my(k=1); while(!isprime(n*fibonacci(k)+1), k++); k; \\ Michel Marcus, Jun 10 2023
CROSSREFS
Cf. A000045, A034693, A124067, A361902, A362376, A363534 (records), A363535 (indices of records), A363536 (first occurrences).
Sequence in context: A072860 A068503 A073575 * A146431 A212183 A115716
KEYWORD
nonn
AUTHOR
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | 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 September 18 10:31 EDT 2024. Contains 375999 sequences. (Running on oeis4.)