Search: a295511 -id:a295511
|
|
A295510
|
|
The numerators of the fractions in the Schinzel-Sierpiński tree A295511, read across levels. Also an encoding of Stern's diatomic series A002487.
|
|
+20
3
|
|
|
2, 2, 3, 3, 7, 5, 7, 2, 17, 7, 11, 5, 11, 13, 5, 3, 241, 17, 29, 7, 17, 31, 43, 13, 43, 11, 17, 13, 29, 193, 11, 2, 13, 11, 37, 73, 67, 29, 41, 7, 23, 97, 79, 31, 73, 29, 19, 5, 37, 43, 73, 31, 157, 17, 23, 13, 41, 43, 199, 17, 19, 11, 7
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
LINKS
|
|
|
EXAMPLE
|
The triangle (row lengths are 2^(n-1)) starts:
1: 2
2: 2, 3
3: 3, 7, 5, 7
4: 2, 17, 7, 11, 5, 11, 13, 5
5: 3, 241, 17, 29, 7, 17, 31, 43, 13, 43, 11, 17, 13, 29, 193, 11
|
|
PROG
|
(Sage) # uses[SSETree from A295511]
if n == 1: return [2]
return [r.numerator() for r in SSETree(n)]
for n in (1..6): print(A295510_row(n))
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,tabf
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|
|
A295509
|
|
Maxima of the numerators (and also of the denominators) of row n in the Schinzel-Sierpinski tree of fractions A295511.
|
|
+20
1
|
|
|
2, 3, 7, 17, 241, 199, 647, 1117, 4231, 8161, 15361, 28057, 67801, 308509, 263101, 515089, 1525921, 2103817, 3376459
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
LINKS
|
|
|
PROG
|
(Sage)
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,more
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|
|
A295512
|
|
The Euclid tree with root 1 encoded by semiprimes, read across levels.
|
|
+10
4
|
|
|
4, -6, 6, -21, 35, -35, 21, -10, 221, -77, 55, -55, 77, -221, 10, -33, 46513, -493, 377, -119, 187, -1333, 559, -559, 1333, -187, 119, -377, 493, -46513, 33, -14, 143, -209, 629, -14527, 2881, -1189, 533, -161, 391, -15229, 2449, -2263, 3139, -1073, 95, -95
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
The Euclid tree with root 1 is A295515 (sometimes called Calkin-Wilf tree).
For a positive rational r we use the Schinzel-Sierpiński encoding r -> [p, q] as described in A295511 and encode r as sgn*p*q where sgn is -1 if r < 1, else +1.
Apart from a(1) all terms are squarefree.
|
|
REFERENCES
|
E. Dijkstra, Selected Writings on Computing, Springer, 1982, p. 232.
|
|
LINKS
|
|
|
EXAMPLE
|
The tree starts:
4
-6 6
-21 35 -35 21
-10 221 -77 55 -55 77 -221 10
|
|
MAPLE
|
EuclidTree := proc(n) local k, DijkstraFusc;
DijkstraFusc := proc(m) option remember; local a, b, n; a := 1; b := 0; n := m;
while n > 0 do if type(n, odd) then b := a+b else a := a+b fi; n := iquo(n, 2) od; b end:
seq(DijkstraFusc(k)/DijkstraFusc(k+1), k=2^(n-1)..2^n-1) end:
SchinzelSierpinski := proc(l) local a, b, r, p, q, sgn;
a := numer(l); b := denom(l); q := 2; sgn := `if`(a < b, -1, 1);
while q < 1000000000 do r := a*(q - 1); if r mod b = 0 then p := r/b + 1;
if isprime(p) then return(sgn*p*q) fi fi; q := nextprime(q); od;
print("Search limit reached!", a, b) end:
Tree := level -> seq(SchinzelSierpinski(l), l=EuclidTree(level)): seq(Tree(n), n=1..6);
|
|
CROSSREFS
|
|
|
KEYWORD
|
sign,tabf
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|
|
A295515
|
|
The Euclid tree, read across levels.
|
|
+10
4
|
|
|
0, 1, 1, 1, 1, 2, 2, 1, 1, 3, 3, 2, 2, 3, 3, 1, 1, 4, 4, 3, 3, 5, 5, 2, 2, 5, 5, 3, 3, 4, 4, 1, 1, 5, 5, 4, 4, 7, 7, 3, 3, 8, 8, 5, 5, 7, 7, 2, 2, 7, 7, 5, 5, 8, 8, 3, 3, 7, 7, 4, 4, 5, 5, 1, 1, 6, 6, 5, 5, 9, 9, 4, 4, 11, 11, 7, 7, 10, 10, 3, 3, 11, 11, 8, 8
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,6
|
|
COMMENTS
|
Set N(x) = 1 + floor(x) - frac(x) and let '"' denote the ditto operator, referring to the previously computed expression. Assume the first expression is '0'. Then [0, repeat(N("))] will generate the natural numbers 0, 1, 2, 3, ... and [0, repeat(1/N("))] will generate the rational numbers 0/1, 1/1, 1/2, 2/1, 1/3, 3/2, ... Every reduced nonnegative rational number r appears exactly once in this list as a relatively prime pair [n, d] = r = n/d. We list numerator and denominator one after the other in the sequence.
The apt name 'Euclid tree' is taken from the exposition of Malter, Schleicher and Don Zagier. It is sometimes called the Calkin-Wilf tree. The enumeration is based on Stern's diatomic series (which is a subsequence) and computed by a modification of Dijkstra's 'fusc' function.
The tree listed has root 0, the variant with root 1 is more widely used. Seen as sequences the difference between the two trees is trivial: it is enough to leave out the first two terms; but as trees they are markedly different (see the example section).
|
|
REFERENCES
|
M. Aigner and G. M. Ziegler, Proofs from The Book, Springer-Verlag, Berlin, 3rd ed., 2004.
|
|
LINKS
|
|
|
FORMULA
|
Some characteristics in comparison to the tree with root 1, seen as a table with T(n,k) for n >= 1 and 1 <= k <= 2^(n-1). Here Tr(n,k), Tp(n,k), Tq(n,k) denotes the fraction r, the numerator of r and the denominator of r in row n and column k respectively.
With root 0: With root 1:
Root Tr(1,1) 0/1 1/1
Tp(n,1) 0,1,2,3,... 1,1,1,1,...
Tp(n,2^(n-1)) 0,1,2,3,... 1,2,3,4,...
Tq(n,1) 1,1,1,1,... 1,2,3,4,...
Tq(n,2^(n-1)) 1,2,3,4,... 1,1,1,1,...
Sum_k Tp(n,k)Tq(n,k) 0,3,17,81,... A052913-1 1,4,18,82,... A052913
----
|
|
EXAMPLE
|
The tree with root 0 starts:
[0/1]
[1/1, 1/2]
[2/1, 1/3, 3/2, 2/3]
[3/1, 1/4, 4/3, 3/5, 5/2, 2/5, 5/3, 3/4]
[4/1, 1/5, 5/4, 4/7, 7/3, 3/8, 8/5, 5/7, 7/2, 2/7, 7/5, 5/8, 8/3, 3/7, 7/4, 4/5]
.
The tree with root 1 starts:
[1/1]
[1/2, 2/1]
[1/3, 3/2, 2/3, 3/1]
[1/4, 4/3, 3/5, 5/2, 2/5, 5/3, 3/4, 4/1]
[1/5, 5/4, 4/7, 7/3, 3/8, 8/5, 5/7, 7/2, 2/7, 7/5, 5/8, 8/3, 3/7, 7/4, 4/5, 5/1]
|
|
MAPLE
|
# First implementation: use it only if you are not afraid of infinite loops.
a := x -> 1/(1+floor(x)-frac(x)): 0; do a(%) od;
# Second implementation:
lusc := proc(m) local a, b, n; a := 0; b := 1; n := m; while n > 0 do
if n mod 2 = 1 then b := a + b else a := a + b fi; n := iquo(n, 2) od; a end:
R := n -> 3*2^(n-1)-1 .. 2^n: # The range of level n.
EuclidTree_rat := n -> [seq(lusc(k+1)/lusc(k), k=R(n), -1)]:
EuclidTree_num := n -> [seq(lusc(k+1), k=R(n), -1)]:
EuclidTree_den := n -> [seq(lusc(k), k=R(n), -1)]:
EuclidTree_pair := n -> ListTools:-Flatten([seq([lusc(k+1), lusc(k)], k=R(n), -1)]):
seq(print(EuclidTree_pair(n)), n=1..5);
|
|
PROG
|
(Sage)
if n == 1: return 0
M = [0, 1]
for b in (n//2 - 1).bits():
M[b] = M[0] + M[1]
return M[1]
print([A295515(n) for n in (1..85)])
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
Search completed in 0.006 seconds
|