login
A166602
Numbers k such that Sum_{i=1..k} i^2 divides Product_{i=1..k} i^2.
9
1, 7, 13, 17, 19, 24, 25, 27, 31, 32, 34, 37, 38, 43, 45, 47, 49, 55, 57, 59, 61, 62, 64, 67, 71, 73, 76, 77, 79, 80, 84, 85, 87, 91, 92, 93, 94, 97, 101, 103, 104, 107, 109, 110, 115, 117, 118, 121, 122, 123, 124, 127, 129, 132, 133, 137, 139, 142, 143, 144, 145, 147
OFFSET
1,2
COMMENTS
Product_{i=1..k} i^2 = (k!)^2 and Sum_{i=1..k} i^2 = k*(k+1)*(2*k+1)/6. - J. Mulder (jasper.mulder(AT)planet.nl), Jan 25 2010
EXAMPLE
a(2) = A125314(2) = 7.
MAPLE
q:= k-> is(irem(k!^2, k*(k+1)*(2*k+1)/6)=0):
select(q, [$1..200])[]; # Alois P. Heinz, May 09 2020
MATHEMATICA
Cases[Range[2, 5000], k_ /; Divisible[Factorial[k - 1]^2, 1/6 (-1 + k) k (-1 + 2 k)]] - 1 (* J. Mulder (jasper.mulder(AT)planet.nl), Jan 25 2010 *)
PROG
(PARI) isok(k) = ((k!)^2 % (k*(k+1)*(2*k+1)/6)) == 0; \\ Michel Marcus, May 09 2020
KEYWORD
nonn
AUTHOR
Alexander Adamchuk, Oct 18 2009
EXTENSIONS
Terms below 5000 by J. Mulder (jasper.mulder(AT)planet.nl), Jan 25 2010
More terms copied from the b-file by R. J. Mathar, Feb 14 2010
STATUS
approved