OFFSET
1,1
COMMENTS
Sequence contains no terms from A002522. Curiously, the asymptotic density of prime terms appears to be ~ 2n/log(n).
EXAMPLE
Let k = 3; q = 3 - 1^2 = 2 and 3 mod 2 = 1, so 3 is a term.
Let k = 5; q = 5 - 2^2 = 1 and 5 mod 1 != 1, so 5 is not a term.
Let k = 53; q = 53 - 7^2 = 4 and 53 mod 4 = 1, so 53 is a term.
MATHEMATICA
q[n_] := Module[{s = Floor[Sqrt[n - 1]]^2}, Mod[n, n - s] == 1]; Select[Range[1, 300, 2], q] (* Amiram Eldar, Jan 26 2023 *)
PROG
(PARI) is(n)=if(n%2!=0, my(z); sqrtint(n, &z); z>0&&n%z==1);
CROSSREFS
KEYWORD
nonn
AUTHOR
Bill McEachen, Jan 24 2023
STATUS
approved