OFFSET
1,2
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
Douglas E. Iannucci and Donna Mills-Taylor, On Generalizing the Connell Sequence, J. Integer Sequences, Vol. 2, 1999, #99.1.7.
FORMULA
C(n, m, r) = n*m - (m - 1)*floor((3*r - 2 + sqrt(8*r*(n - 1) + (r - 2)^2)) / (2*r)) with m=3 and r=2, thus a(n) = 3*n - 2*floor(1 + sqrt(n-1)). - Michel Marcus, Apr 02 2013
EXAMPLE
From Michel Marcus, Apr 02 2013: (Start)
As a triangle, sequence begins:
1;
2, 5, 8;
9, 12, 15, 18, 21;
...
(End)
MATHEMATICA
Table[3*n-2*Floor[1+Sqrt[n-1]], {n, 70}] (* Harvey P. Dale, Apr 19 2019 *)
PROG
(PARI) lista(nrow, m=3, r=2) = {a = 1; for (irow = 1, nrow, for (k = 1, 1 + r*(irow -1), print1(a, ", "); a += m; ); a += 1 - m; ); } \\ Michel Marcus, Apr 02 2013
(Haskell)
a045928 n = 3 * n - 2 * floor (1 + sqrt (fromIntegral n - 1))
-- Reinhard Zumkeller, Aug 09 2015
CROSSREFS
KEYWORD
nonn,easy,nice
AUTHOR
EXTENSIONS
More terms from jeroen.lahousse(AT)icl.com
Typo in formula fixed by Reinhard Zumkeller, Aug 09 2015
STATUS
approved