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

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A080782 a(1)=1, a(n)=a(n-1)-1 if n is already in the sequence, a(n)=a(n-1)+2 otherwise. 7
1, 3, 2, 4, 6, 5, 7, 9, 8, 10, 12, 11, 13, 15, 14, 16, 18, 17, 19, 21, 20, 22, 24, 23, 25, 27, 26, 28, 30, 29, 31, 33, 32, 34, 36, 35, 37, 39, 38, 40, 42, 41, 43, 45, 44, 46, 48, 47, 49, 51, 50, 52, 54, 53, 55, 57, 56, 58, 60, 59, 61, 63, 62, 64, 66, 65, 67, 69, 68 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

COMMENTS

Permutation of the integers: exchange trisections starting with 2 and 3.

a(a(n)) = n. - Reinhard Zumkeller, Oct 29 2004

LINKS

Table of n, a(n) for n=1..69.

Index entries for sequences that are permutations of the natural numbers

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

FORMULA

a(n)-n is periodic with period 3.

a(n) = n + ((n+1) mod 3), with n>=0. - Paolo P. Lava, Jun 26 2007

G.f.: x*(1+2*x-x^2+x^3)/(1-x-x^3+x^4). [Jaume Oliver Lafont, Mar 24 2009]

a(0)=1, a(1)=3, a(2)=2, a(3)=4, a(n)=a(n-1)+0*a(n-2)+a(n-3)-a(n-4). - Harvey P. Dale, Mar 29 2013

a(n) = n+(2/sqrt(3))*sin(2*(n+2)*Pi/3). - Wesley Ivan Hurt, Sep 26 2017

MATHEMATICA

Array[#+Mod[#+1, 3]&, 70, 0] (* or *) LinearRecurrence[{1, 0, 1, -1}, {1, 3, 2, 4}, 70] (* Harvey P. Dale, Mar 29 2013 *)

CROSSREFS

Cf. A079357, A079354, A080783, A064437.

Equals A064429(n-1) + 1. Cf. A004442, A080412.

Sequence in context: A187566 A049831 A186005 * A116941 A166695 A254107

Adjacent sequences:  A080779 A080780 A080781 * A080783 A080784 A080785

KEYWORD

nonn,easy

AUTHOR

Benoit Cloitre, Mar 07 2003

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 March 26 20:47 EDT 2019. Contains 321535 sequences. (Running on oeis4.)