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 A238797 #41 Oct 19 2014 15:02:21 %S A238797 0,3,4,0,0,0,0,5,6,5,7,6,9,5,0,7,6,6,0,0,10,0,6,0,7,9,6,7,8,0,17,8,0, %T A238797 0,7,0,0,18,0,0,0,8,0,10,8,9,18,0,0,7,0,0,8,12,0,7,0,11,16,0,21,0,0,0, %U A238797 8,14,0,0,18,9,10,8,77,0,0,0,12,8,0,11,18,0 %N A238797 Smallest k such that 2^k - (2*n+1) and (2*n+1)*2^k - 1 are both prime, k <= 2*n+1, or 0 if no such k exists. %C A238797 Numbers n such that 2^k - (2*n+1) and (2*n+1)*2^k - 1 are both prime: %C A238797 For k = 0: 2, 3, 5, 7, 13, 17, ... Intersection of A000043 and A000043 %C A238797 for k = 1: 3, 4, 6, 94, ... Intersection of A050414 and A002235 %C A238797 for k = 2: 4, 8, 10, 12, 18, 32, ... Intersection of A059608 and A001770 %C A238797 for k = 3: Intersection of A059609 and A001771 %C A238797 for k = 4: 21, ... Intersection of A059610 and A002236 %C A238797 for k = 5: Intersection of A096817 and A001772 %C A238797 for k = 6: Intersection of A096818 and A001773 %C A238797 for k = 7: 5, 10, 14, ... Intersection of A059612 and A002237 %C A238797 for k = 8: 6, 16, 20, 36, ... Intersection of A059611 and A001774 %C A238797 for k = 9: 5, 21, ... Intersection of A096819 and A001775 %C A238797 for k = 10: 7, 13, ... Intersection of A096820 and A002238 %C A238797 for k = 11: 6, 8, 12, ... %C A238797 for k = 12: 9, ... %C A238797 for k = 13: 5, 8, 10, ... %H A238797 Giovanni Resta, <a href="/A238797/b238797.txt">Table of n, a(n) for n = 0..1000</a> %e A238797 a(1) = 3 because 2^3 - (2*1+1) = 5 and (2*1+1)*2^3 - 1 = 23 are both prime, 3 = 2*1+1, %e A238797 a(2) = 4 because 2^4 - (2*2+1) = 11 and (2*2+1)*2^4 - 1 = 79 are both prime, 4 < 2*2+1 = 5. %t A238797 a[n_] := Catch@ Block[{k = 1}, While[k <= 2*n+1, If[2^k - (2*n + 1) > 0 && PrimeQ[2^k - (2*n+1)] && PrimeQ[(2*n + 1)*2^k-1], Throw@k]; k++]; 0]; a/@ Range[0, 80] (* _Giovanni Resta_, Mar 15 2014 *) %Y A238797 Cf. A238748, A238904 (smallest k such that 2^k + (2n+1) and (2n+1)*2^k + 1 are both prime, k <= n, or -1 if no such k exists). %K A238797 nonn %O A238797 0,2 %A A238797 _Ilya Lopatin_ and _Juri-Stepan Gerasimov_, Mar 05 2014 %E A238797 a(0), a(19), a(20) corrected by _Giovanni Resta_, Mar 13 2014