OFFSET
1,1
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
a(3) = 20 is a term because A001414(20) = 2+2+5 = 9, 20+1 = 21 is divisible by 21 mod 9 = 3, and 20-1 = 19 is divisible by 19 mod 9 = 1.
MAPLE
filter:= proc(n) local s, t, r, q;
if isprime(n) then return false fi;
s:= add(t[1]*t[2], t = ifactors(n)[2]);
r:= (n+1) mod s;
q:= (n-1) mod s;
r<> 0 and q <> 0 and (n+1) mod r = 0 and (n-1) mod q = 0
end proc:
select(filter, [$4..2000]);
MATHEMATICA
filter[n_] := Module[{s, t, r, q},
If[ PrimeQ[n], Return[False]];
s = Sum[t[[1]]*t[[2]], {t, FactorInteger[n]}];
r = Mod[n+1, s];
q = Mod[n-1, s];
r != 0 && q != 0 && Mod[n+1, r] == 0 && Mod[n-1, q ] == 0];
Select[Range[4, 2000], filter] (* Jean-François Alcover, Sep 29 2024, after Maple program *)
CROSSREFS
KEYWORD
nonn
AUTHOR
J. M. Bergot and Robert Israel, Nov 21 2021
STATUS
approved