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 A065428 #48 Jul 16 2021 13:15:18 %S A065428 1,2,3,4,5,8,12,15,16,24,28,40,48,56,60,72,88,112,120,168,232,240,280, %T A065428 312,408,520,760,840,1320,1848 %N A065428 Numbers k such that no x^2 mod k is prime. %C A065428 All numbers in this sequence except 56 are idoneal (A000926) - _Joerg Arndt_, Jul 13 2005 %C A065428 No more terms < 10^6. - _T. D. Noe_, Aug 10 2007 %C A065428 No more terms < 10^11. - _Charles R Greathouse IV_, Dec 15 2008 %C A065428 Numbers x such that all x^3 mod k are nonprimes are 1, 2, 7, 9, 63, and apparently no more. %H A065428 Joerg Arndt, <a href="http://www.jjj.de/fxt/#fxtbook">Matters Computational (The Fxtbook)</a>, p. 784 %t A065428 t={}; Do[s=Union[Mod[Range[n]^2,n]]; If[Select[s,PrimeQ]=={}, AppendTo[t,n]], {n,1000}]; t (* _T. D. Noe_, Aug 10 2007 *) %t A065428 nx2pQ[n_]:=Module[{m=PowerMod[Range[3n],2,n]},Count[ FindTransientRepeat[ m,2][[2]], _?PrimeQ]==0]; Select[Range[2000],nx2pQ] (* Requires Mathematica version 10 or later *) (* _Harvey P. Dale_, Jun 11 2019 *) %o A065428 (PARI) for(n=1, 10^9, q=1; for(x=1, n-1, if(isprime(lift(Mod(x,n)^2)), q=0; break())); if(q, print1(n, ", "))); \\ edited, _Joerg Arndt_, Jan 28 2015 %o A065428 (Haskell) %o A065428 a065428 n = a065428_list !! (n-1) %o A065428 a065428_list = filter f [1..] where %o A065428 f x = all (== 0) $ %o A065428 map (a010051' . (`mod` x) . a000290) [a000196 x .. x-1] %o A065428 -- _Reinhard Zumkeller_, Aug 01 2012, Aug 15 2011 %o A065428 (Python) %o A065428 from sympy import isprime %o A065428 def ok(n): return not any(isprime((x**2)%n) for x in range(2, n)) %o A065428 print(list(filter(ok, range(1, 2000)))) # _Michael S. Branicky_, May 08 2021 %Y A065428 Cf. A179402 (x^4 mod n). %Y A065428 Cf. A010051, A000196, A000290. %Y A065428 Cf. A214583 (n such that for all k with gcd(n, k) = 1 and n > k^2, n - k^2 is prime). %K A065428 nonn,nice,hard,more %O A065428 1,2 %A A065428 _Joerg Arndt_, Nov 16 2001