# Much More lucky numbers

A000959 Lucky numbers.

1, 3, 7, 9, 13, 15, 21, 25, 31, 33, 37, 43, 49, 51, 63, 67, 69, 73, 75, 79, 87, 93, 99, 105, 111, 115, 127, 129, 133, 135, 141, 151, 159, 163, 169, 171, 189, 193, 195, 201, 205, 211, 219, 223, 231, 235, 237, 241, 259, 261, 267, 273, 283, 285, 289, 297, 303 (list; graph; refs; listen; history; text; internal format/The Encyclopedia of Integer Sequences!)

An interesting general discussion of the phenomenon of 'random primes' (generalizing the lucky numbers) occurs in Hawkins (1958). Heyde (1978) proves that Hawkins' random primes do not only almost always satisfy the Prime Number Theorem but also the Riemann Hypothesis. - Alf van der Poorten, Jun 27 2002

A145649(a(n)) = 1; complement of A050505. - Reinhard Zumkeller, Oct 15 2008
Bui and Keating establish an asymptotic formula for the number of k-difference twin primes, and more generally to all l-tuples, of Hawkins primes, a probabilistic model of the Eratosthenes sieve. The formula for k = 1 was obtained by Wunderlich [Acta Arith. 26 (1974), 59 - 81]. - Jonathan Vos Post, Mar 24 2009. (This is quoted from the abstract of the Bui-Heating (2006) article, Joerg Arndt, Jan 04 2014) It appears that a 1's line is formed, as in the Gilbreath's conjecture, if we use 2 (or 4), 3, 5 (differ of 7), 9, 13, 15, 21, 25,... instead of A000959 1, 3, 7, 9, 13, 15, 21, 25, ... - Eric Desbiaux, Mar 25 2010

REFERENCES

Martin Gardner, Lucky numbers and 2187, Math. Intellig., 19 (No. 2, 1997), 26-29.
Martin Gardner, Gardner's Workout, Chapter 21 "Lucky Numbers and 2187" pp. 149-156 A. K. Peters MA 2002.
Vema Gardiner, R. Lazarus, N. Metropolis and Stanislaw Ulam, On certain sequences of integers defined by sieves, Math. Mag., 29 (1955), 117-119.

Richard K. Guy, Unsolved Problems in Number Theory, C3.
D. Hawkins, The random sieve, Math. Mag. 31 (1958), 1-3.
D. Hawkins and W. E. Briggs, The lucky number theorem. Math. Mag. 31 1958 81-84.
C. C. Heyde, Ann. Probability, 6 (1978), 850-875.
C. S. Ogilvy, Tomorrow's Math. 2nd ed., Oxford Univ. Press, 1972, p. 99.
N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
David Wells, The Penguin Dictionary of Curious and Interesting Numbers. Penguin Books, NY, 1986, 114.

H. M. Bui, J. P. Keating, On twin primes associated with the Hawkins random sieve, version 2, Mar 24, 2009. J. Number Theory 119 (2006), 284-296.
Ivars Peterson, MathTrek, Martin Gardner's Lucky Numbers (archived on Archive.org)
Ivars Peterson, Martin Gardner's Lucky Numbers (archived on Wikiwix.com)
Walter Schneider, Lucky Numbers
Torsten Sillke, S. M. Ulam's Lucky Numbers
Hugo van der Sanden, Lucky numbers up to 1e8
G. Villemin's Almanach of Numbers, Nombre Chanceux
Eric Weisstein's World of Mathematics, Lucky number.
Wikipedia, Lucky number
David W. Wilson, Fast space-efficient sequence generating program in C++
Index entries for "core" sequences
Index entries for sequences generated by sieves Reinhard Zumkeller, Oct 15 2008]

MAPLE

## luckynumbers(n) returns all lucky numbers from 1 to n. ## Try n=10^5 just for fun. luckynumbers:=proc(L) local k, Lnext, Lprev; Lprev:=[\$1..n]; for k from 1 do if k=1 or k=2 then Lnext:= map(w-> Lprev[w], remove(z -> z mod Lprev[2] = 0, [\$1..nops(Lprev)])); if nops(Lnext)=nops(Lprev) then break fi; Lprev:=Lnext; else Lnext:= map(w-> Lprev[w], remove(z -> z mod Lprev[k] = 0, [\$1..nops(Lprev)])); if nops(Lnext)=nops(Lprev) then break fi; Lprev:=Lnext; fi; od; return Lnext; end: - Walter Kehowski, Jun 05 2008

MATHEMATICA

luckies = 2*Range@200 - 1; f[n_] := Block[{k = luckies[[n]]}, luckies = Delete[luckies, Table[{k}, {k, k, Length@luckies, k}]]]; Do[f@n, {n, 2, 30}]; luckies (* Robert G. Wilson v, May 09 2006 *)
sieveMax = 10^6; luckies = Range[1, sieveMax, 2]; sieve[n_] := Module[{k = luckies[[n]]}, luckies = Delete[luckies, Table[{i}, {i, k, Length[luckies], k}]]]; n = 1; While[luckies[[n]] < Length[luckies], n++; sieve[n]]; luckies
PROG
a000959 n = a000959_list !! (n-1)
a000959_list = 1 : sieve 2 [1, 3..] where sieve k xs = z : sieve (k + 1) (lucky xs) where z = xs !! (k - 1 ) lucky ws = us ++ lucky vs where (us, _:vs) = splitAt (z - 1) ws

-- Reinhard Zumkeller, Dec 05 2011

(PARI) A000959(nMax)={my(v=vector(nMax, i, i), i, k); while(v[i=!k+k++]<=#v, v=vecextract(v, 2^#v-1-sum(j=1, #v\v[i], 2^(v[i]*j-1)))); v}

\\ - M. F. Hasler, Sep 22 2013 CROSSREFS

Cf. A137164-A137185, A039672, A045954.
Sequence in context: A073671 A172367 A024901 * A204085 A230076 A120226
Adjacent sequences: A000956 A000957 A000958 * A000960 A000961 A000962

AUTHOR N. J. A. Sloane. Entry updated Mar 07 2008

---------------------------------------------------------

The Penguin Dictionary of Curious and Interesting Numbers (D. Wells):

In the foreword to G.H. Hardy's book A Mathematician's Apology, C.P. Snow tells an anecdote about Hardy and his collaborator Srinavasa Ramanujan. Hardy, perhaps the greatest number theorist of 20th century, took a taxi from London to the hospital at Putney where Ramanujan was dying of tuberculosis, Hardy noticed its number, 1729. Always inept about introducing a conversation, he entered the room where Ramanujan was lying in bed and, with scarcely a hello, blurted out his opinion about the taxi-cab number. It was, he declared, "rather a dull number," adding that he hoped that wasn't a bad omen. "No, Hardy! No, Hardy," said Ramanujan, "it is a very interesting number. It is the smallest number expressible as the sum of two cubes in two different ways." Usually it takes a great deal of insight as well as considerable mathematical training to discover a yet unknown properties of some number. Only recognizing the beauty of a number pattern is much easier, though, especially with a friendly book like this one on hand. Wells, a long-time mathematics popularizer, has collected over 1000 numbers he considers interesting. Each of them is given a short explanation, often accompanied with a bibliographic reference. Celebrities among the numbers, like i, e or Pi, are given a more comprehensive treatment. Included are also several sequences, like Fibonacci's, Mersenne's, Fermat's, Carmichael's or Kaprekar's, each accompanied with its explanation. So are cyclic, amicable, untouchable or lucky numbers, and many more sequences you probably didn't know about. While Wells' dictionary certainly gives the impression of a well-researched work, the list of numbers is by no means exhaustive. Anyone familiar with chaos theory will notice the absence of Feigenbaum constant; prime hunters would probably be interested in discussion on Woodall primes, Sophie-Germain primes, or Proth primes. But they are better off with Paulo Ribenboim's book on primes, anyway, while Wells' book, with its easily understandable explanations and accessible price is probably more suited for the "recreational mathematics" audience.

¿Desea ganar millones participando en una de las loterías más populares de Francia? ¡No espere más! ¡Haga sus apuestas en FRANCE LOTO! Todos los lunes, miércoles y sábados fascinantes pozos pueden ser suyos. Los más cautivantes comienzan con una base de 2 millones de euros, acumulándose cada semana en caso de que no haya ganadores. Al jugar tres veces por semana, el premio mayor de Lotto France puede crecer rápidamente hasta lograr un fantástico pozo. Para ganar el premio mayor usted debe acertar 5 números del 1 al 49 y 1 número del 1 al 10 (Número Oportunidad). Hay 6 divisiones de premios y con sólo acertar 1 número ya comienza a ganar.¿Usted se lo va a perder? ¡Sea partícipe de una de las loterías con más éxito de Francia!
¡Juegue ahora!