OFFSET
1,1
COMMENTS
All terms in this sequence are even. Proof: If m is odd and p a prime factor, then p is odd. Put t=p-2, then m-t is even, and since p-(p-2)=2, p-t|m-t. Therefore k <= p-2 < p-1, and p-1 is not the smallest number satisfying the definition of k. Therefore there are no odd numbers in this sequence.
LINKS
Jinyuan Wang, Table of n, a(n) for n = 1..10000
EXAMPLE
For m=1 the predicate would not be well defined.
For m=2, k=1=2-1, so 2 is a term.
For m=10=2*5: p=2->k=1=2-1; p=5->k=4=5-1 therefore 10 is a term.
MAPLE
filter:= proc(n) local p, k;
for p in numtheory:-factorset(n) minus {2} do
for k from 2 to p-3 by 2 do
if (n-k) mod (p-k) = 0 then return false fi
od od;
true
end proc:
select(filter, [seq(i, i=2..200, 2)]); # Robert Israel, Jul 17 2019
MATHEMATICA
fQ[n_, p_] := Module[{k = 1}, While[!Divisible[n - k, p - k], k++]; k == p - 1]; aQ[n_] := And @@ (fQ[n, #] & /@ FactorInteger[n][[;; , 1]]); Select[Range[2, 200], aQ] (* Amiram Eldar, Jul 17 2019 *)
PROG
(PARI) findleast(m, p) = {for (k=1, p-1, if (!((m-k) % (p-k)), return(k)); ); }
isok(m) = {if (m == 1, return(0)); my (f = factor(m)); for (i=1, #f~, my(k = findleast(m, f[i, 1])); if (k != f[i, 1] - 1, return (0)); ); return (1); } \\ Michel Marcus, Aug 18 2019
CROSSREFS
KEYWORD
nonn
AUTHOR
David James Sycamore, Jul 17 2019
STATUS
approved