login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A265734 Permutation of nonnegative integers: a(n) = n + floor(n/5)*(-1)^(n mod 5). 6
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, 21, 32, 23, 34, 36, 25, 38, 27, 40, 42, 29, 44, 31, 46, 48, 33, 50, 35, 52, 54, 37, 56, 39, 58, 60, 41, 62, 43, 64, 66, 45, 68, 47, 70, 72, 49, 74, 51, 76, 78, 53, 80 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,3

LINKS

Bruno Berselli, Table of n, a(n) for n = 0..1000

Index entries for permutations of the positive (or nonnegative) integers.

Index entries for linear recurrences with constant coefficients, signature (0,0,0,0,2,0,0,0,0,-1).

FORMULA

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).

a(n) = 2*a(n-5) - a(n-10).

a(5*k+r) = (5+(-1)^r)*k + r, where r=0..4.

EXAMPLE

------------------------------------------------------------------------

0, 1, 2, 3, 4, 5,  6, 7,  8,  9, 10, 11, 12, 13, 14, 15, 16, 17, 18, ...

+  +  +  +  +  +   +  +   +   +   +   +   +   +   +   +   +   +   +

0, 0, 0, 0, 0, 1, -1, 1, -1,  1,  2, -2,  2, -2,  2,  3, -3,  3, -3, ...

------------------------------------------------------------------------

0, 1, 2, 3, 4, 6,  5, 8,  7, 10, 12,  9, 14, 11, 16, 18, 13, 20, 15, ...

------------------------------------------------------------------------

MATHEMATICA

Table[n + Floor[n/5] (-1)^Mod[n, 5], {n, 0, 80}]

PROG

(Sage) [n+floor(n/5)*(-1)^mod(n, 5) for n in (0..80)]

(MAGMA) [n+Floor(n/5)*(-1)^(n mod 5): n in [0..80]];

CROSSREFS

Cf. A001477.

Cf. A064455: n+floor(n/2)*(-1)^(n mod 2).

Cf. A265667: n+floor(n/3)*(-1)^(n mod 3).

Cf. A265888: n+floor(n/4)*(-1)^(n mod 4)

Sequence in context: A285039 A260307 A285041 * A299759 A232560 A183090

Adjacent sequences:  A265731 A265732 A265733 * A265735 A265736 A265737

KEYWORD

nonn,easy

AUTHOR

Bruno Berselli, Dec 15 2015 - based on an idea by Paul Curtz.

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified November 16 22:05 EST 2019. Contains 329208 sequences. (Running on oeis4.)