%I #20 May 15 2024 22:30:34
%S 2,13,17,97,193,241,257,641,673,769,2689,5953,8929,12289,40961,49921,
%T 61681,65537,101377,114689,274177,286721,319489,414721,417793,550801,
%U 786433,974849,1130641,1376257,1489153,1810433,2424833,3602561,6700417
%N Anti-elite primes: a prime number p is called anti-elite if only a finite number of Fermat numbers 2^(2^n)+1 are quadratic non-residues mod p.
%C There are infinitely many anti-elite primes.
%D Alexander Aigner; Über Primzahlen, nach denen (fast) alle Fermatzahlen quadratische Nichtreste sind. Monatsh. Math. 101 (1986), pp. 85-93
%H Dennis Martin, <a href="/A128852/b128852.txt">Table of n, a(n) for n = 1..101</a>
%H M. Krizek, F. Luca, I. E. Shparlinski, L. Somer, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL14/Krizek/krizek2.html">On the complexity of testing elite primes</a>, J. Int. Seq. 14 (2011) # 11.1.2
%H Dennis Martin, <a href="http://www.primenace.com/papers/math/Anti-ElitePrimes.htm">Anti-Elite Prime Search</a>
%H Dennis Martin, <a href="/A128852/a128852.html">Anti-Elite Prime Search</a> [Cached copy, with permission of author]
%H Tom Müller, <a href="http://www.cs.uwaterloo.ca/journals/JIS/VOL10/Mueller/mueller56.html">On Anti-Elite Prime Numbers</a>, J. Integer Sequences, Vol. 10 (2007), Article 07.9.4.
%H Tom Müller, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL13/Mueller/mueller6.html">On the Fermat Periods of Natural Numbers</a>, J. Int. Seq. 13 (2010) # 10.9.5.
%H Tom Müller, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL20/Mueller/mueller10.html">On the Exponents of Non-Trivial Divisors of Odd Numbers and a Generalization of Proth's Primality Theorem</a>, Journal of Integer Sequences, Vol. 20 (2017), Article 17.2.7.
%e Let F_r:=2^(2^r)+1 = r-th Fermat number. Then a(2)=13 because for all r>1 we have F_r == 4 (mod 13) if r is even, resp. F_r == 10 (mod 13) if r is odd. Notice that 4 and 10 are quadratic residues modulo 13.
%o (PARI) isAntiElite(n) = if(isprime(n) && n > 2, my(d = znorder(Mod(2,n)), StartPoint = valuation(d,2), LengthTest = znorder(Mod(2, d >> StartPoint))); for(i = StartPoint, StartPoint + LengthTest - 1, if(!issquare(Mod(2,n)^2^i + 1), return(0))); 1, n == 2) \\ _Jianing Song_, May 15 2024
%Y Cf. A102742.
%Y Contains all Fermat prime factors of Fermat numbers (A023394) that are greater than 5.
%K nonn
%O 1,1
%A _Tom Mueller_, Apr 16 2007