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.

A127330 Begin with the empty sequence and a starting number s = 0. At step k (k >= 1) append the k consecutive numbers s to s+k-1 and change the starting number (for the next step) to 2s+2.

This page as a plain text file.
%I A127330 #16 Feb 16 2022 23:33:06
%S A127330 0,2,3,6,7,8,14,15,16,17,30,31,32,33,34,62,63,64,65,66,67,126,127,128,
%T A127330 129,130,131,132,254,255,256,257,258,259,260,261,510,511,512,513,514,
%U A127330 515,516,517,518,1022,1023,1024,1025,1026,1027,1028,1029,1030,1031,2046
%N A127330 Begin with the empty sequence and a starting number s = 0. At step k (k >= 1) append the k consecutive numbers s to s+k-1 and change the starting number (for the next step) to 2s+2.
%C A127330 From a TV show.
%C A127330 A129142 and A129143 are similar, slightly more natural, but for a puzzle perhaps too transparent sequences.
%C A127330 Can be seen as a triangle (row by step) read by rows: T(n,k) = T(n-1,k) + 2^n for k < n and T(n,n) = T(n-1,n-1) + 2^n + 1. - _Reinhard Zumkeller_, Nov 16 2013
%H A127330 Reinhard Zumkeller, <a href="/A127330/b127330.txt">Rows n = 0..125 of triangle, flattened</a>
%e A127330 In step 1 starting number 0 is appended to the empty sequence and the next starting number is 2*0 + 2 = 2. In step 2 the two numbers 2, 3 are appended and the starting number is changed to 2*2 + 2 = 6.
%t A127330 Table[ Range[2^k-2, 2^k+k-3], {k, 1, 11}] // Flatten (* _Jean-François Alcover_, Oct 07 2013, after _Klaus Brockhaus_ *)
%t A127330 Join[{0},Flatten[With[{nn=10},Range[#[[1]],Total[#]]&/@Thread[ {Accumulate[ 2^Range[nn]],Range[nn]}]]]] (* _Harvey P. Dale_, Nov 05 2017 *)
%o A127330 (PARI) {v=[]; s=0; for(k=1, 11, w=vector(k, j, j+s-1); s=2*s+2; v=concat(v, w)); for(n=1, #v, print1(v[n], ","))} \\ _Klaus Brockhaus_, Mar 31 2007
%o A127330 (Magma) &cat[ [2^k-2..2^k+k-3]: k in [1..11] ]; // _Klaus Brockhaus_, Mar 31 2007
%o A127330 (Haskell)
%o A127330 a127330 n k = a127330_tabl !! n !! k
%o A127330 a127330_row n = a127330_tabl !! n
%o A127330 a127330_tabl = step 0 1 where
%o A127330    step s k = [s .. s + k - 1] : step (2 * s + 2) (k + 1)
%o A127330 -- _Reinhard Zumkeller_, Nov 16 2013
%Y A127330 Cf. A129142, A129143.
%Y A127330 Cf. A000918 (left edge), A145071 (right edge).
%K A127330 easy,nice,nonn,tabl
%O A127330 0,2
%A A127330 Steven Cartier (steven.cartier(AT)rogers.com), Mar 30 2007
%E A127330 Edited and extended by _Klaus Brockhaus_, Mar 31 2007
%E A127330 Keyword tabl added and offset changed by _Reinhard Zumkeller_, Nov 16 2013