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

%I #29 Jun 04 2021 22:51:40

%S 1,2,5,6,9,12,13,16,19,22,23,26,29,32,35,36,39,42,45,48,51,52,55,58,

%T 61,64,67,70,71,74,77,80,83,86,89,92,93,96,99,102,105,108,111,114,117,

%U 118,121,124,127,130,133,136,139,142,145,146,149,152,155,158,161,164,167,170,173,176,177,180

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

%C Left border of the triangle (1, 2, 6, 13, 23, 36, ...) = A143689 = A000326(n) - 3n, where A000326 = the pentagonal numbers, right border. - _Gary W. Adamson_, Aug 29 2008

%C Row sums = A143690: (1, 7, 27, 70, 145, 261, 427, 652, ...). - _Gary W. Adamson_, Aug 29 2008

%C Central terms = A136392. - _Reinhard Zumkeller_, Jan 18 2012

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

%H Douglas E. Iannucci and Donna Mills-Taylor, <a href="http://www.cs.uwaterloo.ca/journals/JIS/IANN/iann1.html">On Generalizing the Connell Sequence</a>, J. Integer Sequences, Vol. 2, 1999, #99.1.7.

%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[n_] := n*(3*n-1)/2 + Range[1, 3*n+1, 3]; Flatten[ Table[ row[n], {n, 0, 11}]] (* _Jean-François Alcover_, Aug 03 2012 *)

%o (Haskell)

%o a033292 n k = a033292_tabl !! (n-1) !! (k-1)

%o a033292_row n = a033292_tabl !! (n-1)

%o a033292_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` 3) . (subtract k)) xs

%o -- _Reinhard Zumkeller_, Jan 18 2012 2011

%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