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.

A361509 a(n) = smallest Fibonacci number F(k) such that F(k) + F(n) is a prime, or -1 if no such F(k) exists.

This page as a plain text file.
%I A361509 #36 Apr 06 2023 03:15:08
%S A361509 2,1,1,0,0,0,3,0,2,3,34,0,5,0,2,3,34,0,987,46368,2584,3,2,0,13,144
%N A361509 a(n) = smallest Fibonacci number F(k) such that F(k) + F(n) is a prime, or -1 if no such F(k) exists.
%C A361509 a(26) is currently unknown.
%C A361509 a(26) > 10^7000 if it is not -1. - _Robert Israel_, Apr 03 2023
%F A361509 a(n) = A000045(A361902(A000045(n))) (unless A361902(A000045(n)) = -1). - _Pontus von Brömssen_, Mar 30 2023
%p A361509 with(combinat):
%p A361509 a:=[]; b:=[]; for n from 0 to 25 do
%p A361509 k:=0; t1:=fibonacci(n);
%p A361509 while not isprime( fibonacci(k)+t1) do k:=k+1; od:
%p A361509 a:=[op(a),fibonacci(k)]; b:=[op(b),k];
%p A361509 od:
%p A361509 a; # A361509
%p A361509 b; # A361510
%t A361509 a[n_] := Module[{fn = Fibonacci[n], k = 0}, While[! PrimeQ[fn + Fibonacci[k]], k++]; Fibonacci[k]]; Array[a, 26, 0] (* _Amiram Eldar_, Mar 30 2023 *)
%o A361509 (PARI) a(n) = my(k=0, fn=fibonacci(n)); while (!isprime(fn+fibonacci(k)), k++); fibonacci(k); \\ _Michel Marcus_, Mar 30 2023
%Y A361509 Cf. A000045, A361510, A361902.
%K A361509 nonn,more,less
%O A361509 0,1
%A A361509 _Jack Braxton_, Mar 26 2023
%E A361509 Edited by _N. J. A. Sloane_, Mar 30 2023