OFFSET
0,1
COMMENTS
See the paper by A. Karabegov and J. Holland for details.
LINKS
A. Karabegov and J. Holland, Finding all solutions to the Magic Hexagram, The College Mathematics Journal, vol. 39 (2008), pp. 102-106.
Index entries for linear recurrences with constant coefficients, signature (1,1,-1).
FORMULA
O.g.f.: -(-6+5*x)/((-1+x)^2 *(1+x)). - R. J. Mathar, Mar 16 2008
a(n) = 1/4*(2*(n + 1) - 11*(-1)^(n + 1) + 11). - Ilya Gutkovskiy, Sep 18 2015
Sum_{n>=0} (-1)^(n+1)/a(n) = 137/60. - Amiram Eldar, Sep 14 2022
EXAMPLE
0 is even so a(0) = 0/2 + 6 = 6.
1 is odd so a(1) = (1+1)/2 = 1.
2 is even so a(2) = 2/2 + 6 = 7.
MAPLE
A137235 := proc(n) if n mod 2 = 0 then n/2+6 ; else (n+1)/2 ; fi ; end: seq(A137235(n), n=0..80) ; # R. J. Mathar, Mar 16 2008
MATHEMATICA
Table[If[OddQ[n], (n + 1)/2, (n + 12)/2], {n, 0, 60}] (* Erich Friedman, Mar 22 2008 *)
a=5; Table[a=n-a, {n, a, 200}] (* Vladimir Joseph Stephan Orlovsky, Nov 22 2009 *)
PROG
(PARI) a(n)=(2*n+2-11*(-1)^(n+1)+11)/4 \\ Charles R Greathouse IV, Sep 18 2015
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Parthasarathy Nambi, Mar 08 2008
EXTENSIONS
More terms from R. J. Mathar and Erich Friedman, Mar 22 2008, Mar 16 2008
Examples edited by Jon E. Schoenfield, Jan 26 2015
STATUS
approved