A061885 n + largest triangular number less than or equal to n.
0, 2, 3, 6, 7, 8, 12, 13, 14, 15, 20, 21, 22, 23, 24, 30, 31, 32, 33, 34, 35, 42, 43, 44, 45, 46, 47, 48, 56, 57, 58, 59, 60, 61, 62, 63, 72, 73, 74, 75, 76, 77, 78, 79, 80, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 132
Offset: 0
Keywords
Examples
a(9) = 9+6 = 15; a(10) = 10+10 = 20; a(11) = 11+10 = 21.
Links
- Reinhard Zumkeller, Table of n, a(n) for n = 0..10000
Programs
-
Haskell
a061885 n = n + a057944 n -- Reinhard Zumkeller, Feb 03 2012
-
Python
from math import comb, isqrt def A061885(n): return n+comb((m:=isqrt(k:=n+1<<1))+(k>m*(m+1)),2) # Chai Wah Wu, Nov 09 2024
Formula
a(n) = A004201(n+1) - 1. - Franklin T. Adams-Watters, Jul 05 2009
Comments