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!)
A231117 Number of positive integers <= n and relatively prime to n which are squarefree if and only if n is squarefree. 1
1, 1, 2, 0, 3, 2, 5, 0, 2, 3, 7, 0, 8, 5, 6, 1, 11, 0, 12, 1, 8, 9, 15, 0, 7, 10, 5, 3, 17, 8, 19, 3, 13, 13, 15, 1, 23, 15, 17, 2, 26, 11, 28, 3, 6, 18, 30, 1, 16, 3, 21, 5, 32, 2, 25, 4, 23, 23, 36, 1, 37, 25, 10, 6, 30, 18, 41, 6, 29, 22, 44, 2, 45, 30, 11, 7, 36, 22, 49, 4, 17, 32 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 1..10000
FORMULA
a(n) = A073311(n) if n is squarefree or phi(n) - A073311(n) otherwise. (Where phi is given by A000010)
a(n) = A008966(n)*A073311(n) + A107078(n)*A073312(n). - Antti Karttunen, Nov 26 2013
EXAMPLE
a(4) = 0 because 4 is not squarefree and phi(4) - A073311(4) = 2 - 2 = 0.
PROG
(PARI) a(n)=my(s=sum(i=1, n, gcd(n, i)==1&&issquarefree(i))); if(issquarefree(n), s, eulerphi(n)-s) \\ Charles R Greathouse IV, Nov 05 2013
CROSSREFS
Sequence in context: A279675 A169646 A349125 * A021496 A241830 A151929
KEYWORD
nonn
AUTHOR
Irina Gerasimova, Nov 03 2013
EXTENSIONS
a(4) corrected and a(54) inserted by Charles R Greathouse IV, Nov 05 2013
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 March 28 12:26 EDT 2024. Contains 371254 sequences. (Running on oeis4.)