OFFSET
1,3
LINKS
C. H. Gribble, Table of n, a(n) for n=1..78498 (i.e. for primes < 10^6).
FORMULA
a(n) = A166375(prime(n)-1). - Charles R Greathouse IV, Jun 28 2013
MATHEMATICA
Table[Sum[Floor[j^2/n], {j, n-1}], {n, Prime[Range[50]]}] (* Harvey P. Dale, Aug 10 2014 *)
PROG
(PARI) a(n) = sum(j=1, prime(n)-1, floor (j^2/prime(n))) \\ Michel Marcus, Jun 20 2013
(PARI) a(n)=my(p=prime(n)); sum(j=1, p-1, j^2\p) \\ Charles R Greathouse IV, Jun 20 2013
CROSSREFS
KEYWORD
nonn
AUTHOR
Christopher Hunt Gribble, Oct 03 2009
EXTENSIONS
Definition rephrased by R. J. Mathar, Oct 09 2009
STATUS
approved