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.

A128756 Permutation sequence related to lucky numbers A000959: starting with the integers, for n = 1, 2, 3, ... swap the n-th and the (n-g)-th element, where g = A000959(n+1) - A000959(n) - 1.

This page as a plain text file.
%I A128756 #11 Jan 09 2020 03:10:41
%S A128756 6,3,14,7,2,11,12,9,1,5,4,15,20,17,26,21,22,23,36,10,19,31,8,13,32,27,
%T A128756 16,29,34,33,48,30,28,39,42,41,44,35,37,43,24,45,52,47,50,51,58,55,25,
%U A128756 67,56,53,38,63,62,54,64,61,40,77,66,71,68,18,70,59,78,79,74,85,65,46
%N A128756 Permutation sequence related to lucky numbers A000959: starting with the integers, for n = 1, 2, 3, ... swap the n-th and the (n-g)-th element, where g = A000959(n+1) - A000959(n) - 1.
%C A128756 Similarly to A128754, this sequence also shows the characteristics of an "infinite braid".
%H A128756 Ferenc Adorjan, <a href="/A128756/b128756.txt">Table of n,a(n) for n=1..10000</a>
%H A128756 <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a>
%o A128756 (PARI) {vperm(z)=local(n,j,g); /* Permutation of positive integers: starting with the sequence of positive integers, for i = 1, 2, 3,..., swap the i-th term with max(i-g(i),1)-th term, where g(i) = z[i+1]-z[i]-1. */
%o A128756   j=length(z)-1; n=j-z[j]+z[j-6]; v=[1..j];
%o A128756   for(i=1,j, g=min(z[i+1]-z[i]-1,i-1); [v[i],v[i-g]]=[v[i-g],v[i]]);
%o A128756   return(v[1..n])}
%o A128756 a=vperm(A000959_upto(10^3))
%Y A128756 Inverse of A128757. Cf. A128754, A128755 and A000959.
%K A128756 nonn
%O A128756 1,1
%A A128756 Ferenc Adorjan (fadorjan(AT)freemail.hu or ferencadorjan(AT)gmail.com), Mar 24 2007
%E A128756 Edited by _M. F. Hasler_, Jan 09 2020