

A137235


a(n) = (n+1)/2 if n is odd; a(n) = n/2 + 6 if n is even.


1



6, 1, 7, 2, 8, 3, 9, 4, 10, 5, 11, 6, 12, 7, 13, 8, 14, 9, 15, 10, 16, 11, 17, 12, 18, 13, 19, 14, 20, 15, 21, 16, 22, 17, 23, 18, 24, 19, 25, 20, 26, 21, 27, 22, 28, 23, 29, 24, 30, 25, 31, 26, 32, 27, 33, 28, 34, 29, 35, 30, 36, 31, 37, 32, 38, 33, 39, 34, 40, 35, 41, 36, 42, 37
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

0,1


COMMENTS

See the paper by A. Karabegov and J. Holland for details.


LINKS

Table of n, a(n) for n=0..73.
A. Karabegov and J. Holland, Finding all solutions to the Magic Hexagram, The College Mathematics Journal, vol. 39 (2008), pp. 102106.
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


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=na, {n, a, 200}] (* Vladimir Joseph Stephan Orlovsky, Nov 22 2009 *)


PROG

(PARI) a(n)=(2*n+211*(1)^(n+1)+11)/4 \\ Charles R Greathouse IV, Sep 18 2015


CROSSREFS

Sequence in context: A113811 A126168 A028323 * A021166 A131231 A200307
Adjacent sequences: A137232 A137233 A137234 * A137236 A137237 A137238


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



