OFFSET
1,2
COMMENTS
Each term of the sequence marks the start of four consecutive phi-values for which the sum of the means equals the sum of the extremes.
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..100 (terms 1..44 from M. F. Hasler)
EXAMPLE
phi(7) + phi(10) = 6 + 4 = 10; phi(8) + phi(9) = 4 + 6 = 10, so 7 is a term of the sequence.
MATHEMATICA
Select[Range[10^5], EulerPhi[ # ] + EulerPhi[ # + 3] == EulerPhi[ # + 1] + EulerPhi[ # + 2] &]
Flatten[Position[Partition[EulerPhi[Range[14*10^6]], 4, 1], _?(#[[1]]+ #[[4]] == #[[2]]+#[[3]]&), {1}, Heads->False]] (* Harvey P. Dale, Dec 12 2015 *)
PROG
(PARI) t=vector(4, i, i)~; c=[[1, 1, -1, -1], [1, -1, -1, 1]]; for(n=1, 10^9, t[n%4+1]=eulerphi(n); c[n%2+1]*t & next; print1(n-3, ", ")) \\ M. F. Hasler, Feb 07 2009
(Magma) [k: k in [1..10^5] |EulerPhi(k)+EulerPhi(k+3)-EulerPhi(k+1)-EulerPhi(k+2)eq 0]; // Marius A. Burtea, Oct 02 2019
CROSSREFS
KEYWORD
nonn
AUTHOR
Joseph L. Pe, Oct 25 2002
EXTENSIONS
Terms beyond a(16) from M. F. Hasler, Feb 07 2009
STATUS
approved