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 A385681 #11 Aug 11 2025 05:16:57 %S A385681 2,3,2,5,4,7,-1,3,-1,11,-1,13,-1,-1,4,17,-1,19,-1,9,120,23,-1,5,-1,3, %T A385681 -1,29,30,31,-1,-1,-1,-1,4,37,-1,-1,-1,41,-1,43,-1,45,36,47,2,7,-1,-1, %U A385681 16,53,-1,-1,2,-1,-1,59,30,61,-1,-1,2,-1,-1,67,-1,2745,70,71,60,73,-1,150,-1,-1,-1 %N A385681 a(n) is the least k > 1 such that n^2 == k (mod sopfr(k)) and k^2 == n (mod sopfr(n)), or -1 if there is no such k, where sopfr = A001414. %C A385681 a(n) = -1 if n is in A385679. Conjecture: a(n) > 0 if n is not in A385679. %C A385681 0 < a(n) < n if and only if n is in A385664. %C A385681 If p is prime, then a(p) = p. %H A385681 Robert Israel, <a href="/A385681/b385681.txt">Table of n, a(n) for n = 2..10000</a> %e A385681 a(6) = 4 because sopfr(6) = 5, sopfr(4) = 4, 6^2 == 4 == 0 (mod 4) and 4^2 == 6 == 1 (mod 5), and neither 2 nor 3 works. %p A385681 sopfr:= proc(n) option remember; local t; add(t[1]*t[2], t=ifactors(n)[2]) end proc: %p A385681 f:= proc(x) local sx,R,y,X,r,k; %p A385681 sx:= sopfr(x); %p A385681 R:= sort(map(t -> rhs(op(t)), [msolve(X^2 = x,sx)])); %p A385681 if R = [] then return -1 fi; %p A385681 for k from 0 do %p A385681 for r in R do %p A385681 y:= r + k*sx; %p A385681 if y < 2 then next fi; %p A385681 if x^2 - y mod sopfr(y) = 0 then return y fi %p A385681 od od; %p A385681 end proc: %p A385681 map(f, [$2 .. 100]); %Y A385681 Cf. A001414, A385664, A385679. %K A385681 sign %O A385681 2,1 %A A385681 _Will Gosnell_ and _Robert Israel_, Aug 04 2025