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 A254328 #30 Jan 13 2025 14:33:03 %S A254328 1,2,3,4,5,8,12,16 %N A254328 Numbers k such that all x^2 mod k are squares (including 0 and 1). %C A254328 Are there any more terms > 16? %C A254328 There are no more terms less than 10^12. Probably the sequence is finite. - _Charles R Greathouse IV_, Jan 29 2015 %C A254328 This is a subsequence of A303704, so it is full. - _Jianing Song_, Feb 14 2019 %H A254328 Dan Ismailescu and Yunkyu James Lee, <a href="https://arxiv.org/abs/2501.04851">Polynomially growing integer sequences all whose terms are composite</a>, arXiv:2501.04851 [math.NT], 2025. (See the proof of Theorem 2.1.) %e A254328 Terms k <= 16 and the squares mod k: %e A254328 1: [0] %e A254328 2: [0, 1] %e A254328 3: [0, 1, 1] %e A254328 4: [0, 1, 0, 1] %e A254328 5: [0, 1, 4, 4, 1] %e A254328 8: [0, 1, 4, 1, 0, 1, 4, 1] %e A254328 12: [0, 1, 4, 9, 4, 1, 0, 1, 4, 9, 4, 1] %e A254328 16: [0, 1, 4, 9, 0, 9, 4, 1, 0, 1, 4, 9, 0, 9, 4, 1] %e A254328 k = 10 is not a term: in the list of squares mod 10, [0, 1, 4, 9, 6, 5, 6, 9, 4, 1], the numbers 5 and 6 are not squares. %t A254328 f[n_] := Mod[Range[n]^2, n]; Select[Range@ 10000, AllTrue[f@ #, IntegerQ[Sqrt[#]] &] &] (* AllTrue function introduced in version 10; _Michael De Vlieger_, Jan 29 2015 *) %o A254328 (PARI) isok(n)=for(k=2,n-1,if(!issquare(lift(Mod(k,n)^2)),return(0)));return(1); %o A254328 for(n=1,10^9,if(isok(n),print1(n,", "))); %o A254328 (PARI) is(n)=for(k=sqrtint(n)+1,n\2, if(!issquare(k^2%n), return(0))); 1 %o A254328 for(m=10,10^6,for(k=0,sqrtint(2*m),if(is(t=m^2-k^2),print(t)))) %o A254328 \\ _Charles R Greathouse IV_, Jan 29 2015 %Y A254328 Cf. A065428, A254329, A096008, A303704. %K A254328 nonn,fini,full %O A254328 1,2 %A A254328 _Joerg Arndt_, Jan 28 2015 %E A254328 Keywords fini and full added by _Jianing Song_, Feb 14 2019