%I M5363 #61 Aug 02 2024 06:56:38
%S 1,91,8911,873181,85562821,8384283271,821574197731,80505887094361,
%T 7888755361049641,773017519495770451,75747828155224454551,
%U 7422514141692500775541,727330638057709851548461,71270980015513872950973631,6983828710882301839343867371,684343942686450066382748028721
%N Hexagonal numbers (A000384) which are also centered hexagonal numbers (A003215).
%C Equivalently, triangular hex numbers.
%D M. Gardner, Time Travel and Other Mathematical Bewilderments. Freeman, NY, 1988, p. 19.
%D N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
%H Jon E. Schoenfield, <a href="/A006244/b006244.txt">Table of n, a(n) for n = 1..500</a>
%H Simon Plouffe, <a href="https://arxiv.org/abs/0911.4975">Approximations de séries génératrices et quelques conjectures</a>, Dissertation, Université du Québec à Montréal, 1992; arXiv:0911.4975 [math.NT], 2009.
%H Simon Plouffe, <a href="/A000051/a000051_2.pdf">1031 Generating Functions</a>, Appendix to Thesis, Montreal, 1992
%H S. C. Schlicker, <a href="http://www.jstor.org/stable/10.4169/math.mag.84.5.339">Numbers Simultaneously Polygonal and Centered Polygonal</a>, Mathematics Magazine, Vol. 84, No. 5, December 2011, pp. 339-350.
%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/HexNumber.html">Hex Number</a>
%H <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (99,-99,1).
%F From _Richard Choulet_, Sep 19 2007: (Start)
%F We must solve 2*r^2-r=3*p^2-3*p+1, which gives X^2=6*Y^2+3 with X=4*r-1 and Y=2*p-1. We obtain at the same time the following sequences:
%F X is given by 3, 27, 267, ... sequence for which a(n+2)=10*a(n+1)-a(n) and a(n+1)=5*a(n)+2*(6a(n)^2-18)^0.5
%F Y is given by 1, 11, 109, ... sequence for which a(n+2)=10*a(n+1)-a(n) and a(n+1)=5*a(n)+2*(6a(n)^2+3)^0.5
%F p is given by 1, 6, 55, 540, ... sequence for which a(n+2)=10*a(n+1)-a(n)-4 and a(n+1)=5*a(n)-2+(24*a(n)^2-24*a(n)+9)^0.5
%F r is given by 1, 7, 67, 661, ... sequence for which a(n+2)=10*a(n+1)-a(n)-2 and a(n+1)=5*a(n)-1+(24*a(n)^2-12*a(n)-3)^0.5
%F a(n+2) = 98*a(n+1)-a(n)-6, a(n+1)=49*a(n)-3+5*(96*a(n)^2-12*a(n)-3)^0.5.
%F G.f.: z*(1-8*z+z^2)/((1-z)*(1-98*z+z^2)). (End)
%F Define x(n) + y(n)*sqrt(24) = (6+sqrt(24))*(5+sqrt(24))^n, s(n) = (y(n)+1)/2; then a(n) = (1/2)*(2+6*(s(n)^2-s(n))). - _Steven Schlicker_, Apr 24 2007
%F a(n) = (A007667(n+1)-1)/4. - _Ralf Stephan_, Mar 03 2004
%F a(n) = 99*a(n-1)-99*a(n-2)+a(n-3). - _Colin Barker_, Jan 08 2015
%e a(1)=91 because 91 is the sixth centered hexagonal number and the seventh hexagonal number.
%p CP := n -> 1+1/2*6*(n^2-n): N:=10: u:=5: v:=1: x:=6: y:=1: k_pcp:=[1]: for i from 1 to N do tempx:=x; tempy:=y; x:=tempx*u+24*tempy*v: y:=tempx*v+tempy*u: s:=(y+1)/2: k_pcp:=[op(k_pcp),CP(s)]: end do: k_pcp; # _Steven Schlicker_, Apr 24 2007
%p A006244:=-(1-8*z+z**2)/(z-1)/(z**2-98*z+1); # Conjectured (correctly) by _Simon Plouffe_ in his 1992 dissertation.
%p a := n -> (Matrix([[91,1,1]]). Matrix([[99,1,0],[ -99,0,1],[1,0,0]])^n)[1,3]; seq (a(n), n=1..20); # _Alois P. Heinz_, Aug 14 2008
%t CoefficientList[Series[(1 - 8*x + x^2)/(1 - 99*x + 99*x^2 - x^3), {x, 0, 20}], x] (* _Jean-François Alcover_, Feb 26 2015 *)
%o (PARI) Vec(-x*(x^2-8*x+1)/((x-1)*(x^2-98*x+1)) + O(x^100)) \\ _Colin Barker_, Jan 08 2015
%Y Cf. A001570, A001921, A000384, A003215, A253175.
%K nonn,easy
%O 1,2
%A _N. J. A. Sloane_, _Jeffrey Shallit_
%E Edited by _N. J. A. Sloane_, Sep 25 2007
%E More terms from _Alois P. Heinz_, Aug 14 2008
%E More terms from _Jon E. Schoenfield_, Dec 26 2008