cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A308470 a(n) = (gcd(phi(n), 4*n^2 - 1) - 1)/2, where phi is A000010, Euler's totient function.

This page as a plain text file.
%I A308470 #35 Jun 28 2025 12:55:58
%S A308470 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,
%T A308470 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,
%U A308470 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
%N A308470 a(n) = (gcd(phi(n), 4*n^2 - 1) - 1)/2, where phi is A000010, Euler's totient function.
%C A308470 2*a(n) + 1 = gcd(phi(2*n), (2*n - 1)*(2*n + 1)).
%C A308470 a(A000040(n)) = A099618(n).
%C A308470 Records occur at n = 1, 7, 22, 62, 172, 213, 372, 427, 473, ...
%F A308470 a(A000040(n)) = A099618(n).
%F A308470 a(A002476(n)) = 1.
%F A308470 a(A045309(n)) = 0.
%e A308470 a(7) = 1 because (gcd(phi(7), 4*7^2 - 1) - 1)/2 = (gcd(6, 195) - 1)/2 = (3 - 1)/2 = 1.
%t A308470 Table[(GCD[EulerPhi[n], 4n^2 - 1] - 1)/2, {n, 100}] (* _Alonso del Arte_, May 30 2019 *)
%o A308470 (Magma) [(Gcd(EulerPhi(n),4*n^2-1)-1)/2: n in [1..95]];
%o A308470 (Python)
%o A308470 from math import gcd
%o A308470 def A000010(n):
%o A308470     if n == 1:
%o A308470         return 1
%o A308470     d, m = 1, 0
%o A308470     while d < n:
%o A308470         if gcd(d,n) == 1:
%o A308470             m = m+1
%o A308470         d = d+1
%o A308470     return m
%o A308470 n = 0
%o A308470 while n < 30:
%o A308470     n = n+1
%o A308470     print(n,(gcd(A000010(n),4*n**2-1)-1)//2) # _A.H.M. Smeets_, Aug 18 2019
%Y A308470 Cf. A000010, A000040, A002476, A045309, A099618.
%K A308470 nonn
%O A308470 1,22
%A A308470 _Juri-Stepan Gerasimov_, May 29 2019