A183217 - OEIS (original) (raw)
2, 3, 4, 6, 7, 8, 9, 10, 11, 13, 14, 15, 16, 17, 18, 19, 20, 21, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 93
FORMULA
a(n) = n + floor(1/2+(2n/3)^(1/2)).
EXAMPLE
The pentagonal numbers A000326 = (1,5,12,22,35,...), so that this sequence = (2,3,4,6,7,8,9,10,11,13,14,...).
MATHEMATICA
Table[n+Floor[1/2+(2n/3)^(1/2)], {n, 100}]
PROG
(PARI) a(n) = n + sqrtint(24*n)\/6; \\ Kevin Ryde, Aug 31 2024
(Python)
from math import isqrt
def A183217(n): return n+(isqrt((n<<3)//3)+1>>1) # Chai Wah Wu, Oct 05 2024