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

 

Logo

Thanks to everyone who made a donation during our annual appeal!
To see the list of donors, or make a donation, see the OEIS Foundation home page.

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A035532 a(n) = 2*phi(n) if n composite, or 2*phi(n) - (A000120(n)-1) if n prime, where phi = A000010, Euler's totient function, and a(1) = 1. 2
1, 2, 3, 4, 7, 4, 10, 8, 12, 8, 18, 8, 22, 12, 16, 16, 31, 12, 34, 16, 24, 20, 41, 16, 40, 24, 36, 24, 53, 16, 56, 32, 40, 32, 48, 24, 70, 36, 48, 32, 78, 24, 81, 40, 48, 44, 88, 32, 84, 40, 64, 48, 101, 36, 80, 48, 72, 56, 112, 32, 116, 60, 72, 64, 96, 40, 130, 64, 88, 48, 137 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

LINKS

Reinhard Zumkeller, Table of n, a(n) for n = 1..10000

FORMULA

a(n) = 2*A000010(n) - A010051(n)*A048881(n-1), for n > 1. - Reinhard Zumkeller, Feb 04 2015, edited by M. F. Hasler, Mar 10 2018

For many values of n, the inverse Möbius transform of this sequence (g.f.: Sum a(n)*x^n/(1-x^n)) equals A005187, but this is not the case for composite n such that A297115(n) <> 0. The equality does hold for A297111 instead. - Antti Karttunen & M. F. Hasler, Mar 10 2018

MATHEMATICA

Insert[Table[If[PrimeQ[n], 2*EulerPhi[n] - DigitCount[n, 2][[1]] + 1, 2*EulerPhi[n]], {n, 2, 100}], 1, 1] (* Stefan Steinerberger, Apr 11 2006 *)

PROG

(Haskell)

a035532 1 = 1

a035532 n = if a010051' n == 0 then phi2 else phi2 - a000120 n + 1

            where phi2 = 2 * a000010 n

-- Reinhard Zumkeller, Feb 04 2015

(PARI) A035532(n)=2*eulerphi(n)-if(isprime(n), hammingweight(n)-1, n==1) \\ M. F. Hasler, Mar 10 2018

CROSSREFS

Cf. A000010, A010051, A035531, A048881, A297111, A297115.

Sequence in context: A267695 A138676 A297111 * A176535 A251716 A123498

Adjacent sequences:  A035529 A035530 A035531 * A035533 A035534 A035535

KEYWORD

nonn,easy

AUTHOR

Daniele Parisse (daniele.parisse(AT)m.dasa.de)

EXTENSIONS

More terms from James A. Sellers

Definition amended for a(1) = 1 by M. F. Hasler, Mar 10 2018

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 January 17 18:42 EST 2019. Contains 319251 sequences. (Running on oeis4.)