f[b_?EvenQ]:=f[b]=块[{k=0},而[!素数Q[b^(2^k)+1],k++];k] ;
lst={38, 50, 62, 68, 86, 92, 98, 104, 122, 144, 168, 182, 186, 200, 202, 212, 214, 218, 244, 246, 252, 258, 286, 294, 298, 302, 304, 308, 322, 324, 338, 344, 354, 356, 362, 368, 380, 390, 394, 398, 402, 404, 410, 416, 422, 424, 446, 450, 454, 458, 468, 480, 482, 484, 500, 514, 518, 524, 528, 530, 534, 538, 552, 558, 564, 572, 574, 578, 580, 590, 602, 604, 608, 620, 622, 626, 632, 638, 648, 650, 662, 666, 668, 670, 678, 684, 692, 694, 698, 706, 712, 720, 722, 724, 734, 744, 746, 752, 754, 762, 766, 770, 792, 794, 802, 806, 812, 814, 818, 836, 840, 842, 844, 848, 854, 868, 870, 872, 878, 888, 896, 902, 904, 908, 922, 924, 926, 932, 938, 942, 944, 948, 954, 958, 964, 968, 974, 978, 980, 988, 994, 998}; (f[#]=-1)&/@lst;
lst={8,32,64,128,216,512,1000};(f[#]=-2)&/@lst;表[f[b],{b,2,1000,2}]
(*第二个节目:*)
模[{r=83,nn=12,s={},k},Do[If[b>r,Break[],Do[Cf[Set[k,b^m/2]>r,Broke[],AppendTo[s,k]],{m,3,Infinity,2}]];表[If[MemberQ[s,n],-2,SelectFirst[Range[0,nn],PrimeQ[(2 n)^(2^#)+1]&]/。x_/;错过Q@x->-1],{n,r}]](*迈克尔·德弗利格,2017年7月4日,10.2版*)