

A292576


Permutation of the natural numbers partitioned into quadruples [4k1, 4k3, 4k2, 4k], k > 0.


3



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



OFFSET

1,1


COMMENTS

Partition the natural number sequence into quadruples starting with (1,2,3,4); swap the second and third elements, then swap the first and the second element; repeat for all quadruples.


LINKS



FORMULA

a(1)=3, a(2)=1, a(3)=2, a(4)=4, a(n) = a(n4) + 4 for n > 4.
O.g.f.: (2*x^3 + x^2  2*x + 3)/(x^5  x^4  x + 1).
a(n) = n + ((1)^(n*(n1)/2)*(2(1)^n)  (1)^n)/2.
a(n) = n + (cos(n*Pi/2)  cos(n*Pi) + 3*sin(n*Pi/2))/2.
a(n) = n + n mod 2 + (ceiling(n/2)) mod 2  2*(floor(n/2) mod 2).
Linear recurrence: a(n) = a(n1) + a(n4)  a(n5) for n>5.
First Differences, periodic: (2, 1, 2, 3), repeat; also (1)^A130569(n)*A068073(n+2) for n > 0.


PROG

(MATLAB) a = [3 1 2 4]; % Generate bfile
max = 10000;
for n := 5:max
a(n) = a(n4) + 4;
end;
(PARI) for(n=1, 10000, print1(n + ((1)^(n*(n1)/2)*(2  (1)^n)  (1)^n)/2, ", "))


CROSSREFS

Inverse: A056699(n+1)  1 for n > 0.
Sequence of fixed points: A008586(n) for n > 0.
Subsequences:
elements with even index: A042948(n) for n > 0.
indices of odd elements: A042963(n) for n > 0.
indices of even elements: A014601(n) for n > 0.
Sum of pairs of elements:
Difference between pairs of elements:
Compound relations:
Compositions:


KEYWORD

nonn


AUTHOR



STATUS

approved



