OFFSET
0,1
LINKS
Seiichi Manyama, Table of n, a(n) for n = 0..10000
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
KEYWORD
nonn,mult
AUTHOR
Seiichi Manyama, Jun 10 2018
EXTENSIONS
Keyword:mult added by Andrew Howroyd, Jul 24 2018
STATUS
approved