OFFSET
1,1
COMMENTS
Complement of A002411. Numbers not of the form k^2*(k+1)/2.
LINKS
Eric Weisstein's World of Mathematics, Pentagonal Pyramidal Number
FORMULA
a(n) = n+m if 2n>m(m-1)(m+2) and a(n) = n+m-1 otherwise where m = floor((2n)^(1/3)).
MATHEMATICA
p=71; l=Floor[(2p)^(1/3)]; Complement[Range[p], Table[n^2 (n + 1)/2, {n, 0, l}]] (* James C. McMahon, Oct 07 2024 *)
PROG
(Python)
from sympy import integer_nthroot
def A376745(n): return n+(m:=integer_nthroot(k:=n<<1, 3)[0])-(k<=m*(m-1)*(m+2))
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Chai Wah Wu, Oct 03 2024
STATUS
approved