|
|
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.
|
|
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..]
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
Can Atilgan and Murat Erşen Berberler (muratersenberberler(AT)gmail.com), Dec 05 2012
|
|
STATUS
|
approved
|
|
|
|