OFFSET
2,5
REFERENCES
J. Butterworth, Examining the arithmetic function v_g(n,h). Research Papers in Mathematics, B. Bajnok, ed., Gettysburg College, Vol. 8 (2008).
LINKS
Bela Bajnok, Additive Combinatorics: A Menu of Research Problems, arXiv:1705.07444 [math.NT], May 2017. See Table in Section 1.6.1.
MAPLE
a:= n-> n*max(seq((floor((d-1-igcd(d, 4))/4)+1)
/d, d=numtheory[divisors](n))):
seq(a(n), n=2..100); # Alois P. Heinz, Jul 07 2017
MATHEMATICA
a[n_]:=n*Max[Table[(Floor[(d - 1 - GCD[d, 4])/4] + 1)/d, {d, Divisors[n]}]]; Table[a[n], {n, 2, 100}] (* Indranil Ghosh, Jul 08 2017 *)
PROG
(PARI)
v(g, n, h)={my(t=0); fordiv(n, d, t=max(t, ((d-1-gcd(d, g))\h + 1)*(n/d))); t}
a(n)=v(4, n, 4); \\ Andrew Howroyd, Jul 07 2017
(Python)
from sympy import divisors, floor, gcd
def a(n): return n*max([(floor((d - 1 - gcd(d, 4))/4) + 1)/d for d in divisors(n)])
print([a(n) for n in range(2, 101)]) # Indranil Ghosh, Jul 08 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Jul 07 2017
EXTENSIONS
a(41)-a(70) from Andrew Howroyd, Jul 07 2017
STATUS
approved