login
A276373
Least k such that phi(k*n-1) = phi(k*n+1), or -1 if no such k exists.
1
5, 4, 3, 2, 1, 106, 21, 1, 1, 39282, 1, 53, 135, 65014, 5, 9489, 171, 361, 27, 19641, 7, 13133, 141, 6326, 3, 6978, 1, 32507, 375, 13094, 165, 93186, 1, 1359, 9, 12588, 15, 171, 45, 35253, 3, 35794, 9, 16796, 7, 1689, 69, 3163, 3, 13653, 57, 3489, 12, 249, 45, 58497, 9
OFFSET
1,1
COMMENTS
Least k such that k*n is in A066812.
If n is in A066812 then a(n) = 1, otherwise a(n) = A276052(n).
LINKS
Jean-François Alcover, Table of n, a(n) for n = 1..1000
EXAMPLE
a(5) = 15 because phi(15*5-1) = phi(15*5+1).
MAPLE
f:= proc(n) local k;
for k from 1 do if numtheory:-phi(k*n-1) = numtheory:-phi(k*n+1) then
return k
fi od end proc:
map(f, [$1..60]);
MATHEMATICA
kmax = 10^8;
a[n_] := For[k = 1, k <= kmax, k++, If[EulerPhi[k*n - 1] == EulerPhi[k*n + 1], Print[n, " ", k]; Return[k]]] /. Null -> -1;
Table[a[n], {n, 1, 1000}] (* Jean-François Alcover, Jun 03 2024 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Altug Alkan and Robert Israel, Aug 31 2016
STATUS
approved