A377722 n appears n^4 times.
1, 2, 2, 2, 2, 2, 2, 2, 2, 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, 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, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3
Offset: 1
Keywords
Links
- Paolo Xausa, Table of n, a(n) for n = 1..15333
Programs
-
Mathematica
A377722[n_] := # + Boole[n > #*(# + 1)*(2*# + 1)*(3*#^2 + 3*# - 1)/30] & [Floor[(5*n)^(1/5)]]; Array[A377722, 354] (* or *) Flatten[Table[k, {k, 4}, {k^4}]] (* Paolo Xausa, Nov 05 2024 *)
-
Python
from sympy import integer_nthroot def A377722(n): return (m:=integer_nthroot(5*n,5)[0])+(30*n>m*(m+1)*((m<<1)+1)*(3*m*(m+1)-1))
Formula
a(n) = m+1 if n>m(m+1)(2m+1)(3m^2+3m-1)/30 and a(n) = m otherwise where m = floor((5n)^(1/5)).
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)).