%I #165 Mar 03 2023 02:58:27
%S 1,3,9,19,33,51,73,99,129,163,201,243,289,339,393,451,513,579,649,723,
%T 801,883,969,1059,1153,1251,1353,1459,1569,1683,1801,1923,2049,2179,
%U 2313,2451,2593,2739,2889,3043,3201,3363,3529,3699,3873,4051
%N a(n) = 2*n^2 + 1.
%C Maximal number of regions in the plane that can be formed with n hyperbolas.
%C Also the number of different 2 X 2 determinants with integer entries from 0 to n.
%C Number of lattice points in an n-dimensional ball of radius sqrt(2). - _David W. Wilson_, May 03 2001
%C Equals A112295(unsigned) * [1, 2, 3, ...]. - _Gary W. Adamson_, Oct 07 2007
%C Binomial transform of A166926. - _Gary W. Adamson_, May 03 2008
%C a(n) = longest side a of all integer-sided triangles with sides a <= b <= c and inradius n >= 1. Triangle has sides (2n^2 + 1, 2n^2 + 2, 4n^2 + 1).
%C {a(k): 0 <= k < 3} = divisors of 9. - _Reinhard Zumkeller_, Jun 17 2009
%C Number of ways to partition a 3*n X 2 grid into 3 connected equal-area regions. - _R. H. Hardin_, Oct 31 2009
%C Let A be the Hessenberg matrix of order n defined by: A[1, j] = 1, A[i, i] := 2, (i > 1), A[i, i - 1] = -1, and A[i, j] = 0 otherwise. Then, for n >= 3, a(n - 1) = coeff(charpoly(A, x), x^(n - 2)). - _Milan Janjic_, Jan 26 2010
%C Except for the first term of [A002522] and [A058331] if X = [A058331], Y = [A087113], A = [A002522], we have, for all other terms, Pell's equation: [A058331]^2 - [A002522]*[A087113]^2 = 1; (X^2 - A*Y^2 = 1); e.g., 3^2 -2*2^2 = 1; 9^2 - 5*4^2 = 1; 129^2 - 65*16^2 = 1, and so on. - _Vincenzo Librandi_, Aug 07 2010
%C Niven (1961) gives this formula as an example of a formula that does not contain all odd integers, in contrast to 2n + 1 and 2n - 1. - _Alonso del Arte_, Dec 05 2012
%C Numbers m such that 2*m-2 is a square. - _Vincenzo Librandi_, Apr 10 2015
%C Number of n-tuples from the set {1,0,-1} where at most two elements are nonzero. - _Michael Somos_, Oct 19 2022
%D Ivan Niven, Numbers: Rational and Irrational, New York: Random House for Yale University (1961): 17.
%H G. C. Greubel, <a href="/A058331/b058331.txt">Table of n, a(n) for n = 0..5000</a>
%H Steven Edwards and William Griffiths, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL23/Griffiths/griffiths51.html">On Generalized Delannoy Numbers</a>, J. Int. Seq., Vol. 23 (2020), Article 20.3.6.
%H Milan Janjić, <a href="https://arxiv.org/abs/1905.04465">On Restricted Ternary Words and Insets</a>, arXiv:1905.04465 [math.CO], 2019.
%H Clark Kimberling, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL10/Kimberling/kimberling26.html">Complementary Equations</a>, Journal of Integer Sequences, Vol. 10 (2007), Article 07.1.4.
%H Leo Tavares, <a href="/A058331/a058331.jpg">Illustration: Triangular Outlines</a>
%H Reinhard Zumkeller, <a href="/A161700/a161700.txt">Enumerations of Divisors</a>.
%H <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (3,-3,1).
%F G.f.: (1 + 3x^2)/(1 - x)^3. - _Paul Barry_, Apr 06 2003
%F a(n) = M^n * [1 1 1], leftmost term, where M = the 3 X 3 matrix [1 1 1 / 0 1 4 / 0 0 1]. a(0) = 1, a(1) = 3; a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3). E.g., a(4) = 33 since M^4 *[1 1 1] = [33 17 1]. - _Gary W. Adamson_, Nov 11 2004
%F a(n) = cosh(2*arccosh(n)). - _Artur Jasinski_, Feb 10 2010
%F a(n) = 4*n + a(n-1) - 2 for n > 0, a(0) = 1. - _Vincenzo Librandi_, Aug 07 2010
%F a(n) = (((n-1)^2 + n^2))/2 + (n^2 + (n+1)^2)/2. - _J. M. Bergot_, May 31 2012
%F a(n) = A251599(3*n) for n > 0. - _Reinhard Zumkeller_, Dec 13 2014
%F a(n) = sqrt(8*(A000217(n-1)^2 + A000217(n)^2) + 1). - _J. M. Bergot_, Sep 03 2015
%F E.g.f.: (2*x^2 + 2*x + 1)*exp(x). - _G. C. Greubel_, Jul 14 2017
%F a(n) = A002378(n) + A002061(n). - _Bruce J. Nicholson_, Aug 06 2017
%F From _Amiram Eldar_, Jul 15 2020: (Start)
%F Sum_{n>=0} 1/a(n) = (1 + (Pi/sqrt(2))*coth(Pi/sqrt(2)))/2.
%F Sum_{n>=0} (-1)^n/a(n) = (1 + (Pi/sqrt(2))*csch(Pi/sqrt(2)))/2. (End)
%F From _Amiram Eldar_, Feb 05 2021: (Start)
%F Product_{n>=0} (1 + 1/a(n)) = sqrt(2)*csch(Pi/sqrt(2))*sinh(Pi).
%F Product_{n>=1} (1 - 1/a(n)) = (Pi/sqrt(2))*csch(Pi/sqrt(2)). (End)
%F From _Leo Tavares_, May 23 2022: (Start)
%F a(n) = A000384(n+1) - 3*n.
%F a(n) = 3*A000217(n) + A000217(n-2). (End)
%F a(n) = a(-n) for all n in Z and A037235(n) = Sum_{k=0..n-1} a(k). - _Michael Somos_, Oct 19 2022
%e a(1) = 3 since (0 0 / 0 0), (1 0 / 0 1) and (0 1 / 1 0) have different determinants.
%e G.f. = 1 + 3*x + 9*x^2 + 19*x^3 + 33*x^4 + 51*x^5 + 73*x^6 + ... - _Michael Somos_, Oct 19 2022
%t b[g_] := Length[Union[Map[Det, Flatten[ Table[{{i, j}, {k, l}}, {i, 0, g}, {j, 0, g}, {k, 0, g}, {l, 0, g}], 3]]]] Table[b[g], {g, 0, 20}]
%t 2*Range[0, 49]^2 + 1 (* _Alonso del Arte_, Dec 05 2012 *)
%o (PARI) a(n)=2*n^2+1 \\ _Charles R Greathouse IV_, Jun 16 2011
%o (Haskell)
%o a058331 = (+ 1) . a001105 -- _Reinhard Zumkeller_, Dec 13 2014
%o (Magma) [2*n^2 + 1 : n in [0..100]]; // _Wesley Ivan Hurt_, Feb 02 2017
%Y Cf. A000124.
%Y Second row of array A099597.
%Y See A120062 for sequences related to integer-sided triangles with integer inradius n.
%Y Cf. A112295.
%Y Cf. A087113, A002552.
%Y Cf. A005408, A016813, A086514, A000125, A002522, A161701, A161702, A161703, A000127, A161704, A161706, A161707, A161708, A161710, A080856, A161711, A161712, A161713, A161715, A006261.
%Y Cf. A001079, A037270, A071253, A108741, A132592, A146311, A146312, A146313, A173115, A173116, A173121.
%Y Column 2 of array A188645.
%Y Cf. A001105 and A247375. - _Bruno Berselli_, Sep 16 2014
%Y Cf. A056106, A251599.
%Y Cf. A000384, A000217, A166926.
%K nonn,easy
%O 0,2
%A _Erich Friedman_, Dec 12 2000
%E Revised description from Noam Katz (noamkj(AT)hotmail.com), Jan 28 2001