cp's OEIS Frontend

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.

A156031 Alternate A022941 and A143344.

This page as a plain text file.
%I A156031 #11 Feb 04 2018 03:20:10
%S A156031 1,2,3,5,4,9,6,15,7,22,8,30,10,40,11,51,12,63,13,76,14,90,16,106,17,
%T A156031 123,18,141,19,160,20,180,21,201,23,224,24,248,25,273,26,299,27,326,
%U A156031 28,354,29,383,31,414,32,446,33,479,34,513,35,548,36,584,37,621,38,659,39,698
%N A156031 Alternate A022941 and A143344.
%C A156031 Eric Angelini's definition was: start with 1,2,3; then alternately adjoin either the sum of the last two terms or the smallest number not yet in the sequence.
%H A156031 M. F. Hasler, <a href="/A156031/b156031.txt">Table of n, a(n) for n = 1..2001</a>
%o A156031 (PARI) f="b156031.txt"; used=[]; write(f,c=1," ",b=1);a=1; for(i=1,1e3, used=setunion(used,Set(a+=b)); while(setsearch(used,b++), used=setminus(used,Set(b))); write(f,c++," "a"\n",c++," "b)) \\ _M. F. Hasler_, Nov 01 2009
%o A156031 (Haskell)
%o A156031 import Data.List (transpose)
%o A156031 a156031 n = a156031_list !! n
%o A156031 a156031_list = tail $ concat (transpose [a022941_list, a143344_list])
%o A156031 -- _Reinhard Zumkeller_, May 17 2013
%Y A156031 Cf. A022941, A143344, A167151, A005228, A030124.
%K A156031 nonn
%O A156031 1,2
%A A156031 _N. J. A. Sloane_, Nov 01 2009, based on a posting by Eric Angelini to the Sequence Fans Mailing List