OFFSET
1,7
COMMENTS
a(n)^2 is the largest square that divides n*(n+1)*(2*n+1)/6.
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
a(12) = 5 because A000330(12) = 650 = 2 * 5^2 = 13 and 5^2 is the largest square dividing 650.
MAPLE
g:= proc(n) local t, s, F; t:= n*(n+1)*(2*n+1)/6;
F:= ifactors(t)[2];
mul(s[1]^floor(s[2]/2), s=F)
end proc:
map(g, [$1..100]);
PROG
(PARI) a(n) = my(m=n*(n+1)*(2*n+1)/6); sqrtint(m/core(m)); \\ Michel Marcus, Sep 06 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
Robert Israel, Sep 04 2024
STATUS
approved