login
A293976
a(2n) = a(2n-1) + a(n) for n >= 1, a(2n+1) = a(2n) + 1, a(0) = 0.
2
0, 1, 2, 3, 5, 6, 9, 10, 15, 16, 22, 23, 32, 33, 43, 44, 59, 60, 76, 77, 99, 100, 123, 124, 156, 157, 190, 191, 234, 235, 279, 280, 339, 340, 400, 401, 477, 478, 555, 556, 655, 656, 756, 757, 880, 881, 1005, 1006, 1162, 1163, 1320, 1321, 1511, 1512, 1703
OFFSET
0,3
COMMENTS
A variant of A033485.
Starting with a(1) = 1, the sequence can also be defined as the smallest increasing sequence equal to the sequence of differences between pairs of terms: a(n) = a(2n) - a(2n-1).
See A293977 for a variant which is not monotonic but a permutation of the nonnegative integers.
LINKS
Eric Angelini, Successive weighing scales, post to the SeqFan list, June 14, 2010.
MAPLE
f:= proc(n) option remember;
if n::even then procname(n-1) + procname(n/2) else procname(n-1)+1 fi;
end proc:
f(0):= 0:
map(f, [$0..100]); # Robert Israel, Nov 27 2025
MATHEMATICA
A293976[n_] := A293976[n] = If[n == 0, 0, A293976[n-1] + If[OddQ[n], 1, A293976[n/2]]];
Array[A293976, 100, 0] (* Paolo Xausa, Nov 27 2025 *)
PROG
(PARI) A293976_vec(n, A=List(1))=for(i=1, n\2, listput(A, A[#A]+A[i]); listput(A, A[#A]+1)); concat(0, Vec(A))
CROSSREFS
Sequence in context: A128689 A116137 A178611 * A173492 A133030 A014822
KEYWORD
nonn
AUTHOR
M. F. Hasler, Oct 27 2017
STATUS
approved