[go: up one dir, main page]

login
A308470
a(n) = (gcd(phi(n), 4*n^2 - 1) - 1)/2, where phi is A000010, Euler's totient function.
1
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,22
COMMENTS
2*a(n) + 1 = gcd(phi(2*n), (2*n - 1)*(2*n + 1)).
a(A000040(n)) = A099618(n).
Records occur at n = 1, 7, 22, 62, 172, 213, 372, 427, 473, ...
FORMULA
a(A000040(n)) = A099618(n).
a(A002476(n)) = 1.
a(A045309(n)) = 0.
EXAMPLE
a(7) = 1 because (gcd(phi(7), 4*7^2 - 1) - 1)/2 = (gcd(6, 195) - 1)/2 = (3 - 1)/2 = 1.
MATHEMATICA
Table[(GCD[EulerPhi[n], 4n^2 - 1] - 1)/2, {n, 100}] (* Alonso del Arte, May 30 2019 *)
PROG
(Magma) [(Gcd(EulerPhi(n), 4*n^2-1)-1)/2: n in [1..95]];
(Python)
from fractions 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
CROSSREFS
KEYWORD
nonn
AUTHOR
STATUS
approved