This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A273465 #31 Oct 13 2024 18:18:58 %S A273465 1,3,6,2,7,13,6,14,23,13,24,36,23,37,52,36,53,71,52,72,93,71,94,118, %T A273465 93,119,146,118,147,177,146,178,211,177,212,248,211,249,288,248,289, %U A273465 331,288,332,377,331,378,426,377,427 %N A273465 Numbers generated by starting at 1 and adding twice and subtracting once following the sequence of positive integers. %C A273465 This sequence is generated by listing the successive results of 1 + 2 + 3 - 4 + 5 + 6 - 7 + 8 + 9 - 10 + ... etc. %C A273465 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. %H A273465 Seiichi Manyama, <a href="/A273465/b273465.txt">Table of n, a(n) for n = 1..10000</a> %H A273465 <a href="/index/Rec#order_07">Index entries for linear recurrences with constant coefficients</a>, signature (1,0,2,-2,0,-1,1). %F A273465 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. %F A273465 G.f.: (-2*z^6 - z^4 + 6*z^3 - 3*z^2 - 2*z - 1)/((z - 1)^3*(z^2 + z + 1)^2). %F A273465 a(3*n-2) = A143689(n-1). %F A273465 From _Franck Maminirina Ramaharo_, Dec 27 2018: (Start) %F A273465 a(n) = a(n-1) + 2*a(n-3) - 2*a(n-4) - a(n-6) + a(n-7), n >= 8. %F A273465 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) %e A273465 n1 = 0 + 1 = 1 %e A273465 n2 = 1 + 2 = 3 %e A273465 n3 = 1 + 2 + 3 = 6 %e A273465 n4 = 1 + 2 + 3 - 4 = 2 %e A273465 n5 = 1 + 2 + 3 - 4 + 5 = 7 %e A273465 n6 = 1 + 2 + 3 - 4 + 5 + 6 = 13 %e A273465 n7 = 1 + 2 + 3 - 4 + 5 + 6 - 7 = 6 %e A273465 ... %e A273465 -> %e A273465 (n3, n5, n7) = (6, 7, 6) %e A273465 (n6, n8, n10) = (13, 14, 13) %e A273465 ... %e A273465 -> %e A273465 n9 = 2.n6 - n7 + 3 = 23 %t A273465 Accumulate@ Table[If[Mod[n, 3] == 1 && n > 1, -n, n], {n, 50}] (* _Michael De Vlieger_, May 23 2016 *) %t A273465 LinearRecurrence[{1,0,2,-2,0,-1,1},{1,3,6,2,7,13,6},80] (* _Harvey P. Dale_, Oct 13 2024 *) %Y A273465 Cf. A143689. %K A273465 nonn %O A273465 1,2 %A A273465 _Mattias Dooreman_, May 23 2016 %E A273465 a(25) corrected by _Seiichi Manyama_, May 26 2016