A308470 a(n) = (gcd(phi(n), 4*n^2 - 1) - 1)/2, where phi is A000010, Euler's totient function.
0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 2, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 2, 0, 1, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 7, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 4, 7, 0, 1, 0, 0, 2, 0, 0, 0, 1, 3, 2, 0, 0, 1, 0, 2, 0, 4
Offset: 1
Keywords
Examples
a(7) = 1 because (gcd(phi(7), 4*7^2 - 1) - 1)/2 = (gcd(6, 195) - 1)/2 = (3 - 1)/2 = 1.
Programs
-
Magma
[(Gcd(EulerPhi(n),4*n^2-1)-1)/2: n in [1..95]];
-
Mathematica
Table[(GCD[EulerPhi[n], 4n^2 - 1] - 1)/2, {n, 100}] (* Alonso del Arte, May 30 2019 *)
-
Python
from math import gcd def A000010(n): if n == 1: return 1 d, m = 1, 0 while d < n: if gcd(d,n) == 1: m = m+1 d = d+1 return m n = 0 while n < 30: n = n+1 print(n,(gcd(A000010(n),4*n**2-1)-1)//2) # A.H.M. Smeets, Aug 18 2019
Comments