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.
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, -1, 29, 30, 31, -1, -1, -1, -1, 4, 37, -1, -1, -1, 41, -1, 43, -1, 45, 36, 47, 2, 7, -1, -1, 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
Offset: 2
Keywords
Examples
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.
Links
- Robert Israel, Table of n, a(n) for n = 2..10000
Programs
-
Maple
sopfr:= proc(n) option remember; local t; add(t[1]*t[2], t=ifactors(n)[2]) end proc: f:= proc(x) local sx,R,y,X,r,k; sx:= sopfr(x); R:= sort(map(t -> rhs(op(t)), [msolve(X^2 = x,sx)])); if R = [] then return -1 fi; for k from 0 do for r in R do y:= r + k*sx; if y < 2 then next fi; if x^2 - y mod sopfr(y) = 0 then return y fi od od; end proc: map(f, [$2 .. 100]);
Comments