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

 

Logo

Annual Appeal: Please make a donation (tax deductible in USA) to keep the OEIS running. Over 5000 articles have referenced us, often saying "we discovered this result with the help of the OEIS".

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A176345 Sum of gcd(k,n) from k = 1 to n over "regular" integers only (an integer k is regular if there is an x such that k^2 x == k (mod n)) 2
1, 3, 5, 6, 9, 15, 13, 12, 15, 27, 21, 30, 25, 39, 45, 24, 33, 45, 37, 54, 65, 63, 45, 60, 45, 75, 45, 78, 57, 135, 61, 48, 105, 99, 117, 90, 73, 111, 125, 108, 81, 195, 85, 126, 135, 135, 93, 120, 91, 135, 165, 150, 105, 135, 189, 156, 185, 171, 117, 270, 121, 183, 195 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

COMMENTS

It is also the product of n and (2-1/p), taken over all primes p dividing n.

Multiplicative with a(p^e) = 2*p^e-p^(e-1).

LINKS

Table of n, a(n) for n=1..63.

J.-M. De Koninck, I. Katai, Some remarks on a paper of L. Toth, JIS 13 (2010) 10.1.2

Laszlo Toth, A Gcd-Sum Function Over Regular Integers Modulo n, Journal of Integer Sequences, Vol. 12 (2009), Article 09.2.5

FORMULA

Dirichlet g.f. zeta(s-1)*product_p (1+p^(1-s)-p^(-s)). Dirichlet convolution of the series of absolute values of A097945 with A000027. - R. J. Mathar, Jun 11 2011

EXAMPLE

For n =8, the regular integers mod 8 are 1,3,5,7,8, so the sum of gcd's of 8 with these numbers is 12.

MAPLE

A176345 := proc(n)

    n*mul(2-1/p, p=numtheory[factorset](n)) ;

end proc:

seq(A176345(n), n=1..40) ; # R. J. Mathar, Sep 13 2016

PROG

(PARI) isregg(k, n) = {g = gcd(k, n); if ((n % g == 0) && (gcd(g, n/g) == 1), return(g), return(0)); } a(n) = sum(k=1, n, isregg(k, n)) \\ Michel Marcus, May 25 2013

CROSSREFS

Cf. A143869.

Sequence in context: A072522 A070111 A070117 * A101139 A102606 A102372

Adjacent sequences:  A176342 A176343 A176344 * A176346 A176347 A176348

KEYWORD

nonn,mult

AUTHOR

Jeffrey Shallit, Apr 15 2010

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 | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy .

Last modified December 6 14:49 EST 2016. Contains 278781 sequences.