OFFSET
1,3
COMMENTS
FORMULA
a(n) = A076108(n)/n - (n-1)/2 for n != 0 (mod 4).
a(4k)=0; otherwise a(n) = (2*A076108(n)/n - n + 1)/2 = (2*p1^n*...*pm^n/n - n + 1)/2 where p1, ..., pm are all distinct odd primes dividing n. - Max Alekseyev, Jun 10 2005
EXAMPLE
a(3) = 8 as 8+9+10 = 27 = 3^3. a(6) = 119 as 119+120+...+124 = 729 = 3^6.
PROG
(PARI) for(n=1, 30, t=n*(n-1)/2:f=0:for(r=1, 10^4, if((r^n-t)%n==0, f=(r^n-t)/n:break)):print1(f", "))
(PARI) {A076107(n)=if(n%4==0, return(0)); m=n; if(m%2==0, m\=2); f=factorint(m)[, 1]; p=1; (2*prod(i=1, length(f), f[i])^n/n-n+1)/2} (Alekseyev)
CROSSREFS
KEYWORD
nonn
AUTHOR
Amarnath Murthy, Oct 08 2002
EXTENSIONS
Corrected and extended by Ralf Stephan, Mar 30 2003
Revised by Max Alekseyev and David W. Wilson, Jun 10 2005
More terms from Max Alekseyev, Jun 10 2005
STATUS
approved