We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a6a8c3b commit be462dcCopy full SHA for be462dc
src/sage/combinat/k_regular_sequence.py
@@ -127,10 +127,23 @@ def __init__(self, parent, mu, left=None, right=None):
127
EXAMPLES::
128
129
sage: Seq2 = kRegularSequenceSpace(2, ZZ)
130
- sage: Seq2((Matrix([[3, 6], [0, 1]]), Matrix([[0, -6], [1, 5]])),
131
- ....: vector([0, 1]), vector([1, 0])).transposed()
+ sage: S = Seq2((Matrix([[3, 6], [0, 1]]), Matrix([[0, -6], [1, 5]])),
+ ....: vector([0, 1]), vector([1, 0])).transposed(); S
132
2-regular sequence 0, 1, 3, 5, 9, 11, 15, 19, 27, 29, ...
133
134
+ We can access the coefficients of a sequence by
135
+ ::
136
+
137
+ sage: S[5]
138
+ 11
139
140
+ or iterating over the first, say `10`, by
141
142
143
+ sage: from itertools import islice
144
+ sage: list(islice(S, 10))
145
+ [0, 1, 3, 5, 9, 11, 15, 19, 27, 29]
146
147
.. SEEALSO::
148
149
:doc:`k-regular sequence <k_regular_sequence>`,
0 commit comments