OFFSET
1,2
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..719
EXAMPLE
a(4) = (1^4 + 2^4 + 3^4 + 4^4 + 5^4 + 6^4 + 7^4)/(1+2+3+4+5+6+7) = 4676/28 = 167, k = 7.
a(5) = (1^5 + 2^5)/(1 + 2) = 11, k = 2.
MAPLE
a:= proc(n) option remember; local k, r, s, t; s, t:=1$2;
for k from 2 do s, t:= s+k, t+k^n;
if irem(t, s, 'r')=0 then return r fi
od:
end:
seq(a(n), n=1..28); # Alois P. Heinz, Mar 07 2024
MATHEMATICA
f[n_] := Block[{k = 2}, While[s = 2Sum[i^n, {i, k}]/(k(k + 1)); !IntegerQ[s], k++ ]; s]; Table[ f[n], {n, 25}] (* Robert G. Wilson v, Jun 02 2004 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Amarnath Murthy, May 29 2004
EXTENSIONS
Edited and extended by Robert G. Wilson v, Jun 02 2004
STATUS
approved