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.
%I A347904 #9 Sep 20 2021 11:49:30 %S A347904 2,3,3,7,0,5,5,5,5,5,11,0,0,0,7,7,7,7,7,7,7,23,0,13,0,11,0,17,17,41,0, %T A347904 23,13,0,11,19,19,0,17,0,0,0,13,0,11,11,11,11,11,11,11,11,11,11,11,23, %U A347904 0,0,0,19,0,17,0,0,0,13,13,13,13,13,13,13,13,13,13,13,13,13 %N A347904 Array read by antidiagonals, m, n >= 1: T(m,n) is the first prime (after the two initial terms) in the Fibonacci-like sequence with initial terms m and n, or 0 if no such prime exists. %C A347904 There are cases where T(m,n) = 0 even when m and n are coprime; see A082411, A083104, A083105, A083216, and A221286. The smallest (in the sense that m+n is as small as possible) known case where this occurs appears to be m = 106276436867, n = 35256392432 (Vsemirnov's sequence, A221286). %F A347904 T(m,n) = 0 if m and n have a common factor. %F A347904 T(m,n) = T(n,m+n) if m+n is not prime, otherwise T(m,n) = m+n. %e A347904 Array begins: %e A347904 m\n| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 %e A347904 ---+--------------------------------------------------- %e A347904 1 | 2 3 7 5 11 7 23 17 19 11 23 13 41 29 31 17 %e A347904 2 | 3 0 5 0 7 0 41 0 11 0 13 0 43 0 17 0 %e A347904 3 | 5 5 0 7 13 0 17 11 0 13 103 0 29 17 0 19 %e A347904 4 | 5 0 7 0 23 0 11 0 13 0 41 0 17 0 19 0 %e A347904 5 | 7 7 11 13 0 11 19 13 23 0 43 17 31 19 0 37 %e A347904 6 | 7 0 0 0 11 0 13 0 0 0 17 0 19 0 0 0 %e A347904 7 | 17 11 13 11 17 13 0 23 41 17 29 19 53 0 37 23 %e A347904 8 | 19 0 11 0 13 0 37 0 17 0 19 0 89 0 23 0 %e A347904 9 | 11 11 0 13 19 0 23 17 0 19 31 0 149 23 0 41 %e A347904 10 | 11 0 13 0 0 0 17 0 19 0 53 0 23 0 0 0 %e A347904 11 | 13 13 17 19 37 17 43 19 29 31 0 23 37 103 41 43 %e A347904 12 | 13 0 0 0 17 0 19 0 0 0 23 0 101 0 0 0 %e A347904 13 | 29 17 19 17 23 19 47 29 31 23 59 37 0 41 43 29 %e A347904 14 | 31 0 17 0 19 0 0 0 23 0 61 0 67 0 29 0 %e A347904 15 | 17 17 0 19 0 0 29 23 0 0 37 0 41 29 0 31 %e A347904 16 | 17 0 19 0 47 0 23 0 59 0 103 0 29 0 31 0 %e A347904 T(2,7) = 41, because the first prime in A022113, excluding the two initial terms, is 41. %o A347904 (Python) %o A347904 # Note that in the (rare) case when m and n are coprime but there are no primes in the Fibonacci-like sequence, this function will go into an infinite loop. %o A347904 from sympy import isprime,gcd %o A347904 def A347904(m,n): %o A347904 if gcd(m,n) != 1: %o A347904 return 0 %o A347904 m,n = n,m+n %o A347904 while not isprime(n): %o A347904 m,n = n,m+n %o A347904 return n %Y A347904 Cf. A022113, A082411, A083104, A083105, A083216, A221286, A347905. %K A347904 nonn,tabl %O A347904 1,1 %A A347904 _Pontus von Brömssen_, Sep 18 2021