OFFSET
1,3
COMMENTS
If n is odd, then phi(n) = phi(2n) so that a(n)>=1.
If n is a member of A043343, then a(n)=0.
It seems that every nonnegative integer appears in this sequence.
LINKS
Chai Wah Wu, Table of n, a(n) for n = 1..10000
EXAMPLE
For n=2: phi(2) = 1; whereas phi(2+1) = 2 and phi(2+2) = 2. Thus a(2) = 0.
For n=5: phi(5) = 4, phi(5+1)=2, phi(5+2)=6, phi(5+3) = 4, phi(5+4) = 6, and phi(5+5) = 4. Since phi(5) = phi(5+3) = phi(5+5), a(5) = 2.
MATHEMATICA
Table[Count[Range@ n, k_ /; EulerPhi@ n == EulerPhi[n + k]], {n, 120}] (* Michael De Vlieger, Apr 25 2016 *)
PROG
(Sage) [sum([1 for k in [1..n] if euler_phi(n)==euler_phi(n+k)]) for n in [1..1000]]
(Python)
from sympy import totient
nmax = 10**4
philist = [totient(i) for i in range(1, 2*nmax+1)]
A272328_list = [philist[i+1:2*(i+1)].count(philist[i]) for i in range(nmax)] # Chai Wah Wu, Apr 26 2016
(PARI) a(n) = my(x=eulerphi(n)); sum(k=1, n, eulerphi(n+k) == x); \\ Michel Marcus, Mar 08 2020
CROSSREFS
KEYWORD
nonn
AUTHOR
Tom Edgar, Apr 25 2016
STATUS
approved