login
A Connell-like sequence: take 1 number = 1 (mod Q), 2 numbers = 2 (mod Q), 3 numbers = 3 (mod Q), etc., where Q = 8.
6

%I #19 Apr 06 2014 02:50:54

%S 1,2,10,11,19,27,28,36,44,52,53,61,69,77,85,86,94,102,110,118,126,127,

%T 135,143,151,159,167,175,176,184,192,200,208,216,224,232,233,241,249,

%U 257,265,273,281,289,297,298,306,314,322,330,338,346,354,362,370,371,379,387,395,403,411

%N A Connell-like sequence: take 1 number = 1 (mod Q), 2 numbers = 2 (mod Q), 3 numbers = 3 (mod Q), etc., where Q = 8.

%H Reinhard Zumkeller, <a href="/A033293/b033293.txt">Rows n=1..120 of triangle, flattened</a>

%H Gary E. Stevens, <a href="http://www.cs.uwaterloo.ca/journals/JIS/stevens.html">A Connell-Like Sequence</a>, J. Integer Sequences, 1 (1998), #98.1.4.

%t row[1] = {1}; row[n_] := row[n] = Table[row[n-1][[-1]] + 8k + 1, {k, 0, n-1}]; Table[row[n], {n, 1, 11}] // Flatten (* _Jean-François Alcover_, Jan 25 2013 *)

%o (Haskell)

%o a033293 n k = a033293_tabl !! (n-1) !! (k-1)

%o a033293_row n = a033293_tabl !! (n-1)

%o a033293_tabl = f 1 [1..] where

%o f k xs = ys : f (k+1) (dropWhile (<= last ys) xs) where

%o ys = take k $ filter ((== 0) . (`mod` 8) . (subtract k)) xs

%o -- _Reinhard Zumkeller_, Jan 18 2012 2011

%Y Cf. A054552 (left edge), A001107 (right edge), A204674 (row sums), A204675 (central terms).

%K nonn,easy,nice,tabl

%O 1,2

%A _Gary E. Stevens_

%E More terms from jeroen.lahousse(AT)icl.com

%E Offset changed by _Reinhard Zumkeller_, Jan 18 2012