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 A007604 M0567 #30 Mar 15 2023 07:56:17 %S A007604 1,2,3,4,6,9,12,16,22,31,40,52,68,90,121,152,192,244,312,402,523,644, %T A007604 796,988,1232,1544,1946,2469,2992,3636,4432,5420,6652,8196,10142, %U A007604 12611,15080,18072,21708,26140,31560,38212,46408,56550,69161,81772,96852 %N A007604 a(n) = a(n-1) + a(n-1-(number of odd terms so far)). %C A007604 A003056(n) gives the number of odd terms in the first n terms of this sequence. Modulo 2, this sequence becomes A023531. - _T. D. Noe_, Jul 24 2007 %C A007604 The present definition was the original definition of this sequence. It was later changed to "Sequence formed from rows of triangle A046936", but this seems less satisfactory. - _N. J. A. Sloane_, Oct 26 2014 %D A007604 N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence). %H A007604 T. D. Noe, <a href="/A007604/b007604.txt">Table of n, a(n) for n = 1..1000</a> %p A007604 A[1]:= 1: A[2]:= 2: o:= 1: %p A007604 for n from 3 to 100 do %p A007604 A[n]:= A[n-1] + A[n-1-o]; %p A007604 if A[n]::odd then o:= o+1 fi %p A007604 od: %p A007604 seq(A[i],i=1..100); # _Robert Israel_, Mar 14 2023 %t A007604 a[n_Integer] := a[n] = Block[{c, k}, c = 0; k = 1; While[k < n, If[ OddQ[ a[k] ], c++ ]; k++ ]; Return[a[n - 1] + a[n - 1 - c] ] ]; a[1] = 1; a[2] = 2; Table[ a[n], {n, 0, 60} ] %o A007604 (Haskell) %o A007604 a007604 n = a007604_list !! (n-1) %o A007604 a007604_list = concat $ map tail $ tail a046936_tabl %o A007604 -- _Reinhard Zumkeller_, Jan 01 2014 %Y A007604 Cf. A006336, A046936, A003056. %K A007604 nonn,nice,easy %O A007604 1,2 %A A007604 _N. J. A. Sloane_, _Robert G. Wilson v_ %E A007604 Entry revised by _N. J. A. Sloane_, Oct 26 2014