The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation. Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A065806 A pseudo-random sequence. 3
 2, 0, 4, 0, 5, 2, 8, 0, 7, 3, 8, 10, 10, 3, 6, 17, 0, 12, 16, 4, 21, 2, 18, 21, 5, 22, 22, 3, 16, 12, 14, 23, 30, 17, 29, 18, 15, 39, 0, 25, 37, 43, 0, 7, 37, 6, 33, 31, 40, 46, 37, 8, 43, 17, 22, 30, 25, 19, 43, 8, 10, 50, 49, 60, 14, 36, 45, 28, 56, 38, 33, 26, 68, 61, 63, 72, 72, 3 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,1 COMMENTS The sequence looks like a realization of a sequence of independent random variables x(n), with probability function P(x(n) = i) = 1/(n+2), i=0..n+1. The sequence (a(n)+1)/(n+3) seems to be a good U(0,1) pseudo-random number generator. Conjectures: -1 < a(n) < n+2; If a(n) = n+1 then a(n+1) = 0; All integers >1 occur in the sequence; For each c in [0,1] there exists a subsequence a(i_j) with (a(i_j)+1)/(i_j+3)-> c, j->infinity. a(A241671(n)) = 0; a(A241887(n)) = n and a(m) <> n for m < A241887(n). - Reinhard Zumkeller, Aug 09 2014 LINKS Reinhard Zumkeller, Table of n, a(n) for n = 1..10000 Klaus Strassburger, Plot of points [n, A065806(n)], n=1..20000 Klaus Strassburger, Plot of points [n,(A065806(n)+1)/(n+3)], n=1..20000 MAPLE N := 2000: b := array(-N..N, [seq(i, i=-N..N)]): s := 0; for i from 0 to N do; j := (b[i]-b[i-1]); s := s+1; a[s] := j+1; if j > N or j < -N then break; end if; c := b[i]; b[i] := b[j]; b[j] := c; end do: a := [seq(a[l], l=1..s)]; MATHEMATICA n = 2000; Clear[b]; b[i_] := b[i] = i; s = 0; For[i = 0, i <= n, i++, j = b[i] - b[i-1]; s++; a[s] = j+1; If[j > n || j < -n, Break[]]; c = b[i]; b[i] = b[j]; b[j] = c]; Table[a[l], {l, 1, s}] (* Jean-François Alcover, Sep 19 2016, adapted from Maple *) PROG (Haskell) following the Maple program import Data.IntMap (empty, findWithDefault, insert) a065806 n = a065806_list !! (n-1) a065806_list = f 0 empty where    f i m = (j + 1) : f (i + 1) (insert i (b j) \$ insert j bi m) where      j = bi - b (i - 1)      bi = b i      b x = findWithDefault x x m -- Reinhard Zumkeller, Aug 09 2014 CROSSREFS Cf. A241671, A241887. Sequence in context: A114402 A035647 A225437 * A331185 A228087 A320582 Adjacent sequences:  A065803 A065804 A065805 * A065807 A065808 A065809 KEYWORD easy,nice,nonn AUTHOR Klaus Strassburger (strass(AT)ddfi.uni-duesseldorf.de), Nov 21 2001 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified September 19 03:31 EDT 2021. Contains 347550 sequences. (Running on oeis4.)