A108582 n appears n^3 times.
1, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 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, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 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
Offset: 1
Links
- Boris Putievskiy, Table of n, a(n) for n = 1..8281
- Boris Putievskiy, Integer Sequences: Irregular Arrays and Intra-Block Permutations, arXiv:2310.18466 [math.CO], 2023.
Crossrefs
Programs
-
Mathematica
Flatten @ Table[ Table[k, {k^3}], {k, 5}] (* Giovanni Resta, Jun 17 2016 *) a[n_]:=Ceiling[1/2 (Sqrt[8 Sqrt[n]+1]-1)] Nmax=225; Table[a[n],{n,1,Nmax}] (* Boris Putievskiy, Jun 19 2024 *)
-
Python
from sympy import integer_nthroot def A108582(n): return (m:=integer_nthroot(k:=n<<2,4)[0])+(k>(m*(m+1))**2) # Chai Wah Wu, Nov 04 2024
Formula
a(n) = ceiling((1/2)*(sqrt(8*sqrt(n) + 1) - 1)). - Boris Putievskiy, Jun 19 2024
From Chai Wah Wu, Nov 04 2024: (Start)
a(n) = m+1 if n>(m(m+1))^2/4 and a(n) = m otherwise where m = floor((4n)^(1/4)).
More generally, for a sequence a_k(n) where n appears n^(k-1) times, a_k(n) = m+1 if n > Sum_{i=1..m} i^(k-1) and a_k(n) = m otherwise where m = floor((kn)^(1/k)).
Note that Sum_{i=1..m} i^(k-1) can be written as a k-th order polynomial of m using Faulhaber's formula. (End)
Extensions
Two missing terms from Giovanni Resta, Jun 17 2016
Comments