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.

User: Can Atilgan

Can Atilgan's wiki page.

Can Atilgan has authored 1 sequences.

A220104 k appears k*(k+1) times.

Original entry on oeis.org

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
Offset: 1

Author

Can Atilgan and Murat Erşen Berberler (muratersenberberler(AT)gmail.com), Dec 05 2012

Keywords

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
a(n) is the number of distinct terms of A007290 < n. - Chai Wah Wu, Nov 14 2024

Examples

			For n = 21 the solution is found as the following: c(21) = 3, e(21) = 1, and finally a(21) = 4.
		

Crossrefs

Programs

  • Haskell
    a220104 n = a220104_list !! (n-1)
    a220104_list = concatMap (\x -> take (a002378 x) $ repeat x) [1..]
    -- Reinhard Zumkeller, Jan 01 2013
    
  • Mathematica
    Flatten[Array[Table[#,#(#+1)]&,6]] (* Paolo Xausa, Dec 10 2023 *)
  • Python
    from sympy import integer_nthroot
    def A220104(n): return (m:=integer_nthroot(k:=3*n, 3)[0])+(k>m*(m+1)*(m+2)) # Chai Wah Wu, Nov 14 2024

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