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 A260709 #30 Dec 23 2024 14:53:44 %S A260709 2,5,13,52,241,241,436,1009,1009,1009,2641,2641,8089,8089,8089,8089, %T A260709 18001,18001,53881,53881,53881,53881,87481,87481,87481,87481,87481, %U A260709 87481,117049,117049,515761,515761,515761,515761,515761,515761,1083289,1083289,1083289,1083289 %N A260709 Smallest nonsquare congruent to a square (mod k^2) for all k = 1..n. %C A260709 A variant of A081650 which uses the remainder modulo k^2 instead of the congruence (mod k^2). %C A260709 Suggested by _Don Reble_ and R. Israel and the original title of A081650. %H A260709 Robert Israel and Emmanuel Vantieghem, <a href="/A260709/b260709.txt">Table of n, a(n) for n = 1..81</a>[Terms 1 through 70 were computed by R. Israel: terms 71 through 82 by E. Vantieghem. Nov 23 2015] %H A260709 R. Israel in reply to Don Reble, <a href="https://web.archive.org/web/*/http://list.seqfan.eu/oldermail/seqfan/2015-November/015643.html">A081650</a>, SeqFan list, Nov. 17, 2015 %t A260709 (* to get the sequence up to B *) %t A260709 VQR=Table[Union[Mod[Range[(n^2)/2]^2,n^2]],{n,2,17}]; %t A260709 Print[2];k=1;m=2;While[k<B,k++;m--;flag=0;While[flag==0,Label[m$];m++;If[!IntegerQ[Sqrt[m]],j=1;While[j<k,j++;If[! MemberQ[VQR[[j-1]],Mod[m,j^2]],Goto[m$]]];If[j==k,Print[m];flag=1]]]](* _Emmanuel Vantieghem_, Nov 23 2013 *) %o A260709 (PARI) t=2;for(n=1,90, for(m=t,9e9,issquare(m)&&next; for(k=1,n,issquare(Mod(m,k^2))||next(2)); print1(t=m,",");break)) %o A260709 (MATLAB) %o A260709 N = 2*10^8; % to get all terms <= N %o A260709 B = ones(1,N); %o A260709 B([1:floor(sqrt(N))].^2) = 0; %o A260709 m = 1; %o A260709 while true %o A260709 nsq = ones(m^2,1); %o A260709 sqs = unique(mod([1:m^2/2].^2, m^2)); %o A260709 sqs = [sqs(sqs > 0), m^2]; %o A260709 nsq(sqs) = 0; %o A260709 S = nsq * ones(1,ceil(N/m^2)); %o A260709 S = reshape(S,1,numel(S)); %o A260709 B(S(1:N)>0) = 0; %o A260709 v = find(B,1,'first'); %o A260709 if numel(v) == 0 %o A260709 break %o A260709 end %o A260709 A(m) = v; %o A260709 m = m + 1; %o A260709 end %o A260709 A % _Robert Israel_, Nov 17 2015 %Y A260709 Cf. A081650. %K A260709 nonn %O A260709 1,1 %A A260709 _M. F. Hasler_, Nov 17 2015