cp's OEIS Frontend

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.

A265734 Permutation of nonnegative integers: a(n) = n + floor(n/5)*(-1)^(n mod 5).

This page as a plain text file.
%I A265734 #33 Jul 09 2025 04:40:40
%S A265734 0,1,2,3,4,6,5,8,7,10,12,9,14,11,16,18,13,20,15,22,24,17,26,19,28,30,
%T A265734 21,32,23,34,36,25,38,27,40,42,29,44,31,46,48,33,50,35,52,54,37,56,39,
%U A265734 58,60,41,62,43,64,66,45,68,47,70,72,49,74,51,76,78,53,80
%N A265734 Permutation of nonnegative integers: a(n) = n + floor(n/5)*(-1)^(n mod 5).
%H A265734 Bruno Berselli, <a href="/A265734/b265734.txt">Table of n, a(n) for n = 0..1000</a>
%H A265734 <a href="/index/Rec#order_10">Index entries for linear recurrences with constant coefficients</a>, signature (0,0,0,0,2,0,0,0,0,-1).
%H A265734 <a href="/index/Per#IntegerPermutation">Index entries for permutations of the positive (or nonnegative) integers</a>.
%F A265734 G.f.: x*(1 + 2*x + 3*x^2 + 4*x^3 + 6*x^4 + 3*x^5 + 4*x^6 + x^7 + 2*x^8) / ((1 - x)^2*(1 + x + x^2 + x^3 + x^4)^2).
%F A265734 a(n) = 2*a(n-5) - a(n-10).
%F A265734 a(5*k+r) = (5+(-1)^r)*k + r, where r=0..4.
%F A265734 Sum_{n>=1} (-1)^(n+1)/a(n) = Pi*(1/(2*sqrt(2))-1/(3*sqrt(3))) + log(2)/6. - _Amiram Eldar_, Mar 30 2023
%e A265734 ------------------------------------------------------------------------
%e A265734 0, 1, 2, 3, 4, 5,  6, 7,  8,  9, 10, 11, 12, 13, 14, 15, 16, 17, 18, ...
%e A265734 +  +  +  +  +  +   +  +   +   +   +   +   +   +   +   +   +   +   +
%e A265734 0, 0, 0, 0, 0, 1, -1, 1, -1,  1,  2, -2,  2, -2,  2,  3, -3,  3, -3, ...
%e A265734 ------------------------------------------------------------------------
%e A265734 0, 1, 2, 3, 4, 6,  5, 8,  7, 10, 12,  9, 14, 11, 16, 18, 13, 20, 15, ...
%e A265734 ------------------------------------------------------------------------
%t A265734 Table[n + Floor[n/5] (-1)^Mod[n, 5], {n, 0, 80}]
%o A265734 (Sage) [n+floor(n/5)*(-1)^mod(n, 5) for n in (0..80)]
%o A265734 (Magma) [n+Floor(n/5)*(-1)^(n mod 5): n in [0..80]];
%Y A265734 Cf. A001477.
%Y A265734 Cf. A064455: n+floor(n/2)*(-1)^(n mod 2).
%Y A265734 Cf. A265667: n+floor(n/3)*(-1)^(n mod 3).
%Y A265734 Cf. A265888: n+floor(n/4)*(-1)^(n mod 4)
%K A265734 nonn,easy
%O A265734 0,3
%A A265734 _Bruno Berselli_, Dec 15 2015 - based on an idea by _Paul Curtz_