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 A332416 #29 May 09 2020 19:13:41 %S A332416 1,3,4,5,6,7,8,11,12,13,14,15,16,17,19,20,21,22,23,24,25,26,28,29,31, %T A332416 32,33,34,35,36,37,38,39,40,41,42,44,46,47,48,50,51,52,53,54,55,56,57, %U A332416 58,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,78,79 %N A332416 Positive integers r such that B(1,r) = B(2,r - 1) = ... = B(r,1) = 0, where B denotes the function mapping every pair of positive integers (m,n) into 1 if m * 2^(n + 2) + 1 is a prime number dividing F(n), where F(n) denotes the n-th Fermat number (i.e., F(n) = A000215(n)); and into 0 otherwise. %C A332416 Note that A332414 is a subsequence of this sequence. %C A332416 Prime q = m*2^(n + 2) + 1 does not divide ((F(n + 2) - 1)^m - 1)/F(n) if and only if q divides F(n). Direct implication is Theorem 2.24 of my article (see the links). Proof of the reciprocal implication (by Wang): A001146(n) = 2^(2^n) == - 1 (mod q), so ((F(n + 2) - 1)^m - 1)/F(n) = Sum_{i = 0..4*m-1} (-1)^(i+1)*(2^(2^n))^i == -4*m (mod q). %H A332416 Lorenzo Sauras Altuzarra, <a href="https://arxiv.org/abs/2002.03075">Some arithmetical problems that are obtained by analyzing proofs and infinite graphs</a>, arXiv:2002.03075 [math.NT], 2020. %e A332416 3 is a term of this sequence, because B(1,3) = B(2,2) = B(3,1) = 0. %p A332416 A332416:=proc(n) %p A332416 local c, i, k, q, r, v: %p A332416 c:=0: %p A332416 i:=0: %p A332416 r:=1: %p A332416 while c < n do %p A332416 for k from 0 to r-1 do %p A332416 q:=(k+1)*2^(r-k+2)+1: %p A332416 if not isprime(q) or (2^(2^(r-k)) + 1) mod q != 0 then %p A332416 i:=i+1: %p A332416 fi: %p A332416 od: %p A332416 if i = r then %p A332416 v:=r: %p A332416 c:=c+1: %p A332416 fi: %p A332416 i:=0: %p A332416 r:=r+1: %p A332416 od: %p A332416 return v: %p A332416 end proc: %t A332416 Select[Range@ 29, NoneTrue[Transpose@ {#, Reverse@ #} &@ Range@ #, And[PrimeQ[#4], Mod[((#3 - 1)^#1 - 1)/(2^(2^#2) + 1), #4] != 0] & @@ {#1, #2, 2^(2^(#2 + 2)) + 1, #1*2^(#2 + 2) + 1} & @@ # &] &] (* _Michael De Vlieger_, Feb 14 2020 *) %o A332416 (PARI) isB(m, t) = ispseudoprime(q=4*m*2^t+1) && Mod(2, q)^(2^t)==-1; %o A332416 isok(r) = sum(i=1, r, isB(i, r-i+1)) == 0; \\ _Jinyuan Wang_, Feb 18 2020 %Y A332416 Cf. A000215 (Fermat numbers), A001146, A332414. %K A332416 nonn %O A332416 1,2 %A A332416 _Lorenzo Sauras Altuzarra_, Feb 12 2020 %E A332416 a(25)-a(68) from _Jinyuan Wang_, Feb 18 2020