login
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 * ... .
2
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,1
LINKS
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
MATHEMATICA
a[n_] := GCD[24, n/GCD[6, n]]; Array[a, 100, 0] (* Amiram Eldar, Oct 15 2022 *)
PROG
(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)}
CROSSREFS
Cf. A305756.
Sequence in context: A174560 A267427 A040581 * A040582 A102914 A040583
KEYWORD
nonn,mult
AUTHOR
Seiichi Manyama, Jun 10 2018
EXTENSIONS
Keyword:mult added by Andrew Howroyd, Jul 24 2018
STATUS
approved