%I #18 Apr 14 2022 15:01:34
%S 257,65537,2424833,26017793,63766529,825753601,1214251009,6487031809,
%T 2710954639361,2748779069441,6597069766657,25991531462657,
%U 76861124116481,151413703311361,1095981164658689,1238926361552897,1529992420282859521,2663848877152141313,3603109844542291969
%N Primes of the form x^2 + 64*y^2 that divide some Fermat number.
%C A prime p = k*2^j + 1 (with k odd) belongs to this sequence if and only if p is a factor of a Fermat number 2^(2^m) + 1 for some m <= j - 3.
%D Allan Cunningham, Haupt-exponents of 2, The Quarterly Journal of Pure and Applied Mathematics, Vol. 37 (1906), pp. 122-145.
%H Wilfrid Keller, <a href="http://www.prothsearch.com/fermat.html">Prime factors k.2^n + 1 of Fermat numbers F_m</a>.
%F A014754 INTERSECT A023394.
%e a(1) = 1^2 + 64*2^2 = 257 is a prime factor of 2^(2^3) + 1;
%e a(2) = 1^2 + 64*32^2 = 65537 is a prime factor of 2^(2^4) + 1;
%e a(3) = 127^2 + 64*194^2 = 2424833 is a prime factor of 2^(2^9) + 1;
%e a(4) = 2047^2 + 64*584^2 = 26017793 is a prime factor of 2^(2^12) + 1;
%e a(5) = 7295^2 + 64*406^2 = 63766529 is a prime factor of 2^(2^12) + 1;
%o (PARI) isok(p) = if(p%8==1 && isprime(p), my(d=Mod(2, p)); d^((p-1)/4)==1 && d^2^valuation(p-1, 2)==1, return(0));
%Y Cf. A014754, A023394, A228846.
%K nonn
%O 1,1
%A _Arkadiusz Wesolowski_, Apr 10 2022