%I #19 Jul 17 2020 17:06:22
%S 2,5,11,19,23,47,67,79,191,271,383,1087,1279,4111,5119,6143,16447,
%T 20479,81919,262147,263167,786431,1114111,1310719,16842751,17825791,
%U 1073758207,4295032831,4311744511,17180131327,21474836479,51539607551,824633720831,1168231104511
%N Primes of the form q*2^h - 1, where q is a Fermat prime.
%F For all n >= 1, A335885(a(n)) <= 2.
%t NestList[NestWhile[NextPrime, #, ! (PrimeQ[#2] && With[{p = NestWhile[BitShiftRight, #2 + 1, EvenQ] - 1}, BitAnd[p, p - 1] == 0 && With[{b = BitLength[p]}, BitAnd[b - 1, b - 2] == 0]]) &, 2] &, 2, 25] (* _Jan Mangaldan_, Jul 14 2020 *)
%o (PARI)
%o A000265(n) = (n>>valuation(n,2));
%o isA019434(n) = ((n>2)&&isprime(n)&&!bitand(n-2,n-1));
%o isA336116(n) = (isprime(n)&&isA019434(A000265(1+n)));
%Y Cf. A000265, A019434, A334092, A335874, A335885, A336117.
%K nonn
%O 1,1
%A _Antti Karttunen_, Jul 09 2020
%E More terms from _Jinyuan Wang_, Jul 11 2020