The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A132952 a(n) is the number of isolated totatives of n. 4
0, 1, 0, 2, 0, 2, 0, 4, 0, 4, 0, 4, 0, 6, 2, 8, 0, 6, 0, 8, 2, 10, 0, 8, 0, 12, 0, 12, 0, 8, 0, 16, 2, 16, 2, 12, 0, 18, 2, 16, 0, 12, 0, 20, 6, 22, 0, 16, 0, 20, 2, 24, 0, 18, 2, 24, 2, 28, 0, 16, 0, 30, 6, 32, 2, 20, 0, 32, 2, 24, 0, 24, 0, 36, 10, 36, 2, 24, 0, 32, 0, 40, 0, 24, 2, 42, 2, 40, 0 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,4
COMMENTS
An isolated totative, k, of n is a positive integer which is less than and coprime to n and is such that neither (k-1) nor (k+1) are coprime to n.
a(2n) = phi(2n), where phi(n) = A000010(n).
If k is an isolated totative so is n-k. - Robert G. Wilson v, Sep 13 2007
a(n)=0 for n's: A061345 "Odd prime powers". - Robert G. Wilson v, Sep 13 2007
LINKS
Eric Weisstein's World of Mathematics, Totative.
EXAMPLE
The positive integers which are <= 15 and are coprime to 15 are 1,2,4,7,8,11,13,14. Of these, 1 and 2 are adjacent, 7 and 8 are adjacent and 13 and 14 are adjacent. So the isolated totatives of 15 are 4 and 11. There are 2 of these, so a(15) = 2.
MATHEMATICA
fQ[k_, n_] := GCD[k, n] == 1 && GCD[k - 1, n] > 1 && GCD[k + 1, n] > 1; f[n_] := Length@ Select[ Rest[ Range@n - 1], fQ[ #, n] &]; Array[f, 89] (* Robert G. Wilson v *)
PROG
(PARI) A132952(n) = { my(s=0, pg=0, g=1, ng); for(k=1, n-1, if((1!=(ng=gcd(n, k+1)))&&(1==g)&&(1!=pg), s++); pg = g; g = ng); (s); }; \\ Antti Karttunen, Nov 01 2018
CROSSREFS
Cf. A132953.
Sequence in context: A346773 A362208 A167156 * A319998 A336120 A029187
KEYWORD
nonn
AUTHOR
Leroy Quet, Sep 05 2007
EXTENSIONS
Edited and extended by Robert G. Wilson v, Sep 13 2007
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 June 1 15:48 EDT 2024. Contains 373025 sequences. (Running on oeis4.)