login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

n appears n^4 times.
1

%I #11 Nov 06 2024 04:31:36

%S 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,

%T 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,

%U 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3

%N n appears n^4 times.

%H Paolo Xausa, <a href="/A377722/b377722.txt">Table of n, a(n) for n = 1..15333</a>

%F 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)).

%F 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)).

%t A377722[n_] := # + Boole[n > #*(# + 1)*(2*# + 1)*(3*#^2 + 3*# - 1)/30] & [Floor[(5*n)^(1/5)]];

%t Array[A377722, 354] (* or *)

%t Flatten[Table[k, {k, 4}, {k^4}]] (* _Paolo Xausa_, Nov 05 2024 *)

%o (Python)

%o from sympy import integer_nthroot

%o def A377722(n): return (m:=integer_nthroot(5*n,5)[0])+(30*n>m*(m+1)*((m<<1)+1)*(3*m*(m+1)-1))

%Y Cf. A002024, A074279, A108582.

%K nonn

%O 1,2

%A _Chai Wah Wu_, Nov 04 2024