Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A129198
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A129198 Slater-Velez permutation sequence of the 2nd kind. +0
3
1, 2, 5, 3, 11, 7, 23, 4, 47, 42, 95, 89, 191, 6, 383, 376, 767, 8, 1535, 1526, 3071, 9, 6143, 6133, 12287, 10, 24575, 24564, 49151, 49139, 98303, 12, 196607, 196594, 393215, 13, 786431, 786417, 1572863, 14, 3145727, 3145712, 6291455, 15, 12582911 (list; graph; listen)
OFFSET

1,2

COMMENT

This sequence is known to be a permutation of positive integers, along with its absolute difference sequence (A129199).

The rule for constructing the sequence is as follows: a(1)=1, a(2)=2, then apply the following recursion, assuming the members are already present up to index k: let M(k)=max(a(1),a(2),...,a(k)) and let n(k) be the smallest positive integer not present in the sequence yet, while m(k) the smallest integer not present in the absolute difference sequence (d(1),d(2),...,d(k-1)), so far. Then a(k+1)=2M(k)+1 and if m(k)<=n(k) then set a(k+2)=a(k+1)-m(k), else a(k+2)=n(k).

In the paper of Slater and Velez it is shown that both the sequence a(n) and d(n) are permutations of positive integers (in spite of their strange appearance).

LINKS

P. J. Slater and W. Y. Velez, Permutations of the Positive Integers with Restrictions on the Sequence of Differences, Pacific J. Math., 71, 1977

PROGRAM

(PARI) {SV_p2(n)=local(x, v=6, d=2, j, k, mx=2, nx=3, nd=2, u, w); /* Slater-Velez permutation - the 2nd kind */ x=vector(n); x[1]=1; x[2]=2; forstep(i=3, n, 2, k=x[i]=2*mx+1; if(nd<=nx, j=x[i]-nd, j=nx); x[i+1]=j; mx=max(mx, max(j, k)); v+=2^k+2^j; u=abs(k-x[i-1]); w=abs(j-k); d+=2^u+2^w; print(i" "k" "j" "u" "w); while(bittest(v, nx), nx++); while(bittest(d, nd), nd++)); return(x)}

CROSSREFS

The absolute difference is in A129199, Cf. A081145, which can be called as Slater-Velez permutation sequence of the 1st kind.

Sequence in context: A091809 A110315 A094744 this_sequence A122442 A162613 A120858

Adjacent sequences: A129195 A129196 A129197 this_sequence A129199 A129200 A129201

KEYWORD

nonn

AUTHOR

Ferenc Adorjan (fadorjan(AT)freemail.hu or ferencadorjan(AT)gmail.com), Apr 04 2007

page 1

Search completed in 0.002 seconds

Lookup | Welcome | Find friends | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
More pages | Superseeker | Maintained by N. J. A. Sloane (njas@research.att.com)

Last modified November 27 22:38 EST 2009. Contains 167602 sequences.


AT&T Labs Research