login
A079008
a(n) is smallest number k such that the n successive values of phi(k+j) (j=0,..,n-1) are all distinct.
1
1, 2, 5, 11, 11, 17, 17, 37, 46, 46, 112, 112, 123, 149, 149, 149, 257, 257, 257, 257, 257, 257, 257, 261, 658, 658, 685, 741, 741, 1359, 1359, 1359, 1359, 1359, 1359, 1359, 1359, 1359, 1359, 1359, 1359, 1359, 1359, 1359, 1359, 4097, 4097, 4097, 4097, 4097
OFFSET
1,2
EXAMPLE
a(8)=37, values of phi(k) for k=37,..,44 are {36, 18, 24, 16, 40, 12, 42, 20}.
MATHEMATICA
kul[x_] := Length[x]-Length[Union[x]]; frt[x_] := Table[EulerPhi[x+j], {j, 0, h-1}]; Table[fa=1; k=0; Do[s=frt[n]; s1=kul[s]; If[Equal[s1, 0]&&Equal[fa, 1], k=k+1; Print[{h, n, s}]; fa=0], {n, 1, 10000}], {h, 1, 50}]
PROG
(PARI) a(n) = if(n==1, 1, my(v=vector(n, i, eulerphi(i))); for(k=n, oo, if(#Set(v)==n, return(k-n)); v[k%n+1]=eulerphi(k))); \\ Jinyuan Wang, Feb 10 2021
CROSSREFS
KEYWORD
nonn
AUTHOR
Labos Elemer, Jan 08 2003
STATUS
approved