

A130508


a(1)=2. a(2)=3. a(3)=1. a(n+3) = 3 + a(n), for all positive integers n.


1



2, 3, 1, 5, 6, 4, 8, 9, 7, 11, 12, 10, 14, 15, 13, 17, 18, 16, 20, 21, 19, 23, 24, 22, 26, 27, 25, 29, 30, 28, 32, 33, 31, 35, 36, 34, 38, 39, 37, 41, 42, 40, 44, 45, 43, 47, 48, 46, 50, 51, 49, 53, 54, 52, 56, 57, 55, 59, 60, 58, 62, 63, 61, 65, 66, 64, 68
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,1


COMMENTS

This sequence is a permutation of the positive integers, where each a(n) is the smallest positive integer not occurring earlier in the sequence such that the mth term of the inverse permutation A130509 never equals a(m), for all positive integers m.


LINKS

Table of n, a(n) for n=1..67.
Index entries for linear recurrences with constant coefficients, signature (1, 0, 1, 1).


FORMULA

a(1)=2, a(2)=3, a(3)=1, a(4)=5, a(n)=a(n1)+a(n3)a(n4).  Harvey P. Dale, Feb 02 2015
a(n) = n  2*cos(2*n*Pi/3).  Wesley Ivan Hurt, Sep 27 2017


MATHEMATICA

Transpose[NestList[{#[[2]], #[[3]], #[[1]]+3}&, {2, 3, 1}, 100]][[1]] (* Harvey P. Dale, Sep 08 2011 *)
LinearRecurrence[{1, 0, 1, 1}, {2, 3, 1, 5}, 100] (* Harvey P. Dale, Feb 02 2015 *)


CROSSREFS

Cf. A130509.
Sequence in context: A195508 A049274 A339470 * A182938 A329445 A055231
Adjacent sequences: A130505 A130506 A130507 * A130509 A130510 A130511


KEYWORD

easy,nonn


AUTHOR

Leroy Quet, Jun 01 2007


EXTENSIONS

More terms from Harvey P. Dale, Feb 02 2015


STATUS

approved



