A295865 Numbers k, the smallest of at least 4 consecutive numbers x, for which phi(x) <= phi(x+1).
1, 2, 14, 104, 164, 254, 494, 584, 1484, 2204, 2534, 2834, 3002, 3674, 3926, 4454, 4484, 4784, 4844, 5186, 5264, 5312, 5984, 6104, 7994, 8294, 8414, 8774, 8834, 9074, 9164, 9944, 10004, 10604, 10724, 11024, 11684, 11894, 12254, 13034, 13064, 13166, 13364, 13454, 13754, 14234, 15344, 15554, 16184, 16214
Offset: 1
Keywords
Examples
14 is a term because phi(14) <= phi(15) <= phi(16) <= phi(17). 15 is not a term because phi(15) <= phi(16) <= phi(17) > phi(18).
Programs
-
Maple
Phi:= map(numtheory:-phi, [$1..20001]): DPhi:= Phi[2..-1]-Phi[1..-2]: C:= select(t -> DPhi[t]>=0, [$1..20000]): C[select(t -> C[t+2]=C[t]+2, [$1..nops(C)-3])]; # Robert Israel, Mar 26 2018
-
Mathematica
Drop[#, -2] & /@ Select[SplitBy[#, Last@ # >= 0 &], Length@ # > 2 && #[[1, -1]] >= 0 &][[All, All, 1]] &@ MapIndexed[{First@ #2, #1} &, Differences@ Array[EulerPhi, 2^14]] // Flatten (* Michael De Vlieger, Mar 26 2018 *)
-
PARI
isok(n) = {my(v = vector(4, k, eulerphi(n+k-1))); (v[1] <= v[2]) && (v[2] <= v[3]) && (v[3] <= v[4]);} \\ Michel Marcus, Mar 21 2018
Comments