

A273465


Numbers generated by starting at 1 and adding twice and subtracting once following the sequence of positive integers.


2



1, 3, 6, 2, 7, 13, 6, 14, 23, 13, 24, 36, 23, 37, 52, 36, 53, 71, 52, 72, 93, 71, 94, 118, 93, 119, 146, 118, 147, 177, 146, 178, 211, 177, 212, 248, 211, 249, 288, 248, 289, 331, 288, 332, 377, 331, 378, 426, 377, 427
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,2


COMMENTS

This sequence is generated by listing the successive results of 1 + 2 + 3  4 + 5 + 6  7 + 8 + 9  10 + ... etc.
By adding twice and subtracting once, the results at positions i, i+2 and i+4 are linked by the relationship: n, n+1, n.


LINKS



FORMULA

Let the sequence be written 1, 3, a, 2, a+1, b, a, b+1, c, b, c+1, d, c, ... The (a, a+1, a) triple at positions i, i+2, i+4 can be determined from the previous two sequences: (c = 2*b  a + 3). This new sequence starts at position i+3.
G.f.: (2*z^6  z^4 + 6*z^3  3*z^2  2*z  1)/((z  1)^3*(z^2 + z + 1)^2).
a(n) = a(n1) + 2*a(n3)  2*a(n4)  a(n6) + a(n7), n >= 8.
E.g.f.: (1/18)*(exp(3*x/2)*(32 + 6*x + 3*x^2) + (4  12*x)*cos(sqrt(3)*x/2)  4*sqrt(3)*(1 + x)*sin(sqrt(3)*x/2))/exp(x/2). (End)


EXAMPLE

n1 = 0 + 1 = 1
n2 = 1 + 2 = 3
n3 = 1 + 2 + 3 = 6
n4 = 1 + 2 + 3  4 = 2
n5 = 1 + 2 + 3  4 + 5 = 7
n6 = 1 + 2 + 3  4 + 5 + 6 = 13
n7 = 1 + 2 + 3  4 + 5 + 6  7 = 6
...
>
(n3, n5, n7) = (6, 7, 6)
(n6, n8, n10) = (13, 14, 13)
...
>
n9 = 2.n6  n7 + 3 = 23


MATHEMATICA

Accumulate@ Table[If[Mod[n, 3] == 1 && n > 1, n, n], {n, 50}] (* Michael De Vlieger, May 23 2016 *)


CROSSREFS



KEYWORD

nonn


AUTHOR



EXTENSIONS



STATUS

approved



