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 A265672 #31 Sep 08 2022 08:46:15 %S A265672 0,1,2,3,4,5,7,6,9,8,11,10,13,15,12,17,14,19,16,21,23,18,25,20,27,22, %T A265672 29,31,24,33,26,35,28,37,39,30,41,32,43,34,45,47,36,49,38,51,40,53,55, %U A265672 42,57,44,59,46,61,63,48,65,50,67,52,69,71,54,73,56,75 %N A265672 a(n) = n + floor((n+1)/7)*(-1)^((n+1) mod 7). %C A265672 A permutation of A001477. This sequence, without the terms of the form 8*k+5, becomes A265228. %C A265672 Similar sequences of the type n + floor((n+1)/k)*(-1)^((n+1) mod k): %C A265672 k = 1: A005408; %C A265672 k = 2: A014682; %C A265672 k = 3: A006369 (permutation of A001477); %C A265672 k = 4: 0, 1, 2, 4, 3, 6, 5, 9, 6, 11, 8, 14, ...; %C A265672 k = 5: 0, 1, 2, 3, 5, 4, 7, 6, 9, 11, 8, 13, ... (permutation of A001477); %C A265672 k = 6: 0, 1, 2, 3, 4, 6, 5, 8, 7, 10, 9, 13, ...; %C A265672 k = 7: this sequence. %H A265672 G. C. Greubel, <a href="/A265672/b265672.txt">Table of n, a(n) for n = 0..5000</a> %H A265672 <a href="/index/Rec#order_14">Index entries for linear recurrences with constant coefficients</a>, signature (0,0,0,0,0,0,2,0,0,0,0,0,0,-1). %F A265672 a(n) = a(n-7) + (-1)^((n+1) mod 7) + 7 for n>6. %F A265672 From _Colin Barker_, Dec 13 2015: (Start) %F A265672 a(n) = 2*a(n-7) - a(n-14) for n>13. %F A265672 G.f.: x*(1 +x^2)*(1 +2*x +2*x^2 +2*x^3 +3*x^4 +5*x^5 +3*x^6 +2*x^7 +x^8 +3*x^9 +x^10) / ((1 -x)^2*(1 +x +x^2 +x^3 +x^4 +x^5 +x^6)^2). (End) %e A265672 ------------------------------------------------------------------------- %e A265672 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, ... %e A265672 + + + + + + + + + + + + + + + + + + + %e A265672 0, 0, 0, 0, 0, 0, 1, -1, 1, -1, 1, -1, 1, 2, -2, 2, -2, 2, -2, ... %e A265672 ------------------------------------------------------------------------- %e A265672 0, 1, 2, 3, 4, 5, 7, 6, 9, 8, 11, 10, 13, 15, 12, 17, 14, 19, 16, ... %e A265672 ------------------------------------------------------------------------- %p A265672 A265672:=n->n + floor((n+1)/7)*(-1)^((n+1) mod 7): seq(A265672(n), n=0..100); # _Wesley Ivan Hurt_, Apr 09 2017 %t A265672 Table[n + Floor[(n + 1)/7] (-1)^Mod[n + 1, 7], {n, 0, 80}] (* _Bruno Berselli_, Dec 22 2015 *) %o A265672 (PARI) concat(0, Vec(x*(1 +x^2)*(1 +2*x +2*x^2 +2*x^3 +3*x^4 +5*x^5 +3*x^6 +2*x^7 +x^8 +3*x^9 +x^10) / ((1 -x)^2*(1 +x +x^2 +x^3 +x^4 +x^5 +x^6)^2) + O(x^100))) \\ _Colin Barker_, Dec 13 2015 %o A265672 (Magma) [n+Floor((n+1)/7)*(-1)^((n+1) mod 7): n in [0..80]]; // _Bruno Berselli_, Dec 26 2015 %Y A265672 Cf. A001477, A006369, A265228, A265667, A265734. %K A265672 nonn,easy %O A265672 0,3 %A A265672 _Paul Curtz_, Dec 13 2015 %E A265672 Edited by _Bruno Berselli_, Dec 22 2015