A126792 Removing the first, fourth, seventh, tenth ... term of the sequence yields the original sequence, augmented by 1.
0, 1, 2, 1, 3, 2, 2, 4, 3, 1, 3, 5, 3, 4, 2, 2, 4, 6, 2, 4, 5, 4, 3, 3, 3, 5, 7, 1, 3, 5, 3, 6, 5, 5, 4, 4, 3, 4, 6, 4, 8, 2, 2, 4, 6, 2, 4, 7, 4, 6, 6, 6, 5, 5, 2, 4, 5, 4, 7, 5, 5, 9, 3, 4, 3, 5, 3, 7, 3, 3, 5, 8, 3, 5, 7, 5, 7, 7, 7, 6, 6, 1, 3, 5, 3, 6, 5, 5, 8, 6, 3, 6, 10, 6, 4, 5, 5, 4, 6, 5, 4, 8, 4, 4, 4
Offset: 0
Keywords
Examples
Removing parenthesised terms (0),1,2,(1),3,2,(2),4,3,(1),3,5,(3),4,.. leaves 1,2, 3,2, 4,3, 3,5, 4,.. which is the original sequence with 1 added to each term.
References
- Article by J-P. Delahaye in Pour la Science, mars 2007.
Crossrefs
Cf. A117943.
Programs
-
Maple
liz:=n->if n=0 then 0 elif modp(n,3)=0 then liz(n/3) else 1+liz(n-1-floor(n/3)) fi;
-
Mathematica
a[0] = 0; a[n_] := a[n] = If[Mod[n, 3] == 0, a[n/3], a[Floor[(2*n - 1)/3]] + 1]; Table[a[n], {n, 0, 104}] (* Jean-François Alcover, Sep 27 2013 *)
Comments