The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A220104 k appears k*(k+1) times. 1
1, 1, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
COMMENTS
The current sequence is, loosely, the inverse function of the 2*binomial(n,3) sequence A007290.
A007290 has alternative formulas, thus yielding alternative formulas for the current sequence.
The formula below was inspired by Sum_{i = 0..n-2} (i*(i+1)) = n*(n-1)*(n-2)/3 given in A007290.
By definition: A002378 = run lengths. - Reinhard Zumkeller, Jan 01 2013
LINKS
FORMULA
For c(n) = floor((3*n)^(1/3)), e(n) = n - (c(n)*(c(n)+1)*(c(n)+2))/3, explicit formula is a(n) = c(n) + sgn(abs(e(n)) + e(n)).
a(n) = floor(t + 1/(3*t)), where t = (3*(n - 1))^(1/3), for n > 1. - Ridouane Oudra, Oct 30 2023
EXAMPLE
For n = 21 the solution is found as the following: c(21) = 3, e(21) = 1, and finally a(21) = 4.
MATHEMATICA
Flatten[Array[Table[#, #(#+1)]&, 6]] (* Paolo Xausa, Dec 10 2023 *)
PROG
(Haskell)
a220104 n = a220104_list !! (n-1)
a220104_list = concatMap (\x -> take (a002378 x) $ repeat x) [1..]
-- Reinhard Zumkeller, Jan 01 2013
CROSSREFS
Sequence in context: A123119 A099396 A126235 * A191228 A340763 A286103
KEYWORD
nonn
AUTHOR
Can Atilgan and Murat Erşen Berberler (muratersenberberler(AT)gmail.com), Dec 05 2012
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 13 21:17 EDT 2024. Contains 372523 sequences. (Running on oeis4.)