login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A174239 a(n) = (3*n + 1 + (-1)^n*(n+3))/4. 4
1, 0, 3, 1, 5, 2, 7, 3, 9, 4, 11, 5, 13, 6, 15, 7, 17, 8, 19, 9, 21, 10, 23, 11, 25, 12, 27, 13, 29, 14, 31, 15, 33, 16, 35, 17, 37, 18, 39, 19, 41, 20, 43, 21, 45, 22, 47, 23, 49, 24, 51, 25, 53, 26, 55, 27, 57, 28, 59, 29, 61, 30, 63, 31, 65, 32, 67, 33, 69, 34, 71, 35, 73, 36, 75, 37, 77, 38, 79, 39, 81 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
COMMENTS
Obtained from A026741 by swapping pairs of consecutive entries.
The main diagonal of an array with this sequence in the top row and further rows defined by the first differences of their previous row is essentially 1 followed by 3*A045623(.):
1, 0, 3, 1, 5, 2, 7, 3, 9, 4, 11, 5, 13, 6, 15, 7, 17, 8, ...
-1, 3, -2, 4, -3, 5, -4, 6, -5, 7, -6, 8, -7, 9, -8, 10, -9, ...
4, -5, 6, -7, 8, -9, 10, -11, 12, -13, 14, -15, 16, -17, ...
-9, 11, -13, 15, -17, 19, -21, 23, -25, 27, -29, 31, ...
20, -24, 28, -32, 36, -40, 44, -48, 52, -56, 60, -64, ...
-44, 52, -60, 68, -76, 84, -92, 100, -108, 116, -124, 132, ...
96, -112, 128, -144, 160, -176, 192, -208, 224, -240, ...
Also, numerator of (Nimsum n+1)/2 = A004442(n)/2. - Wesley Ivan Hurt, Mar 21 2015
LINKS
FORMULA
a(2n) = 2n+1; a(2n+1) = n.
a(n) = 2*a(n-2) - a(n-4).
a(2n+1) - 2*a(2n) = -A016789(n+1).
a(2n+2) - 2*a(2n+1) = 3.
G.f.: ( 1+x^2+x^3 ) / ( (x-1)^2*(1+x)^2 ). - R. J. Mathar, Feb 07 2011
MAPLE
A174239:=n->(3*n+1+(-1)^n*(n+3))/4: seq(A174239(n), n=0..100); # Wesley Ivan Hurt, Mar 21 2015
MATHEMATICA
Table[(3 n + 1 + (-1)^n*(n + 3))/4, {n, 0, 100}] (* Wesley Ivan Hurt, Mar 21 2015 *)
LinearRecurrence[{0, 2, 0, -1}, {1, 0, 3, 1}, 90] (* Harvey P. Dale, Jul 16 2018 *)
PROG
(Magma) [(3*n+1 +(-1)^n*(n+3))/4: n in [0..80]]; // Vincenzo Librandi, Feb 08 2011
CROSSREFS
Cf. A004442.
Sequence in context: A276505 A201901 A331381 * A066249 A065168 A318581
KEYWORD
nonn,easy
AUTHOR
Paul Curtz, Mar 13 2010
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 23 20:33 EDT 2024. Contains 371916 sequences. (Running on oeis4.)