Package sage :: Package combinat :: Module sloane_functions :: Class A000009
[hide private]
[frames] | no frames]

Class A000009

source code

                      object --+        
                               |        
structure.sage_object.SageObject --+    
                                   |    
                      SloaneSequence --+
                                       |
                                      A000009

Instance Methods [hide private]
 
__init__(self)
Number of partitions of $n$ into odd parts.
source code
 
_repr_(self)
EXAMPLES:...
source code
 
cf(self)
EXAMPLES:...
source code
 
_precompute(self, how_many=50)
EXAMPLES:...
source code
 
_eval(self, n)
EXAMPLES:...
source code
 
list(self, n)
EXAMPLES:...
source code

Inherited from SloaneSequence: __call__, __cmp__, __getitem__, __iter__

Inherited from structure.sage_object.SageObject: __hash__, __new__, __repr__, _axiom_, _axiom_init_, _gap_, _gap_init_, _gp_, _gp_init_, _interface_, _interface_init_, _interface_is_cached_, _kash_, _kash_init_, _macaulay2_, _macaulay2_init_, _magma_, _magma_init_, _maple_, _maple_init_, _mathematica_, _mathematica_init_, _maxima_, _maxima_init_, _octave_, _octave_init_, _pari_, _pari_init_, _r_init_, _sage_, _singular_, _singular_init_, category, db, dump, dumps, plot, rename, reset_name, save, version

Inherited from object: __delattr__, __getattribute__, __reduce__, __reduce_ex__, __setattr__, __str__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self)
(Constructor)

source code 

Number of partitions of $n$ into odd parts.

INPUT:
    n -- non negative integer

OUTPUT:
    integer -- function value

EXAMPLES:
    sage: a = sloane.A000009;a
    Number of partitions of n into odd parts.
    sage: a(0)
    1
    sage: a(1)
    1
    sage: a(13)
    18
    sage: a.list(14)
    [1, 1, 1, 2, 2, 3, 4, 5, 6, 8, 10, 12, 15, 18]       

AUTHOR:
    -- Jaap Spies (2007-01-30)

Overrides: SloaneSequence.__init__

_repr_(self)

source code 

EXAMPLES:
    sage: sloane.A000009._repr_()
    'Number of partitions of n into odd parts.'

Overrides: SloaneSequence._repr_

cf(self)

source code 

EXAMPLES:
    sage: it = sloane.A000009.cf()
    sage: [it.next() for i in range(14)]
    [1, 1, 1, 2, 2, 3, 4, 5, 6, 8, 10, 12, 15, 18]

_precompute(self, how_many=50)

source code 

EXAMPLES:
    sage: initial = len(sloane.A000009._b)
    sage: sloane.A000009._precompute(10)
    sage: len(sloane.A000009._b) - initial == 10
    True

_eval(self, n)

source code 

EXAMPLES:
    sage: [sloane.A000009._eval(i) for i in range(14)]
    [1, 1, 1, 2, 2, 3, 4, 5, 6, 8, 10, 12, 15, 18]

Overrides: SloaneSequence._eval

list(self, n)

source code 

EXAMPLES:
    sage: sloane.A000009.list(14)
    [1, 1, 1, 2, 2, 3, 4, 5, 6, 8, 10, 12, 15, 18]

Overrides: SloaneSequence.list