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.

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.

Original entry on oeis.org

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
Offset: 1

Views

Author

Pontus von Brömssen, Jun 09 2023

Keywords

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.

Examples

			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.
		

Crossrefs

Cf. A000045, A034693, A124067, A361902, A362376, A363534 (records), A363535 (indices of records), A363536 (first occurrences).

Programs

  • Mathematica
    Array[(k = 1; While[! PrimeQ[# Fibonacci[k] + 1], k++]; k) &, 85] (* Michael De Vlieger, Jun 10 2023 *)
  • PARI
    a(n) = my(k=1); while(!isprime(n*fibonacci(k)+1), k++); k; \\ Michel Marcus, Jun 10 2023
  • 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))
    

Formula

a(n) = 1 if and only if n+1 is prime.

A124081 Primes of the form 2*F(k) + 1.

Original entry on oeis.org

3, 5, 7, 11, 17, 43, 179, 467, 8363, 21893, 35423, 92737, 392837, 204668311, 1402817467, 40730022149, 8105479075763, 15080227609492692859, 100190602496116782278655832523, 26361745652748197675264382970030251614748343
Offset: 1

Views

Author

Giovanni Teofilatto, Dec 12 2006

Keywords

Crossrefs

Programs

Formula

a(n) = 2*A000045(A124067(n+1)) + 1. - Amiram Eldar, Sep 19 2022

A228145 Numbers k such that 2*Fibonacci(k) - 1 is prime.

Original entry on oeis.org

3, 4, 8, 9, 10, 16, 18, 31, 34, 39, 41, 42, 55, 68, 79, 90, 95, 97, 114, 122, 148, 151, 160, 209, 265, 320, 329, 441, 457, 516, 529, 632, 640, 682, 712, 791, 1056, 1169, 1632, 1943, 2200, 2279, 2468, 2698, 2921, 2996, 3129, 3140, 3656, 3960, 4889, 5560, 5895
Offset: 1

Views

Author

Vincenzo Librandi, Aug 13 2013

Keywords

Crossrefs

Programs

  • Magma
    [n: n in [1..1700] | IsPrime(2*Fibonacci(n)-1)];
    
  • Mathematica
    Select[Range[2000], PrimeQ[2 Fibonacci[#] - 1]&]
  • PARI
    is(n)=ispseudoprime(2*fibonacci(n)-1) \\ Charles R Greathouse IV, Jun 13 2017
Showing 1-3 of 3 results.