OFFSET
1,1
COMMENTS
If the limitation of searching only for composite numbers k-n and k+n is removed, the terms we get are the average of two primes.
EXAMPLE
a(1) = 138004 because it is the least number k such that the composites k-1 and k+1 have arithmetic derivatives (k-1)' = (k+1)'. We see that (138004 - 1)' = (138004 + 1)' = 47351;
a(2) = 23 because it is the least number k such that the composites k - 2 and k+2 have arithmetic derivatives (k-2)' = (k+2)'. We see that (23 - 1)' = (23 + 1).
MAPLE
with(numtheory): P:=proc(q) local a, h, n, p; for h from 1 to q do
for n from h to q do if not isprime(n-h) and
(n-h)*add(op(2, p)/op(1, p), p=ifactors(n-h)[2])=
(n+h)*add(op(2, p)/op(1, p), p=ifactors(n+h)[2])
then print(n); break; fi; od; od; end: P(10^9);
MATHEMATICA
ad[n_] := With[{f = FactorInteger[n]}, n*Total[f[[All, 2]]/f[[All, 1]]]];
okQ[n_, k_] := If[Not[CompositeQ[k-n] && CompositeQ[k+n]], False, ad[k-n] == ad[k+n]];
a[n_] := For[k = 1, True, k++, If[okQ[n, k], Print["a(", n, ") = ", k]; Return[k]]];
Array[a, 46] (* Jean-François Alcover, Dec 20 2017 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Paolo P. Lava, Dec 12 2017
STATUS
approved