This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A109671 #16 Jan 12 2014 12:33:14 %S A109671 1,1,2,1,1,2,3,1,2,1,1,2,3,3,6,1,5,2,3,1,2,1,1,2,3,3,6,3,3,6,9,1,8,5, %T A109671 3,2,1,3,4,1,3,2,1,1,2,1,1,2,3,3,6,3,3,6,9,3,6,3,3,6,9,9,18,1,17,8,9, %U A109671 5,4,3,1,2,3,1,2,3,5,4,1,1,2,3,5,2,3,1,2,1,1,2,3,1,2,1,1,2,3,3,6,3,3,6,9,3 %N A109671 a(1)=1; thereafter, a(2n)=a(n), a(2n+1) is the smallest positive number such that |a(2n+1)-a(2n-1)|=a(n). %C A109671 A variant of the semi-Fibonacci numbers A030067. %C A109671 Self-describing: the sequence of the absolute differences between odd-indexed terms is the sequence itself. %C A109671 It appears that the record values form sequence A038754 and occur at indices of the form 2^k-1. - _N. J. A. Sloane_, May 02 2010 %C A109671 Does the sequence contain every positive integer (cf. A169741)? %H A109671 N. J. A. Sloane, <a href="/A109671/b109671.txt">Table of n, a(n) for n = 1..10000</a> %p A109671 f:=proc(n) option remember; local t1; %p A109671 if n = 1 then 1 %p A109671 elif n mod 2 = 0 then f(n/2) %p A109671 else t1:= f(n-2)-f((n-1)/2); %p A109671 if t1 > 0 then t1 else f(n-2)+f((n-1)/2) fi fi end; %t A109671 a[1] = 1; a[n_?EvenQ] := a[n/2]; a[n_] := a[n] = If[t1 = a[n-2] - a[(n-1)/2]; t1 > 0, t1, a[n-2] + a[(n-1)/2]]; Table[a[n], {n, 1, 104}] (* _Jean-François Alcover_, Nov 27 2012, after Maple *) %o A109671 (Haskell) %o A109671 import Data.List (transpose) %o A109671 a109671 n = a109671_list !! (n-1) %o A109671 a109671_list = concat (transpose [1 : f 1 a109671_list, a109671_list]) %o A109671 where f u (v:vs) = y : f y vs where %o A109671 y = if u > v then u - v else u + v %o A109671 -- _Reinhard Zumkeller_, Jul 07 2013 %Y A109671 A variant of A030067. Cf. A169741-A169745. %K A109671 nonn,nice %O A109671 1,3 %A A109671 _Eric Angelini_, Apr 30 2010 %E A109671 Edited by _N. J. A. Sloane_, May 02 2010