|
|
A355075
|
|
a(n) is the numerator of Sum_{k = 0..n} fusc(k)/fusc(k+1) (where fusc is Stern's diatomic series A002487).
|
|
2
|
|
|
0, 1, 3, 7, 23, 16, 6, 9, 37, 127, 671, 821, 169, 63, 33, 41, 207, 439, 3153, 10439, 21193, 22537, 23137, 26077, 26317, 27493, 14009, 5043, 729, 191, 39, 44, 265, 1361, 4133, 8671, 96101, 694487, 704189, 750389, 754169, 1546453, 20325649, 4252517, 4282547
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,3
|
|
LINKS
|
Rémy Sigrist, Table of n, a(n) for n = 0..8192
Index entries for sequences related to Stern's sequences
|
|
EXAMPLE
|
For n = 4:
- the first 5 terms of A002487 are: 0, 1, 1, 2, 1, 3,
- 0/1 + 1/1 + 1/2 + 2/1 + 1/3 = 23/6,
- so a(4) = 23.
|
|
PROG
|
(PARI) fusc(n)=local(a=1, b=0); while(n>0, if(bitand(n, 1), b+=a, a+=b); n>>=1); b \\ after Charles R Greathouse IV in A002487
{ s = 0; for (n=0, 44, print1 (numerator(s+=fusc(n)/fusc(n+1))", ")) }
(Python)
from fractions import Fraction
from functools import reduce
def A355075(n): return sum(Fraction(reduce(lambda x, y:(x[0], x[0]+x[1]) if int(y) else (x[0]+x[1], x[1]), bin(k)[-1:1:-1], (1, 0))[1], reduce(lambda x, y:(x[0], x[0]+x[1]) if int(y) else (x[0]+x[1], x[1]), bin(k+1)[-1:1:-1], (1, 0))[1]) for k in range(n+1)).numerator # Chai Wah Wu, Jun 19 2022
|
|
CROSSREFS
|
Cf. A002487, A174868, A355076 (corresponding denominators).
Sequence in context: A082271 A229438 A069505 * A173878 A225264 A032403
Adjacent sequences: A355072 A355073 A355074 * A355076 A355077 A355078
|
|
KEYWORD
|
nonn,look,frac
|
|
AUTHOR
|
Rémy Sigrist, Jun 18 2022
|
|
STATUS
|
approved
|
|
|
|