%I #111 Sep 11 2022 16:50:54
%S 1,8,22,43,71,106,148,197,253,316,386,463,547,638,736,841,953,1072,
%T 1198,1331,1471,1618,1772,1933,2101,2276,2458,2647,2843,3046,3256,
%U 3473,3697,3928,4166,4411,4663,4922,5188,5461,5741,6028,6322,6623,6931,7246
%N Centered heptagonal numbers.
%C Equals the triangular numbers convolved with [ 1, 5, 1, 0, 0, 0, ...]. - _Gary W. Adamson_ and _Alexander R. Povolotsky_, May 29 2009
%C Number of ordered pairs of integers (x,y) with abs(x) < n, abs(y) < n and abs(x + y) < n, counting twice pairs of equal numbers. - _Reinhard Zumkeller_, Jan 23 2012; corrected and extended by _Mauro Fiorentini_, Jan 01 2018
%C The number of pairs without repetitions is a(n) - 2n + 3 for n > 1. For example, there are 19 such pairs for n = 3: (-2, 0), (-2, 1), (-2, 2), (-1, -1), (-1, 0), (-1, 1), (-1, 2), (0, -2), (0, -1), (0, 0), (0, 1), (0, 2), (1, -2), (1, -1), (1, 0), (1, 1), (2, -2), (2, -1), (2, 0). - _Mauro Fiorentini_, Jan 01 2018
%H T. D. Noe, <a href="/A069099/b069099.txt">Table of n, a(n) for n = 1..1000</a>
%H Nicolas Bělohoubek and Viktor Javor, <a href="/A069099/a069099.pdf">Centered heptagonal numbers appearing in aperiodic heptagonal tiling</a>
%H Leo Tavares, <a href="/A069099/a069099.jpg">Illustration: Crystal Numbers</a>
%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/CenteredPolygonalNumber.html">Centered Polygonal Numbers</a>.
%H <a href="/index/Ce#CENTRALCUBE">Index entries for sequences related to centered polygonal numbers</a>
%H <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (3,-3,1).
%F a(n) = (7*n^2 - 7*n + 2)/2.
%F a(n) = 1 + Sum_{k=1..n} 7*k. - Xavier Acloque, Oct 26 2003
%F Binomial transform of [1, 7, 7, 0, 0, 0, ...]; Narayana transform (A001263) of [1, 7, 0, 0, 0, ...]. - _Gary W. Adamson_, Dec 29 2007
%F a(n) = 7*n + a(n-1) - 7 (with a(1)=1). - _Vincenzo Librandi_, Aug 08 2010
%F G.f.: x*(1+5*x+x^2) / (1-x)^3. - _R. J. Mathar_, Feb 04 2011
%F a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3); a(0)=1, a(1)=8, a(2)=22. - _Harvey P. Dale_, Jun 04 2011
%F a(n) = A024966(n-1) + 1. - _Omar E. Pol_, Oct 03 2011
%F a(n) = 2*a(n-1) - a(n-2) + 7. - _Ant King_, Jun 17 2012
%F From _Ant King_, Jun 17 2012: (Start)
%F Sum_{n>=1} 1/a(n) = 2*Pi/sqrt(7)*tanh(Pi/(2*sqrt(7))) = 1.264723171685652...
%F a(n) == 1 (mod 7) for all n.
%F The sequence of digital roots of the a(n) is period 9: repeat [1, 8, 4, 7, 8, 7, 4, 8, 1] (the period is a palindrome).
%F The sequence of a(n) mod 10 is period 20: repeat [1, 8, 2, 3, 1, 6, 8, 7, 3, 6, 6, 3, 7, 8, 6, 1, 3, 2, 8, 1] (the period is a palindrome).
%F (End)
%F E.g.f.: -1 + (2 + 7*x^2)*exp(x)/2. - _Ilya Gutkovskiy_, Jun 30 2016
%F a(n) = A101321(7,n-1). - _R. J. Mathar_, Jul 28 2016
%F From _Amiram Eldar_, Jun 20 2020: (Start)
%F Sum_{n>=1} a(n)/n! = 9*e/2 - 1.
%F Sum_{n>=1} (-1)^n * a(n)/n! = 9/(2*e) - 1. (End)
%F a(n) = A003215(n-1) + A000217(n-1). - _Leo Tavares_, Jul 19 2022
%e a(5) = 71 because 71 = (7*5^2 - 7*5 + 2)/2 = (175 - 35 + 2)/2 = 142/2.
%e From _Bruno Berselli_, Oct 27 2017: (Start)
%e 1 = -(0) + (1).
%e 8 = -(0+1) + (2+3+4).
%e 22 = -(0+1+2) + (3+4+5+6+7).
%e 43 = -(0+1+2+3) + (4+5+6+7+8+9+10).
%e 71 = -(0+1+2+3+4) + (5+6+7+8+9+10+11+12+13). (End)
%t FoldList[#1 + #2 &, 1, 7 Range@ 50] (* _Robert G. Wilson v_, Feb 02 2011 *)
%t LinearRecurrence[{3,-3,1},{1,8,22},50] (* _Harvey P. Dale_, Jun 04 2011 *)
%o (Haskell)
%o a069099 n = length
%o [(x,y) | x <- [-n+1..n-1], y <- [-n+1..n-1], x + y <= n - 1]
%o -- _Reinhard Zumkeller_, Jan 23 2012
%o (PARI) a(n)=(7*n^2-7*n+2)/2 \\ _Charles R Greathouse IV_, Sep 24 2015
%Y Cf. A000566 (heptagonal numbers).
%Y Cf. A001263, A057655, A001106.
%Y Cf. A003215, A000217.
%K nonn,easy,nice
%O 1,2
%A _Terrel Trotter, Jr._, Apr 05 2002
|