[go: up one dir, main page]

login
A298606
Partial sums of A293630.
2
1, 3, 4, 5, 6, 8, 9, 10, 12, 13, 14, 15, 17, 18, 20, 21, 22, 23, 25, 26, 27, 29, 30, 31, 32, 33, 35, 36, 37, 38, 40, 41, 42, 44, 45, 46, 47, 48, 50, 51, 52, 53, 55, 56, 57, 59, 60, 61, 62, 64, 65, 67, 68, 69, 70, 72, 73, 74, 76, 77, 78, 79, 80, 82, 83, 84, 85
OFFSET
1,2
COMMENTS
a(n) is n plus the number of 2's in A293630 on the interval 1..n.
FORMULA
a(A291481(n)) = A298590(n).
Lim_{k->infinity} a(k)/k = 1.275261... (see A296564).
a(n) ~ d*n, where d = 1.275261... (see A296564).
EXAMPLE
A293630 begins 1, 2, 1, 1, 1, 2, 1, 1, 2, ... so:
a(1) = 1.
a(2) = 1 + 2 = 3.
a(3) = 1 + 2 + 1 = 4.
a(4) = 1 + 2 + 1 + 1 = 5.
...
MATHEMATICA
Accumulate@ Nest[Join @@ {#, Join @@ ConstantArray[Most@ #, Last@ #]} &, {1, 2}, 5] (* Michael De Vlieger, Jan 22 2018 *)
PROG
(PARI) lista(nn) = my(v=[1, 2], l, w, s=0); for(n=1, nn, l=length(v); w=vector(l-1, i, v[i]); v=concat(v, if(v[l]-1, concat(w, w), w))); for(i=1, length(v), s += v[i]; print1(s, ", "))
CROSSREFS
KEYWORD
nonn
AUTHOR
Iain Fox, Jan 22 2018
STATUS
approved