

A281981


a(n) = 4*Sum_{i=1..n1} Sum_{j=1..m} floor((j*i)/n))  (m1)*m*(n1) where m is floor(sqrt(n)).


0



0, 0, 0, 2, 0, 2, 0, 2, 4, 2, 0, 6, 0, 2, 4, 8, 0, 8, 0, 8, 4, 4, 0, 12, 8, 4, 4, 8, 0, 16, 0, 8, 4, 4, 8, 22, 0, 6, 8, 18, 0, 18, 0, 10, 16, 6, 0, 22, 12, 14, 8, 10, 0, 18, 8, 22, 8, 6, 0, 30, 0, 6, 20, 24, 8, 20, 0, 16, 8, 28, 0, 36, 0, 8, 16, 16, 12, 20, 0, 32
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,4


COMMENTS

Tsangaris proves that a(n)=0 iff n is prime (or 1) and a(n)>0 iff n is composite.


LINKS

Table of n, a(n) for n=1..80.
Panayiotis G. Tsangaris, Prime numbers and cyclotomy, Acta Academiae Paedagogicae Agriensis, Sectio Mathematicae 31 (2004) 310.


PROG

(PARI) a(n) = if(iscomposite(n), my(m = sqrtint(n)); 4*sum(i=1, n1, sum(j=1, m, (j*i)\n))  (m1)*m*(n1), 0)


CROSSREFS

Sequence in context: A139036 A292129 A291970 * A159006 A291968 A226171
Adjacent sequences: A281978 A281979 A281980 * A281982 A281983 A281984


KEYWORD

nonn


AUTHOR

Michel Marcus, Feb 04 2017


EXTENSIONS

Edited by Robert Israel, Feb 07 2017


STATUS

approved



