| Home | Trees | Indices | Help |
|---|
|
|
object --+
|
structure.sage_object.SageObject --+
|
SloaneSequence --+
|
A000010
|
|||
|
|||
|
|||
|
|||
|
Inherited from Inherited from Inherited from |
|||
|
|||
|
Inherited from |
|||
|
|||
The integer sequence A000010 is Euler's totient function.
Number of positive integers $i < n$ that are relative prime to $n$.
Number of totatives of $n$.
Euler totient function $\phi(n)$: count numbers < $n$ and prime to $n$.
euler_phi is a standard SAGE function implemented in PARI
INPUT:
n -- positive integer
OUTPUT:
integer -- function value
EXAMPLES:
sage: a = sloane.A000010; a
Euler's totient function
sage: a(1)
1
sage: a(0)
Traceback (most recent call last):
...
ValueError: input n (=0) must be a positive integer
sage: a(11)
10
sage: a.list(12)
[1, 1, 2, 2, 4, 2, 6, 4, 6, 4, 10, 4]
sage: a(1/3)
Traceback (most recent call last):
...
TypeError: input must be an int, long, or Integer
AUTHOR:
-- Jaap Spies (2007-01-12)
|
EXAMPLES:
sage: sloane.A000010._repr_()
"Euler's totient function"
|
EXAMPLES:
sage: [sloane.A000010._eval(n) for n in range(1,11)]
[1, 1, 2, 2, 4, 2, 6, 4, 6, 4]
|
| Home | Trees | Indices | Help |
|---|
| Generated by Epydoc 3.0beta1 on Thu Jul 17 04:23:36 2008 | http://epydoc.sourceforge.net |