login
This site is supported by donations to The OEIS Foundation.

 

Logo

Please make a donation to keep the OEIS running. We are now in our 55th year. In the past year we added 12000 new sequences and reached 8000 citations (which often say "discovered thanks to the OEIS"). We need to raise money to hire someone to manage submissions, which would reduce the load on our editors and speed up editing.
Other ways to donate

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A057789 a(n) = Sum_{k = 1..n, gcd(k,n)=1} k*(n-k). 1
0, 1, 4, 6, 20, 10, 56, 44, 84, 60, 220, 92, 364, 182, 280, 344, 816, 318, 1140, 520, 840, 770, 2024, 760, 2100, 1300, 2196, 1540, 4060, 1240, 4960, 2736, 3520, 2992, 4760, 2580, 8436, 4218, 5928, 4240, 11480, 3612, 13244, 6380, 8040, 7590, 17296, 6128 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,3

COMMENTS

Equal to convolution sum over positive integers, k, where k<=n and gcd(k,n)=1, except in first term, where the convolution sum is 1 instead of 0.

LINKS

Robert Israel, Table of n, a(n) for n = 1..10000

FORMULA

From Robert Israel, Sep 29 2019: (Start)

If n is prime, a(n) = A000292(n-1).

If n/2 is an odd prime, a(n) =  A000292(n-2)/2.

If n/3 is a prime other than 3, a(n) = A000292(n-3)*2*n/(3*(n-2)). (End)

EXAMPLE

Since 1, 3, 5 and 7 are relatively prime to 8 and are <= 8, a(8) = 1*(8-1) +3*(8-3) +5*(8-5) +7*(8-7) = 44.

MAPLE

f:= proc(n) local i;

  2*add(`if`(igcd(i, n)=1, i*(n-i), 0), i=1..n/2)

end proc:

f(2):= 1:

map(f, [$1..100]); # Robert Israel, Sep 29 2019

PROG

(PARI) a(n) = sum(k=1, n, if (gcd(n, k)==1, k*(n-k))); \\ Michel Marcus, Sep 29 2019

CROSSREFS

Cf. A000292.

Sequence in context: A053892 A013126 A012969 * A174936 A123169 A205955

Adjacent sequences:  A057786 A057787 A057788 * A057790 A057791 A057792

KEYWORD

nonn,look

AUTHOR

Leroy Quet, Nov 04 2000

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified December 6 14:15 EST 2019. Contains 329806 sequences. (Running on oeis4.)