OFFSET
1,2
COMMENTS
a(n) is the sum of the n highest entries in the projection of the n-th tetrahedron or tetrahedral number (e.g., a(7) = 7+6+6+5+5+5+4+4).
a(n) is a sharp upper bound for the value of a gamma-labeling of a graph with n edges (cf. Bullington).
LINKS
Grady D. Bullington, The Connell Sum Sequence, J. Integer Seq. 10 (2007), Article 07.2.6. (includes direct formula for a(n))
Ian Connell, Elementary Problem E1382, American Mathematical Monthly, v. 66, no. 8 (October, 1959), p. 724.
Douglas E. Iannucci and Donna Mills-Taylor, On Generalizing the Connell Sequence, J. Integer Sequences, Vol. 2, 1999, #99.1.7.
FORMULA
a(n) = (n-th triangular number) - n + (n-th partial sum of A122797).
a(n) = n^2 + n - R*((6*n+1)-R^2)/6, where R = round(sqrt(2*n)). - Gerald Hillier, Nov 29 2009
PROG
(Python)
from math import isqrt
def A122793(n): return n*(n+1)-(r:=(k:=isqrt(m:=n<<1))+int((m<<2)>(k<<2)*(k+1)+1))*((6*n+1)-r**2)//6 # Chai Wah Wu, Jul 26 2022
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Grady Bullington (bullingt(AT)uwosh.edu), Sep 14 2006
STATUS
approved