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.

Showing 1-3 of 3 results.

A129680 Distance sequence of A129676: A129676(n)-n.

Original entry on oeis.org

2, -1, 2, 0, 1, -4, 2, -1, 1, 2, 0, -4, 2, -1, 2, 0, 1, 2, 0, -6, 2, -1, 1, -2, 2, -1, 2, 0, 1, -4, 2, -1, 1, 2, 0, -4, 2, -1, 1, -2, 2, -1, 2, 0, 1, 2, 0, -6, 2, -1, 2, 0, 1, -4, 2, -1, 1, 2, 0, -4, 2, -1, 2, 0, 1, 2, 0, -6, 2, -1, 1, -2, 2, -1, 2, 0, 1, 2, 0, -6, 2, -1, 2, 0, 1, -4, 2, -1, 1, 2, 0, -4, 2, -1, 1, -2, 2, -1, 2
Offset: 1

Views

Author

Ferenc Adorjan (fadorjan(AT)freemail.hu or ferencadorjan(AT)gmail.com), May 01 2007

Keywords

Comments

The numbers in this sequence seem to be in range [-6,2], but they are never -3 nor -5 (tested up to 10^4). The relative density of the values {-6,-4,-2,-1,0,1,2} asymptotically is {1,2,1,4,4,4,8}.

Crossrefs

Distance of A129676, Cf. A129678, A129679, A129681 and A000069.

A129677 Inverse permutation to A129676.

Original entry on oeis.org

2, 6, 1, 4, 3, 5, 8, 12, 7, 9, 11, 10, 14, 20, 13, 16, 15, 17, 19, 18, 22, 24, 21, 23, 26, 30, 25, 28, 27, 29, 32, 36, 31, 33, 35, 34, 38, 40, 37, 39, 42, 48, 41, 44, 43, 45, 47, 46, 50, 54, 49, 52, 51, 53, 56, 60, 55, 57, 59, 58, 62, 68, 61, 64, 63, 65, 67, 66, 70, 72, 69, 71
Offset: 1

Views

Author

Ferenc Adorjan (fadorjan(AT)freemail.hu or ferencadorjan(AT)gmail.com), May 01 2007

Keywords

Comments

The inversion maintains the cyclic characteristics described in A129676.

Crossrefs

Inverse of A129676, cf. A128754, A128755, A129681 and A000069.

Programs

  • PARI
    {pinverse(v)= /* Permutation inverse of a positive sequence */
    local(n,m,x);n=matsize(v)[2]; x=vector(n);
    for(i=1,n,if(v[i]<=n,x[v[i]]=i)); return(x)}
    a=pinverse(A129676)

A129674 Permutation sequence generated by the "evil numbers" (A001969), by swapping n-th natural number by the (n-g)-th sequentially (iteratively), where g=min(evil(n+1)-evil(n)-1,n-1).

Original entry on oeis.org

3, 2, 1, 6, 4, 7, 5, 10, 8, 12, 11, 13, 15, 14, 9, 18, 16, 20, 19, 21, 17, 24, 22, 25, 27, 26, 23, 30, 28, 31, 29, 34, 32, 36, 35, 37, 33, 40, 38, 41, 43, 42, 39, 46, 44, 48, 47, 49, 51, 50, 45, 54, 52, 55, 53, 58, 56, 60, 59, 61, 63, 62, 57, 66, 64, 68, 67, 69, 65, 72, 70, 73
Offset: 1

Views

Author

Ferenc Adorjan (fadorjan(AT)freemail.hu or ferencadorjan(AT)gmail.com), May 01 2007

Keywords

Comments

In contrast to A128754 and A128756 (which are generated analogously from the primes and the lucky numbers, respectively), this sequence seems consisting solely of fixed points and cycles of length 4, 5 and 6 (apart from the initial cycle of length 2). It is also notable that the difference of the number of fixed points and the number of cycles never differs by more than 4, up to index 10000, according to numerical tests. Thus the ratio of the number of fixed points to the number of cycles seems to be asymptotically equal to unity.

Crossrefs

Programs

  • PARI
    {vperm(z)=local(n,m,q,v,x,j,g);
    /* Permutation of positive integers so that starting with the sequence of positive integers, sequentially swap the i-th term with max(i-g(i),1)-th term, where g(i)=z[i+1]-z[i]-1. */
    j=matsize(z)[2]-1;n=j-z[j]+z[j-6];v=vector(j);x=vector(n);for(i=1,j,v[i]=i);
    for(i=1,j,g=min(z[i+1]-z[i]-1,i-1);q=v[i];v[i]=v[i-g];v[i-g]=q);for(i=1,n,x[i]=v[i]);return(x)}
    a=vperm(A001969)
Showing 1-3 of 3 results.