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.

A305762 a(0) = 24, a(n) = 2^(max(0, min(3, p - 1))) * 3^(max(0, min(1, q - 1))) where n = 2^p * 3^q * 5^r * ... .

Original entry on oeis.org

24, 1, 1, 1, 2, 1, 1, 1, 4, 3, 1, 1, 2, 1, 1, 1, 8, 1, 3, 1, 2, 1, 1, 1, 4, 1, 1, 3, 2, 1, 1, 1, 8, 1, 1, 1, 6, 1, 1, 1, 4, 1, 1, 1, 2, 3, 1, 1, 8, 1, 1, 1, 2, 1, 3, 1, 4, 1, 1, 1, 2, 1, 1, 3, 8, 1, 1, 1, 2, 1, 1, 1, 12, 1, 1, 1, 2, 1, 1, 1, 8, 3, 1, 1, 2, 1, 1, 1, 4, 1
Offset: 0

Views

Author

Seiichi Manyama, Jun 10 2018

Keywords

Crossrefs

Cf. A305756.

Programs

  • Mathematica
    a[n_] := GCD[24, n/GCD[6, n]]; Array[a, 100, 0] (* Amiram Eldar, Oct 15 2022 *)
  • PARI
    a(n)=gcd(24, n/gcd(6,n)) \\ Andrew Howroyd, Jul 24 2018
    
  • Ruby
    require 'prime'
    def A305762(n)
      return 24 if n == 0
      s = 1
      s *= 3 if n % 9 == 0
      n.prime_division.each{|i|
        s *= 2 ** [3, (i[1] - 1)].min if i[0] == 2
      }
      s
    end
    p (0..144).map{|i| A305762(i)}

Formula

a(n+144) = a(n).
a(n) = gcd(24, n/gcd(6,n)). - Andrew Howroyd, Jul 24 2018
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = 77/36. - Amiram Eldar, Oct 15 2022

Extensions

Keyword:mult added by Andrew Howroyd, Jul 24 2018