login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A281981 a(n) = 4*Sum_{i=1..n-1} Sum_{j=1..m} floor((j*i)/n) - (m-1)*m*(n-1) 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
Panayiotis G. Tsangaris, Prime numbers and cyclotomy, Acta Academiae Paedagogicae Agriensis, Sectio Mathematicae 31 (2004) 3-10.
PROG
(PARI) a(n) = if(iscomposite(n), my(m = sqrtint(n)); 4*sum(i=1, n-1, sum(j=1, m, (j*i)\n)) - (m-1)*m*(n-1), 0)
CROSSREFS
Sequence in context: A139036 A292129 A291970 * A159006 A291968 A226171
KEYWORD
nonn
AUTHOR
Michel Marcus, Feb 04 2017
EXTENSIONS
Edited by Robert Israel, Feb 07 2017
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 23 03:30 EDT 2024. Contains 371906 sequences. (Running on oeis4.)