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

This page as a plain text file.
%I A305762 #19 Oct 15 2022 08:09:49
%S A305762 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,
%T A305762 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,
%U A305762 2,1,1,1,12,1,1,1,2,1,1,1,8,3,1,1,2,1,1,1,4,1
%N 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 * ... .
%H A305762 Seiichi Manyama, <a href="/A305762/b305762.txt">Table of n, a(n) for n = 0..10000</a>
%F A305762 a(n+144) = a(n).
%F A305762 a(n) = gcd(24, n/gcd(6,n)). - _Andrew Howroyd_, Jul 24 2018
%F A305762 Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = 77/36. - _Amiram Eldar_, Oct 15 2022
%t A305762 a[n_] := GCD[24, n/GCD[6, n]]; Array[a, 100, 0] (* _Amiram Eldar_, Oct 15 2022 *)
%o A305762 (PARI) a(n)=gcd(24, n/gcd(6,n)) \\ _Andrew Howroyd_, Jul 24 2018
%o A305762 (Ruby)
%o A305762 require 'prime'
%o A305762 def A305762(n)
%o A305762   return 24 if n == 0
%o A305762   s = 1
%o A305762   s *= 3 if n % 9 == 0
%o A305762   n.prime_division.each{|i|
%o A305762     s *= 2 ** [3, (i[1] - 1)].min if i[0] == 2
%o A305762   }
%o A305762   s
%o A305762 end
%o A305762 p (0..144).map{|i| A305762(i)}
%Y A305762 Cf. A305756.
%K A305762 nonn,mult
%O A305762 0,1
%A A305762 _Seiichi Manyama_, Jun 10 2018
%E A305762 Keyword:mult added by _Andrew Howroyd_, Jul 24 2018