Skip to content

Commit 3ae7be4

Browse files
committed
readme
1 parent 17b680e commit 3ae7be4

1 file changed

Lines changed: 23 additions & 23 deletions

File tree

README.md

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<img src="https://github.com/OpenLibMathSeq/IntegerSequences.jl/blob/master/SequencesLogo.jpg">
22

3-
[![Build status](https://travis-ci.org/OpenLibMathSeq/IntegerSequences.jl.svg?branch=master)](https://travis-ci.org/OpenLibMathSeq/IntegerSequences.jl)
4-
[![Build status](https://ci.appveyor.com/api/projects/status/3qt5x8eej5kf2w98?svg=true)](https://ci.appveyor.com/project/OpenLibMathSeq/IntegerSequences.jl)
5-
[![Docs dev](https://img.shields.io/badge/docs-dev-blue.svg)](https://openlibmathseq.github.io/IntegerSequences.jl/dev)
3+
[![Build status](https://travis-ci.org/OpenLibMathSeq/Sequences.jl.svg?branch=master)](https://travis-ci.org/OpenLibMathSeq/Sequences.jl)
4+
[![Build status](https://ci.appveyor.com/api/projects/status/1irsamfi66jnk71m/branch/master?svg=true)](https://ci.appveyor.com/project/OpenLibMathSeq/integersequences-jl)
5+
[![Docs stable](https://img.shields.io/badge/docs-dev-blue.svg)](https://openlibmathseq.github.io/Sequences.jl/stable)
66
--
77

88
The package is tested against, and being developed for, Julia 1.1 and above on Linux, macOS, and Windows64.
@@ -43,26 +43,26 @@ Four of those are based on the iteration protocol `FiboIterate` which is kept in
4343
The implementations are:
4444

4545
* Iterate over the first ``n`` Fibonacci numbers.
46-
```javascript
46+
```
4747
I000045(n) = FiboIterate(n)
4848
```
4949

5050
* Iterate over the Fibonacci numbers which do not exceed ``n``.
51-
```javascript
51+
```
5252
F000045(n) = takewhile(k -> k <= n, FiboIterate(n+1))
5353
```
5454

5555
* Return the first ``n`` Fibonacci numbers in an array.
56-
```javascript
56+
```
5757
L000045(n) = collect(FiboIterate(n))
5858
```
5959
Alternatively one can use a generating function if available:
60-
```javascript
60+
```
6161
L000045(n) = coefficients(G000045, n)
6262
```
6363

6464
* Return the ``n``-th Fibonacci number.
65-
```javascript
65+
```
6666
function V000045(n)
6767
F = ZZ[1 1; 1 0]
6868
Fn = F^n
@@ -71,15 +71,15 @@ end
7171
```
7272

7373
* Fibonacci function for real values, returns a Float64.
74-
```javascript
74+
```
7575
function R000045(x::Float64)
7676
(Base.MathConstants.golden^x - cos(x Base.MathConstants.pi)
7777
Base.MathConstants.golden^(-x)) / sqrt(5)
7878
end
7979
```
8080

8181
* Query if ``n`` is a Fibonacci number, returns a Bool.
82-
```javascript
82+
```
8383
function is000045(n)
8484
d = 0
8585
for f in FiboIterate(n+2)
@@ -97,27 +97,27 @@ For the abundant numbers (i.e. numbers n where the sum of divisors exceeds 2n) w
9797
is005101, I005101, F005101, L005101, V005101
9898

9999
* Is ``n`` an abundant number, i.e. is ``σ(n) > 2 n `` ?
100-
```javascript
100+
```
101101
is005101(n) = σ(n) > 2 n
102102
```
103103

104104
* Iterate over the first ``n`` abundant numbers.
105-
```javascript
105+
```
106106
I005101(n) = takefirst(isAbundant, n)
107107
```
108108

109109
* Iterate over the abundant numbers which do not exceed ``n``.
110-
```javascript
110+
```
111111
F005101(n) = filter(isAbundant, 1:n)
112112
```
113113

114114
* Return the first ``n`` abundant numbers in an array.
115-
```javascript
115+
```
116116
L005101(n) = collect(I005101(n))
117117
```
118118

119119
* Return the value of the ``n``-th abundant number.
120-
```javascript
120+
```
121121
V005101(n) = nth(I005101(n), n)
122122
```
123123

@@ -136,7 +136,7 @@ that of Julia.
136136
The matrix view of a number triangle of dimension dim has dim rows and the n-th row has length n.
137137
Note that the rows are enumerated like the terms 0, 1, 2, ...
138138

139-
```javascript
139+
```
140140
T(0,0) row 0
141141
T(1,0) T(1,1) row 1
142142
T(2,0) T(2,1) T(2,2) row 2
@@ -149,7 +149,7 @@ chain of lists. On the first level a triangle iterates over the rows of the
149149
triangle and on the secondary level over the terms of the rows, which are
150150
given by the user-supplied function t(n, k).
151151

152-
```javascript
152+
```
153153
T = (row(0), row(1), ..., row(dim-1))
154154
Row(T, n) = [t(n, 0), t(n, 1), ..., t(n, n)]
155155
```
@@ -160,7 +160,7 @@ Sequence A097805 gives the number of ordered partitions of n into k parts.
160160
The corresponding triangle can be constructed like this:
161161
* Triangle T097805 based of explicite value.
162162

163-
```javascript
163+
```
164164
V097805(n, k) = k == 0 ? k^n : binomial(n-1, k-1)
165165
T097805(dim) = Triangle(dim, V097805)
166166
```
@@ -170,7 +170,7 @@ To support this the type RecTriangle has a buffer which saves the
170170
previously computed row. This buffer can be accessed through a function 'prevrow'.
171171

172172
* Triangle T097805 based on recurrence.
173-
```javascript
173+
```
174174
R097805(n, k, prevrow) = k == 0 ? k^n : prevrow(k-1) + prevrow(k)
175175
T097805(dim) = RecTriangle(dim, R097805)
176176
```
@@ -185,20 +185,20 @@ A nice alternative for 'prevrow' is 'Tn_1' because Tn_1(k) = T(n-1, k) in matrix
185185
The following functions are supplied:
186186

187187
* Return the row n (0 <= n < dim) of a triangle.
188-
```javascript
188+
```
189189
Row(T::Triangle, n::Int, rev=true) = rev ? reversed(T(n)) : T(n)
190190
```
191191

192192
If in the call the third -- optional -- parameter `rev` is true the
193193
row is returned in reversed order.
194194

195195
* Return the triangle as a list of rows.
196-
```javascript
196+
```
197197
TriangularArray(T::Triangle) = [row for row in T]
198198
```
199199

200200
* Return the triangle as a list of integers.
201-
```javascript
201+
```
202202
TriangleToList(T::Triangle) = [k for row in T for k in row]
203203
```
204204

@@ -207,7 +207,7 @@ returns a list of integers of length dim(dim + 1)/2. Conversely, given
207207
an integer list of length n(n + 1)/2 the function ListToTriangle returns a
208208
triangle as a chain of iterators.
209209

210-
```javascript
210+
```
211211
ListToTriangle(A::Array{})
212212
```
213213

0 commit comments

Comments
 (0)