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.

A355931 Greatest common divisor of the odd part of n and sigma(n), where sigma is the sum of divisors function.

Original entry on oeis.org

1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 3, 1, 1, 1, 1, 1, 3, 1, 1, 1, 7, 1, 3, 1, 1, 3, 1, 1, 1, 1, 1, 1, 5, 1, 3, 1, 1, 3, 1, 1, 1, 1, 1, 3, 1, 1, 3, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 3, 1, 1, 3, 1, 1, 3, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 7, 1, 1, 3, 1, 1, 9, 7, 1, 1, 1, 5, 3, 1, 1, 3, 1, 1, 3, 1, 1, 3
Offset: 1

Views

Author

Antti Karttunen, Jul 22 2022

Keywords

Crossrefs

Programs

  • Mathematica
    a[n_] := GCD[DivisorSigma[1, n], n/2^IntegerExponent[n, 2]]; Array[a, 100] (* Amiram Eldar, Jul 22 2022 *)
  • PARI
    A000265(n) = (n>>valuation(n,2));
    A355931(n) = gcd(A000265(n), sigma(n));
    
  • Python
    from math import gcd
    from sympy import divisor_sigma
    def A355931(n): return gcd(divisor_sigma(n),n>>(~n&n-1).bit_length()) # Chai Wah Wu, Jul 22 2022

Formula

a(n) = gcd(A000203(n), A000265(n)) = gcd(n, A161942(n)) = A000265(A009194(n)).