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.

A033291 A Connell-like sequence: take the first multiple of 1, the next 2 multiples of 2, the next 3 multiples of 3, etc.

This page as a plain text file.
%I A033291 #42 Jun 10 2019 00:01:43
%S A033291 1,2,4,6,9,12,16,20,24,28,30,35,40,45,50,54,60,66,72,78,84,91,98,105,
%T A033291 112,119,126,133,136,144,152,160,168,176,184,192,198,207,216,225,234,
%U A033291 243,252,261,270,280,290,300,310,320,330,340,350,360,370,374,385,396,407,418,429,440,451,462
%N A033291 A Connell-like sequence: take the first multiple of 1, the next 2 multiples of 2, the next 3 multiples of 3, etc.
%C A033291 Row sums are 0, 1, 6, 27, 88, 200, ... with g.f. -x*(1 + 4*x + 16*x^2 + 37*x^3 + 39*x^4 + 54*x^5 + 39*x^6 + 17*x^7 + 8*x^8 + x^9) / ( (1 + x + x^2)^3*(x-1)^5 ). - _R. J. Mathar_, Aug 10 2017
%H A033291 Reinhard Zumkeller, <a href="/A033291/b033291.txt">Rows n = 1..100, flattened</a>
%H A033291 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.
%F A033291 a(n) = q(n)*n - q(n)*floor(q(n)*(q(n)+1)/6) with q(n) = ceiling((1/2)*(-1 + sqrt(1+8*(n)))).
%e A033291 Triangle begins
%e A033291    1;
%e A033291    2,  4;
%e A033291    6,  9,  12;
%e A033291   16, 20,  24,  28;
%e A033291   30, 35,  40,  45,  50;
%e A033291   54, 60,  66,  72,  78,  84;
%e A033291   91, 98, 105, 112, 119, 126, 133; ...
%p A033291 A033291 := proc(n,k)
%p A033291     A192735(n)+(k-1)*n ;
%p A033291 end proc:
%p A033291 seq(seq(A033291(n,k),k=1..n),n=1..10) ; # _R. J. Mathar_, Aug 10 2017
%t A033291 Flatten[ Table[ n*(Floor[ (n-1)^2/3] + k), {n, 1, 12}, {k, 1, n}]] (* _Jean-François Alcover_, Sep 30 2011 *)
%o A033291 (Haskell)
%o A033291 a033291 n k = a033291_tabl !! (n-1) !! (k-1)
%o A033291 a033291_row n = a033291_tabl !! (n-1)
%o A033291 a033291_tabl = f 1 [1..] where
%o A033291    f k xs = ys : f (k+1) (dropWhile (<= last ys) xs) where
%o A033291      ys  = take k $ filter ((== 0) . (`mod` k)) xs
%o A033291 a192735 n = head $ a033291_tabl !! (n-1)
%o A033291 a192736 n = last $ a033291_tabl !! (n-1)
%o A033291 -- _Reinhard Zumkeller_, Jan 18 2012, Jul 08 2011
%o A033291 (PARI) a(n)=my(q=(sqrtint(8*n-7)+1)\2); q*n-q*(q+1)\6*q \\ _Charles R Greathouse IV_, Jan 06 2016
%Y A033291 Cf. A192735 (left edge), A192736 (right edge).
%Y A033291 Cf. A045975, A033292, A033293.
%K A033291 nonn,easy,nice,tabl
%O A033291 1,2
%A A033291 _Gary E. Stevens_
%E A033291 Corrected and formula added by _Johannes W. Meijer_, Oct 07 2010