login
This site is supported by donations to The OEIS Foundation.

 

Logo

The OEIS is looking to hire part-time people to help edit core sequences, upload scanned documents, process citations, fix broken links, etc. - Neil Sloane, njasloane@gmail.com

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A275973 A binary sequence due to Harold Jeffreys. 4
1, 0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 (list; graph; refs; listen; history; text; internal format)
OFFSET

1

COMMENTS

Jeffreys defined this sequence in the context of sampling an events generator. Let a(n)=1 indicate that in the n-th sampling interval an event was detected; otherwise, set a(n)=0. This sequence's generator operates in such a way that a(1)=1 is followed by alternating blocks of 0's and blocks of 1's, each block having the same length as the whole sequence section which preceeds it.

The pedagogical merit of the sequence consists in the fact that the would-be mean density of events, d(N) = (Sum_{n=1..N}a(n))/N = A275974(N)/N, does not converge to any limit when N grows to infinity. Rather, it oscillates (with exponentially growing cycle lengths) between liminf_{N->infinity} d(N) = 1/3 and limsup_{N->infinity} d(N) = 2/3.

When interpreted as binary digits of a real number, the sequence evaluates to 1-A275975. In fact, it can be written as 1 - Sum_{k>=0}((-1)^k/2^2^k), with each pair of consecutive terms {1/2^2^(2m-1) - 1/2^2^(2m)}, for m = 1,2,3,..., giving rise to one of the blocks of one's.

REFERENCES

H. Jeffreys, Scientific Inference, Cambridge University Press, 3rd ed., 1973 (first published in 1931), Chapter III, page 47.

LINKS

Stanislav Sykora, Table of n, a(n) for n = 1..2100

Index entries for sequences related to binary expansion of n

FORMULA

From Robert Israel, Aug 16 2016: (Start)

G.f.: (1-x)*(1-x*Sum_{j>=0}(-1)^j*x^(2^j)).

a(n) - a(n+1) = A154269(n). (End)

a(1) = 1, a(2) = 0, for n > 2, a(n) = A030301(n-1) = A000035(A000523(n-1)). - Antti Karttunen, Sep 04 2016

MAPLE

S:= series((1-x)^(-1)*(1-x*add((-1)^j*x^(2^j), j=0..9)), x, 1001):

seq(coeff(S, x, j), j=1..1000); # Robert Israel, Aug 16 2016

PROG

(PARI) \\ A vector-returning version adherent to the original definition:

JeffreysSequence(nmax) = {  \\ Function returning a vector of length nmax

  my(a=vector(nmax), n=0, p=1); a[n++]=1;

  while(n<nmax,

    for(k=2^(p-1)+1, 2^p, a[n++]=0; if(n==nmax, break));

    if(n<nmax, for(k=2^p+1, 2^(p+1), a[n++]=1; if(n==nmax, break)));

    p+=2; );

  return(a); }

a = JeffreysSequence(2100) \\ An actual invocation

(PARI) \\ A function returning the n-th term:

a(n)={my(p=1, np=n-1); while(np, p++; np=np\2); return(bitand(p, 1)); }

(Scheme)

;; A version after the above PARI-program. Here (A000035 n) = (modulo n 2) or (mod n 2), depending on the version of Scheme used:

(define (A275973_with_loop n) (let loop ((p 1) (np (- n 1))) (if (zero? np) (A000035 p) (loop (+ 1 p) (/ (- np (A000035 np)) 2)))))

;; The above in turn reduces to this simple formula:

(define (A275973 n) (if (<= n 2) (A000035 n) (A030301 (- n 1))))

;; Antti Karttunen, Sep 04 2016

CROSSREFS

Cf. A000035, A000523, A030301, A275974 (partial sums), A275975, A154269.

Sequence in context: A266377 A266326 A246260 * A267006 A265246 A227998

Adjacent sequences:  A275970 A275971 A275972 * A275974 A275975 A275976

KEYWORD

nonn,base

AUTHOR

Stanislav Sykora, Aug 15 2016

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 | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy .

Last modified May 28 17:57 EDT 2017. Contains 287241 sequences.