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.

Original entry on oeis.org

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

Views

Author

Juri-Stepan Gerasimov, May 29 2019

Keywords

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, ...

Examples

			a(7) = 1 because (gcd(phi(7), 4*7^2 - 1) - 1)/2 = (gcd(6, 195) - 1)/2 = (3 - 1)/2 = 1.
		

Crossrefs

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

Formula

a(A000040(n)) = A099618(n).
a(A002476(n)) = 1.
a(A045309(n)) = 0.