|
|
A359050
|
|
a(n) is the least k such that fusc(k) + fusc(k+1) = n, where "fusc" is Stern's diatomic series (A002487).
|
|
2
|
|
|
0, 1, 2, 4, 5, 16, 9, 10, 17, 19, 18, 22, 21, 34, 36, 46, 38, 37, 41, 94, 42, 70, 69, 76, 75, 73, 77, 133, 74, 82, 86, 139, 137, 85, 141, 157, 138, 268, 162, 148, 146, 289, 150, 154, 182, 166, 149, 283, 165, 169, 276, 274, 281, 637, 170, 292, 282, 307, 314
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,3
|
|
COMMENTS
|
This sequence is well defined:
- a(1) = 0,
- for any n > 1, 1/(n-1) is in reduced form, so fusc(k) = 1 and fusc(k+1) = n-1 for some k, and a(n) <= k.
|
|
LINKS
|
|
|
FORMULA
|
|
|
EXAMPLE
|
The first terms are:
n a(n) fusc(a(n)) fusc(a(n)+1)
--- ----- ---------- ------------
1 0 0 1
2 1 1 1
3 2 1 2
4 4 1 3
5 5 3 2
6 16 1 5
7 9 4 3
8 10 3 5
9 17 5 4
10 19 7 3
|
|
PROG
|
(PARI) See Links section.
(Python)
f, g, k = 0, 1, 0
while f+g-n:
k += 1
m, a = k+1, [1, 0]
while m:
a[m&1] = sum(a)
m >>=1
f, g = g, a[1]
|
|
CROSSREFS
|
|
|
KEYWORD
|
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|