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!)
A079530 a(n) = phi(n) - ceiling(sqrt(n)). 7
0, -1, 0, 0, 1, -1, 3, 1, 3, 0, 6, 0, 8, 2, 4, 4, 11, 1, 13, 3, 7, 5, 17, 3, 15, 6, 12, 6, 22, 2, 24, 10, 14, 10, 18, 6, 29, 11, 17, 9, 33, 5, 35, 13, 17, 15, 39, 9, 35, 12, 24, 16, 44, 10, 32, 16, 28, 20, 50, 8, 52, 22, 28, 24, 39, 11, 57, 23, 35, 15, 61, 15, 63, 27, 31, 27, 51, 15, 69, 23, 45 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,7
COMMENTS
a(n) >= 0 except for n = 2 and 6.
REFERENCES
D. S. Mitrinovic et al., Handbook of Number Theory, Kluwer, p. 9.
LINKS
EXAMPLE
a(6) = phi(6) - ceiling(sqrt(6)) = 2 - 3 = -1.
MAPLE
with(numtheory); A079530:=n->phi(n) - ceil(sqrt(n)); seq(A079530(k), k=1..100); # Wesley Ivan Hurt, Nov 01 2013
MATHEMATICA
Table[EulerPhi[n] - Ceiling[Sqrt[n]], {n, 100}] (* Wesley Ivan Hurt, Nov 01 2013 *)
PROG
(PARI) a(n)=eulerphi(n)-sqrtint(n-1)-1 \\ Charles R Greathouse IV, Nov 01 2013
(Magma) [EulerPhi(n) - Ceiling(Sqrt(n)): n in [1..100]]; // G. C. Greubel, Jan 14 2019
(Sage) [euler_phi(n) - ceil(sqrt(n)) for n in (1..100)] # G. C. Greubel, Jan 14 2019
(Python)
from math import isqrt
from sympy import totient
def A079530(n): return totient(n)-1-isqrt(n-1) # Chai Wah Wu, Jul 28 2022
CROSSREFS
Sequence in context: A191009 A082648 A174233 * A020815 A233931 A280725
KEYWORD
sign
AUTHOR
N. J. A. Sloane, Jan 23 2003
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 April 16 00:27 EDT 2024. Contains 371696 sequences. (Running on oeis4.)