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.

Showing 1-1 of 1 results.

A377722 n appears n^4 times.

Original entry on oeis.org

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

Views

Author

Chai Wah Wu, Nov 04 2024

Keywords

Crossrefs

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)).
Showing 1-1 of 1 results.