A373026 a(n) is the least positive integer k such that 3*n^2 + 2*n - k is a square.
1, 7, 8, 7, 4, 20, 17, 12, 5, 31, 24, 15, 4, 40, 29, 16, 1, 47, 32, 15, 69, 52, 33, 12, 76, 55, 32, 7, 81, 56, 29, 111, 84, 55, 24, 116, 85, 52, 17, 119, 84, 47, 8, 120, 81, 40, 160, 119, 76, 31, 161, 116, 69, 20, 160, 111, 60, 7, 157, 104, 49, 207, 152, 95, 36, 204, 145, 84, 21, 199, 136, 71
Offset: 1
Examples
a(1) = 1 because 3*1^2 + 2*1 = 5 and 5-1 is a square. So, 1 is a term. a(2) = 7 because 3*2^2 + 2*2 = 16 and 16-1, 16-2, 16-3, 16-4, 16-5, 16-6 are not squares, but 16-7 is. So, 7 is a term.
Programs
-
PARI
a(n) = my(m=3*n^2+2*n-1); m+1-sqrtint(m)^2; \\ Michel Marcus, May 20 2024
Comments