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

 

Logo

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 59th year, we have over 358,000 sequences, and we’ve crossed 10,300 citations (which often say “discovered thanks to the OEIS”).

Other ways to Give
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A023896 Sum of positive integers in smallest positive reduced residue system modulo n. a(1) = 1 by convention. 86
1, 1, 3, 4, 10, 6, 21, 16, 27, 20, 55, 24, 78, 42, 60, 64, 136, 54, 171, 80, 126, 110, 253, 96, 250, 156, 243, 168, 406, 120, 465, 256, 330, 272, 420, 216, 666, 342, 468, 320, 820, 252, 903, 440, 540, 506, 1081, 384, 1029, 500, 816, 624, 1378, 486, 1100, 672 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,3

COMMENTS

Sum of totatives of n, i.e., sum of integers up to n and coprime to n.

a(1) = 1, since 1 is coprime to any positive integer.

a(n) = n*A023022(n) for n>2.

a(n) = A053818(n) * A175506(n) / A175505(n). - Jaroslav Krizek, Aug 01 2010

Row sums of A038566. - Wolfdieter Lang, May 03 2015

REFERENCES

T. M. Apostol, Introduction to Analytic Number Theory, Springer-Verlag, 1976, page 48, problem 16, the function phi_1(n).

D. M. Burton, Elementary Number Theory, p. 171.

J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 2001, p. 163.

J. V. Uspensky and M. A. Heaslet, Elementary Number Theory, McGraw-Hill, NY, 1939, p. 111.

LINKS

Michael De Vlieger, Table of n, a(n) for n = 1..10000 (First 1000 terms from T. D. Noe)

John D. Baum, A Number-Theoretic Sum, Mathematics Magazine 55.2 (1982): 111-113.

Constantin M. Petridi, The Sums of the k-powers of the Euler set and their connection with Artin's conjecture for primitive roots, arXiv:1612.07632 [math.NT], 2016.

David Zmiaikou, Origamis and permutation groups, Thesis, 2011. See p. 65.

FORMULA

a(n) = phi(n^2)/2 = n*phi(n)/2 = A002618(n)/2 if n>1, a(1)=1. See the Apostol reference for this exercise.

a(n) = Sum_{1 <= k < n, gcd(k, n) = 1} k.

If n = p is a prime, a(p) = T(p-1) where T(k) is the k-th triangular number (A000217). - Robert G. Wilson v, Jul 31 2004

Equals A054521 * [1,2,3,...]. - Gary W. Adamson, May 20 2007

If m,n > 1 and gcd(m,n)=1 then a(m*n) = 2*a(m)*a(n). - Thomas Ordowski, Nov 09 2014

G.f.: Sum_{n>=1} mu(n)*n*x^n/(1-x^n)^3, where mu(n)=A008683(n). - Mamuka Jibladze, Apr 24 2015

G.f. A(x) satisfies A(x) = x/(1 - x)^3 - Sum_{k>=2} k * A(x^k). - Ilya Gutkovskiy, Sep 06 2019

For n > 1: a(n) = (n*A076512(n)/2)*A009195(n). - Jamie Morken, Dec 16 2019

EXAMPLE

G.f. = x + x^2 + 3*x^3 + 4*x^4 + 10*x^5 + 6*x^6 + 21*x^7 + 16*x^8 + 27*x^9 + ...

a(12) = 1 + 5 + 7 + 11 = 24.

n = 40: The smallest positive reduced residue system modulo 40 is {1, 3, 7, 9, 11, 13, 17, 19, 21, 23, 27, 29, 31, 33, 37, 39}. The sum is a(40) = 320. Average is 20.

MAPLE

A023896 := proc(n)

if n = 1 then

1;

else

n*numtheory[phi](n)/2 ;

end if;

end proc: # R. J. Mathar, Sep 26 2013

MATHEMATICA

a[ n_ ] = n/2*EulerPhi[ n ]; a[ 1 ] = 1; Table[a[n], {n, 56}]

a[ n_] := If[ n < 2, Boole[n == 1], Sum[ k Boole[1 == GCD[n, k]], { k, n}]]; (* Michael Somos, Jul 08 2014 *)

PROG

(PARI) {a(n) = if(n<2, n>0, n*eulerphi(n)/2)};

(PARI) A023896(n)=n*eulerphi(n)\/2 \\ about 10% faster. - M. F. Hasler, Feb 01 2021

(Haskell)

a023896 = sum . a038566_row -- Reinhard Zumkeller, Mar 04 2012

(Magma) [1] cat [n*EulerPhi(n)/2: n in [2..70]]; // Vincenzo Librandi, May 16 2015

(Python)

from sympy import totient

def A023896(n): return 1 if n == 1 else n*totient(n)//2 # Chai Wah Wu, Apr 08 2022

CROSSREFS

Cf. A000010, A000203, A002180, A045545, A001783, A024816, A066760, A054521, A067392, A038566.

Row sums of A127368, A144734, A144824.

Cf. A023022.

Sequence in context: A143443 A139556 A191150 * A328711 A343876 A356150

Adjacent sequences: A023893 A023894 A023895 * A023897 A023898 A023899

KEYWORD

nonn,easy,nice

AUTHOR

Olivier Gérard

EXTENSIONS

Typos in programs corrected by Zak Seidov, Aug 03 2010

Name and example edited by Wolfdieter Lang, May 03 2015

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 December 5 18:02 EST 2022. Contains 358588 sequences. (Running on oeis4.)