A373016 a(n) is the least positive integer k such that 3*n^2 + 2*n + k is a square.
4, 9, 3, 8, 15, 1, 8, 17, 28, 4, 15, 28, 43, 9, 24, 41, 60, 16, 35, 56, 4, 25, 48, 73, 11, 36, 63, 92, 20, 49, 80, 113, 31, 64, 99, 9, 44, 81, 120, 20, 59, 100, 143, 33, 76, 121, 3, 48, 95, 144, 16, 65, 116, 169, 31, 84, 139, 196, 48, 105, 164, 8, 67, 128, 191, 25, 88, 153, 220, 44, 111, 180
Offset: 1
Examples
a(1) = 4 because 3*1^2 + 2*1 = 5 and 5 + 1, 5 + 2, 5 + 3 are not squares, but 5 + 4 is. So, 4 is a term. a(2) = 9 because 3*2^2 + 2*2 = 16 and 16 + 1, 16 + 2, 16 + 3, 16 + 4, 16 + 5, 16 + 6, 16 + 7, 16 + 8 are not squares, but 16 + 9 is. So, 9 is a term.
Crossrefs
Programs
-
PARI
a(n)=my(t=3*n^2+2*n); (sqrtint(t)+1)^2-t \\ Charles R Greathouse IV, May 21 2024
Formula
a(n) is the smallest square greater than 3*n^2 + 2*n, minus 3*n^2 + 2*n. - Charles R Greathouse IV, May 21 2024
1 <= a(n) <= floor(sqrt(12)*n) + 3. I believe both bounds are tight infinitely often. - Charles R Greathouse IV, May 21 2024
Comments