A093521 Runs of 1's of lengths 1, prime(1), prime(2), prime(3), ... separated by 0's.
1, 0, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0
Offset: 1
Keywords
References
- W. A. Dembski and J. M. Kushiner, Signs of Intelligence, Baker Book House Co., Grand Rapids, MI, p30-31, 2001,
- Carl Sagan, Contact, Simon and Schuster, Chapter 4 "Prime Numbers," pp. 68-82, NY, 1985.
Links
- Antti Karttunen, Table of n, a(n) for n = 1..24235 (first 101 runs)
- Robin Dougherty, Robert Zemeckis' Contact, Salon.
- Alex Kasman, Mathematical Fiction, Contact (1985).
- Alex Kasman, How 'Contact' by Carl Sagan Ends.
- Index entries for characteristic functions
Crossrefs
Programs
-
Mathematica
a = Table[1, {100}]; Do[ a[[Sum[Prime[i], {i, n}] + n]] = 0, {n, 1, 8}]; a
-
PARI
up_to = 111; A093521list(up_to) = { my(v=vector(up_to), i=2, j); v[1] = 1; v[2] = 0; forprime(p=2, oo, j=p; while(j, if(i==up_to, return(v), i++; v[i] = 1; j--)); if(i==up_to, return(v), i++; v[i] = 0)); }; v093521 = A093521list(up_to); A093521(n) = v093521[n];
Extensions
Data section extended up to n=111 by Antti Karttunen, Nov 08 2018
Comments