text:
When You Reach Me
From Wikipedia, the free encyclopedia
Jump to: navigation, search
When You Reach Me
First edition cover
Author
Rebecca Stead
Cover artist
Sophie Blackall
Country
United States
Language
English
Genre
Young Adult, Science fiction and mystery
Publisher
Wendy Lamb Books
Publication date
July 14, 2009
Media type
Print (hardcover)
Pages
208 pp
ISBN
978-0-385-73742-5
LC Class
PZ7.S80857 WH 2009
When You Reach Me is a Newbery Medal-winning science fiction and mystery novel by Rebecca Stead, published in 2009. It takes place in the Upper West Side in New York during 1978 and 1979 and follows the protagonist, Miranda Sinclair. She receives a strange note asking her to record future events and write down the location of her spare key. As the novel progresses, Miranda receives three more notes with requests. The novel contains three story lines — the appearance of Miranda's mom on the game show, The $20,000 Pyramid, Miranda's best friend Sal suddenly not talking with Miranda, and the appearance of a laughing man. Central themes in the novel include independence, redemption and friendship. Stead also wanted to demonstrate the possibilities that she saw in time travel. The author hoped to show her children what New York was like in her childhood, and demonstrate how in an earlier time children were more independent.
When You Reach Me was inspired by a man suffering from amnesia, and by parts of her childhood and her favorite book, A Wrinkle in Time. After completing much of the novel, Stead gave the draft to her editor, Wendy Lamb, who liked it. They expanded on the initial concepts and published When You Reach Me on July 14, 2009, under Wendy Lamb Books, an imprint of Random House. The book was well received by critics, who praised its realistic setting and the author's deft handling of small details. The novel has reached the best-seller lists of The New York Times, Los Angeles Times and USA Today. In addition to receiving the 2010 Newbery Medal, When You Reach Me won several Best Book of the Year awards.
Contents
[hide]
1 Concept and development
1.1 A Wrinkle in Time
1.2 Setting
2 Plot Summary
3 Genres
4 Themes
4.1 Time travel
5 Audiobook adaption
6 Critical reception
6.1 2010 Newbery Medal
6.2 2012 survey
7 Awards and nominations
8 References
Concept and development[edit]
The two main characters are Miranda, and Marcus (Laughing Man). Stead began writing When You Reach Me in 2007 after reading an article in The New York Times gave her an idea for a novel about traveling in time to save someone's life.[1] The article was about a man who woke up in Denver suffering from amnesia, having forgotten who he was or why he was there.[2] Many people worked with the man to help him regain his memory. Under hypnosis, he spoke about his apparent wife, Penny, and two daughters who died in a car crash. However, when he and Penny reunited, the man found out she was only his fiancée — and they had no children.[2] Upon reading this, Stead wondered if somehow the man had returned to the past to prevent an accident but lost his memory along the way.[3] In addition, the article reminded Stead of a strange old man, called the 'laughing man', who lived near her house as a child.[1]
"All along, the goal was to be certain that the logic would stand up to the merciless scrutiny of a smart kid. Someone might finish the book and then go right back and start again, reading so closely that she or he would spot any inconsistency. We didn't want to let the reader down."
— Editor Wendy Lamb[3]
While the news story initially inspired Stead, she also tied in parts of her childhood into the novel. Besides the laughing man, she included her primary school, her apartment and a sandwich store where she used to work. Stead also added memories of herself acting mean without reason. Slowly the novel became "more and more about these ordinary mysteries of life and less about the fantastic time-travel-y one".[1] After developing the basic idea, Stead began researching the science behind time travel to make sure her ideas would be logical. She asked her father for help with the science and complicated technical aspects, since he enjoyed mathematical puzzles. As they talked about time travel, Stead "just kept falling into the same hole with the logic, and he really helped me straighten it out".[2]
When Stead was only halfway done, she hit a wall: she wondered if she had focused the novel too much on her own personal life and problems. By her 40th birthday in January 2007, she had stopped writing. One week after her birthday celebration, Stead went to a writers' conference where the presenter advised attendees to stop thinking and just write?. This speech worked as an antidote to Stead's writer's block; she started working on When You Reach Me again.[1] After she had written two-thirds of the novel, Stead sent the draft to her editor Wendy Lamb at Random House. Perusing the script, Lamb found herself absorbed and wanted to help develop the book. Unlike Stead's debut novel First Light, which Lamb heavily edited, Lamb modified nothing on the first draft of When You Reach Me. Throughout the process, Stead helped Lamb understand the complicated concepts in the book and had drafts read by others to make sure, "revision hadn't created any holes or contradictions in the plot".[3]
A Wrinkle in Time[edit]
Throughout the story, the main character Miranda is often reading Madeleine L'Engle's A Wrinkle in Time, Stead's favorite book as a child; she read and reread it multiple times. She recalls that L'Engle was the only author she met in her childhood.[2] Stead described the novel as a talisman for Miranda;[4] she included it in the first draft and planned to remove it, "because you can't just toss A Wrinkle in Time in there casually".[4] Her editor suggested leaving it in if it could be better tied into the story.[5] Stead was aware that she did not want A Wrinkle in Time to have too big an influence on When You Reach Me. Keeping this in mind, she reread A Wrinkle in Time through the perspective of different characters, which enabled her to develop new connections and ideas in her own work.[4]
Setting[edit]
When You Reach Me takes place during the 1978-1979 school year of Miranda, the main character. Stead placed Miranda's home in the Upper West Side, New York City, where Stead grew up. Many parts of the novel explore "the same streets where Stead grew up, and riffs on some of her experiences".[6] Stead was inspired to use this setting because she moved into an apartment near her childhood home early in the development of the story. There she had experienced her first independence while exploring the streets, only to find a scary man near her house. Wondering why he was there, Stead later used this encounter as "the anchor as she wrote When You Reach Me".[3]
Plot Summary[edit]
M,
This is hard. Harder than I expected, even with your help. But I have been practicing, and my preparations go well. I am coming to save your friend's life and my own.
I ask two favours.
First, you must write me a letter,
Second, please remember to mention the location of your house key.
The trip is a difficult one. I will not be myself when I reach you.
— The first note Miranda receives[7]
When You Reach Me follows a sixth-grade protagonist, Miranda. She lives with her single mother who has a kindhearted boyfriend, Richard. Miranda's best friend Sal, whom she has known since she was a small child, had recently started ignoring Miranda after he had been punched in the stomach by another boy, Marcus.
A homeless man lives on the corner of Miranda's street. She calls him the "laughing man" for his tendency to laugh without cause. Miranda notices that he always utters the words "book bag pocket shoe." She later realizes the phrase refers to the order and place he will send Miranda notes—her library book, a bread bag, her coat pocket and Richard's shoe. The first three notes instruct Miranda to write a letter describing the future events. The notes, whose writer claims to be coming to Miranda's time to save a life, offer three signs of the truth of the messages. As the plot develops, the proofs come true, and Miranda is intrigued.
Miranda and her new friends, Annemarie and Colin find a sandwich shop on the corner, wondering if they can get a job there. The owner, Jimmy, agrees, but he does not wish to pay them with money; instead he gives them a free pop and a sandwich each day. Miranda, Annemarie, and Colin discover a Fred Flintstone bank in the back of sandwich shop. Colin, wanting to see more of the bank, is pulled way by Annemarie insisting that Jimmy could find them. The next day, Jimmy fires the three workers, thinking that one of them stole the Flintstone bank, when it was actually the laughing man who stole it. The workers write a card, give it to Jimmy and insist that they did not steal the bank. Jimmy believes them and let them work at the sandwich shop. He then tells them that he figured out who stole the bank. He thinks that it is Julia, a classmate in their class, and a best friend to Annemarie. He thinks she did it because she is African American. This upsets Annemarie greatly and she immediately quits her job.
At school, Julia starts shouting at Miranda for letting Annemarie drink soda and eat sandwiches, saying that because Annemarie is epileptic she has to eat a special diet. Miranda explains that she didn't know any of that. Colin is later hanging out with Sal. Colin then asks Miranda if she wants to hang out. Miranda declines saying that her mom is sick. Later on, someone taps on her door which scares her because she doesn't know anyone that knocks like that. She looks though the peep hole and sees Colin. She opens the door and he looks at her then kisses her. She then kisses him back. Colin smiles and then runs off.
In a later scene, Marcus encounters Sal. Marcus wants to apologize for his misbehavior, and chases Sal when he flees. Sal runs onto a street right ahead of an oncoming truck. Before the truck can hit Sal, the laughing man kicks Sal out of the way, sacrificing his own life for Sal's. Miranda finds the fourth note in Richard's shoe and learns that the laughing man came from the future to save Sal's life. The note asks Miranda to prepare a chronicle of recent events and deliver it by hand, but she does not know who to give it to.
Miranda's mom is invited to appear on the $20,000 Pyramid. In hopes of winning the money and having a better life, Miranda and her mom's boyfriend Richard prep her for the show. Miranda and Sal are friends again. While her mother is on-stage, Miranda reminisces about a conversation with Marcus about how no one would recognize a time-traveler from a different age. She suddenly realizes that the laughing man is an older incarnation of Marcus, who has come from the future to save Sal's life. He needed to deliver the notes to the young Marcus through Miranda. Later on Miranda goes to the mailbox the laughing man (Marcus) slept under, where she finds a picture of an older version of Julia smiling happily. The novel ends as Miranda reflects on the events in an epilogue.
Genres[edit]
When You Reach Me is classified in the science fiction and mystery genres, but includes features of some other genres. Monica Edinger of The New York Times found When You Reach Me to be "a hybrid of genres, it is a complex mystery, a work of historical fiction, a school story and one of friendship, with a leitmotif of time travel running through it."[8] Augusta Scattergood of the Christian Science Monitor wondered, "Is When You Reach Me science fiction? Time travel? A highly imaginative girl's completely conceived experience? Maybe it's historical fiction. After all, it is set in 1979."[9] According to Mary Quattlebaum of The Washington Post, the novel is of the science fiction and time travel genres. Quattlebaum found that, unlike the usual time travel stories, When You Reach Me does not involve "cheesy time travel machines and rock-'em-sock-'em action [but instead] far surpasses the usual whodunit or sci-fi adventure to become an incandescent exploration of 'life, death, and the beauty of it all.' "[10] Both Kirkus Reviews and Publishers Weekly found that despite the book's science-fiction devices, the setting was still "firmly rooted in reality."[11][12]
Some reviewers have placed parts the novel in the mystery genre. Edinger found that despite the broad genres, the novel is mainly "a thrilling puzzle".[8] She relates the pieces slowly; clues are found in the story itself, on the map, in words and chapter titles. At the end of the book everything is tied together and makes sense.[8] Ann Crewdson of School Library Journal found that each note Miranda receives foreshadows the next event. Each note is "skillfully" integrated into the novel, along with subsequent clues, until the climax is reached and all the clues come together.[13] Stead's editor Lamb agreed with the mystery genre, in that "there's plenty to wonder about after you finish the book. Just as we wonder why our feelings change so suddenly, or why someone like the laughing man appears on the corner one day."[3] Gurdon of The Wall Street Journal concurred with Lamb, adding that although the novel is clearly a mystery, the mystery itself is not revealed until the end where the last note comes and where everything ties together.[14]
Themes[edit]
Aaron Mead found that, "the novel addresses the question of how to hold on to old friendships without stifling them, and it insightfully brings out the stabilizing effect that new friendships can have in the effort to preserve or reclaim old ones". He noted that the novel deeply helps children in middle school.[15] Crewdson opined that the book deals with the "intricacies of friendship".[13]
This theme of friendship is explored when Sal abandons his friendship with Miranda after he is hit by Marcus. Elli Housden of The Courier-Mail found that Miranda is forced to deal with the fact that Sal seemingly abandons their friendship and ignores her for no apparent reason.[16] Scattergood considered the novel an "ordinary friendship story" with Sal ignoring Miranda to find other friends.[9] Julie Long from Reading Time noted how the incident forces Miranda to find new friends and become more active in school, where she starts learning the dynamics of that environment.[17]
Mead noted that "the book builds toward second chances for Miranda's mother—both vocationally and relationally."[15] As the novel progresses, Miranda gives second chances to Julia, a girl whom Miranda initially hates, and Alice, a girl who always needs to use the bathroom but never does. Miranda previously considered Julia "a competitor for Annemarie's affection, and Alice as the weird kid who waited too long to go to the bathroom". By the end of the book, she finds Julia to be Annemarie's friend and discovers that Alice is an insecure girl.[15]
Stead finds that kids today are much less independent since her childhood. She wrote, "[F]rom age nine, my friends and I were on the streets, walking home, going to each other's houses, going to the store. I really wanted to write about that: the independence that's a little bit scary but also a really positive thing in a lot of ways. And I'm not sure that most kids have that today".[6] Throughout the novel, Miranda and her friends often walk around town without any adults. They are even found working in a sandwich store at lunch and walking home from school while trying to avoid the laughing man. While writing the novel, Stead hoped to show her sons the time period in which she lived, "send[ing] them on a little time-travel journey of their own".[6] Laura Miller of The New Yorker found that this lack of independence in today's youth is mainly due to the fact that kids now grow up with adults constantly watching them. Miller noted how, despite the lower crime rate in current times, the "characters, middle-class middle school students, routinely walk around the Upper West Side by themselves, a rare freedom in today's city."[18]
Time travel[edit]
Julianna Helt from the Pittsburgh Post-Gazette found that time travel forms a central theme as Miranda constantly wonders how time travel could be possible.[19] In When You Reach Me, Marcus helps Miranda realize that the three old ladies from A Wrinkle in Time lied to Meg by promising they would return five minutes before they left. Marcus explains:
"So the garden is where they appear when they get home at the end of the book. Remember? They land in the broccoli. So if they had gotten home five minutes before they left, like those ladies promised they would, then they would have seen themselves get back. Before they did".[7]
Roger Sutton from Horn Book Magazine felt that the moment Marcus explains this flaw to Miranda is the first exchange that shows the novel to be complicated and mysterious.[20] Quattlebaum noted, "The story's structure – an expert interweaving of past, present and future – brilliantly contradicts Miranda's commonsensical belief that the end can't happen before the middle."[10] Stead explained her view of time travel in her novel, where going back in time is fulfilling the future, rather than changing it. She hoped to make the time travel element logical to show that "Miranda wasn't struggling to understand the seeming randomness and infinity of the universe, but learning that her world has value and that people do care about her".[21]
Audiobook adaption[edit]
The audiobook adaption of When You Reach Me was released by Listening Library and contains four disks. In praise of Cynthia Holloway's performance of Miranda, M.V.P from Horn Book Magazine stated that her tone "emphasized the novel's interpersonal aspects". The reviewer found it beneficial that the chapter titles were added to the audio, since they seemed to add more detail about the book, but can be easily skipped over when reading. M.V.P criticized the voicing of Miranda's mom.[22] AudioFile praised Halloway for "a strong reading...[that] makes listeners curious about this story's nonlinear structure" and for managing the different elements of the story.[23]
Critical reception[edit]
When You Reach Me was published on July 14, 2010, in hardcover format by Wendy Lamb Books, an imprint of Random House Children's Books.[24] Reception of When You Reach Me was positive. Reviewers praised the details and characters. The novel has reached many bestseller lists; it was on the New York Times Best Seller list for 16 weeks ending May 9, 2010.[25] It was number 127 on USA Today's bestseller list during the week of January 28, 2010.[26] On April 22, 2010, after staying at number 15 for two weeks, When You Reach Me left the Los Angeles Times bestseller list.[27]
Reviewers lauded the realistic setting and characters. Ilene Cooper of Booklist acknowledged that although she was unsure if the ending was logical, "everything else is quite wonderful". She praised the realistic portrayal of New York and mentioned that "the characters, children and adults ... are honest bits of humanity".[28] Julianna M. Helt of The Post Gazette felt that along with the "wonderful sense of middle school dynamics", Stead's depiction of New York City in the 1970s was superb.[19] Quattlebaum considered no character to be minor; each plays an important part in the story.[10] Caitlin Augusta of School Library Journal found the setting to be "consistently strong. The stores—and even the streets—in Miranda's neighborhood act as physical entities and impact the plot in tangible ways".[27]
Reviewers praised how Stead made every small detail matter. Augusta Scattergood of the Christian Science Monitor enjoyed the detailed work: "The beauty of Stead's writing is found in the way she weaves subplots and settings together seamlessly. Richard's stolen shoe drops into place. A reference to forbidden grapes is tied up sweetly. Stolen $2 bills? Another part of the enigma explained by the end."[9] Edginer agreed, commenting that despite the small size of the novel compared to other popular books, When You Reach Me is a "taut novel, every word, every sentence, has meaning and substance."[8] Publishers Weekly added that even the smallest of details—Miranda's name, her strange habits and why she carries A Wrinkle in Time with her—have a reason for their inclusion by the end of the novel.[12]
2010 Newbery Medal[edit]
Newbery Medal
Stead won the annual Newbery Medal recognizing When You Reach Me as the year's "most distinguished contribution to American literature for children".[29] The judges chose the novel for making the small details important to the plot.[30] Chairwoman of the Newbery committee Katie O'Dell felt that "Every scene, every nuance, every word is vital both to character development and the progression of the mystery that really is going to engage readers and satisfy them".[31] The committee was "very excited about this book because it is exceptionally conceived, finely crafted and highly original".[31]
On January 18, 2010, a worker at Random House had tweeted the result 17 minutes prior to the official announcement. The tweet was quickly taken down when the mistake was noticed.[32]
2012 survey[edit]
In 2012, When You Reach Me was ranked number 11 among all-time best children's novels in a survey published by School Library Journal, a monthly with primarily U.S. audience. It was the only 21st-century work among the top 20.[33]
Awards and nominations[edit]
Award
Year
Result
Andre Norton Award 2009 Nominated[34][35]
The New York Times Notable Book 2009 Listed[36]
Kirkus Reviews Best Children's Books 2009 Listed[37]
Publishers Weekly Best Children's Book of the Year 2009 Listed[38]
School Library Journal Best Book of the Year 2009 Listed[39]
Booklist Editors' Choice 2009 Listed[40]
Newbery Medal 2010 Won[41]
ALA Notable Children's Book 2010 Listed[42]
Indian Paintbrush Book Award 2011 Nominated[43]
Massachusetts Children's Book Award 2012 Won[44]
References[edit]
^ Jump up to: a b c d Stead, Rebecca (July–August 2010). "Newbery Medal Acceptance Speech". Horn Book Magazine. EBSCOhost. 86 (4): 41–46. ISSN 0018-5078.
^ Jump up to: a b c d Margolis, Rick (July 1, 2009). "Upper West Side Story: An Interview with Rebecca Stead". School Library Journal. Retrieved October 30, 2010.
^ Jump up to: a b c d e Lamb, Wendy (July–August 2010). "Rebecca Stead: A New York Story". Horn Book Magazine. 86 (4): 48–51. Archived from the original on 2010-10-28. Retrieved October 15, 2013.
^ Jump up to: a b c Flood, Alison (January 18, 2010). "Madeleine L'Engle returns to Newbery medal, thanks to A Wrinkle in Time". The Guardian. Retrieved October 30, 2010.
Jump up ^ Brown, Jenifer (November 3, 2008). "A World in Your Backyard: Rebecca Stead's When You Reach Me". School Library Journal. Retrieved January 1, 2011.
^ Jump up to: a b c Cohen, Billie. "The Upper West Side author and mom discusses her new novel for tweens". Time Out New York. Retrieved November 9, 2010.
^ Jump up to: a b Stead, Rebecca (July 14, 2009). When You Reach Me. Wendy Lamb Books. ISBN 978-0-385-73742-5.
^ Jump up to: a b c d Edinger, Monica (August 16, 2009). "Children's Books Summer Reading Chronicle". The New York Times. Retrieved November 1, 2010.
^ Jump up to: a b c Scattergood, Augusta (July 27, 2009). "When You Reach Me Review from Christian Science Monitor". Christian Science Monitor. Retrieved November 4, 2010.
^ Jump up to: a b c Quattlebaum, Mary (July 15, 2009). "When You Reach Me". The Washington Post. ISSN 0190-8286. Retrieved November 26, 2010. (registration required)
Jump up ^ "When You Reach Me". Kirkus Reviews. 77 (22): 16. November 15, 2009. ISSN 0042-6598. Retrieved November 2, 2010.
^ Jump up to: a b "When You Reach Me". Publishers Weekly. 256 (55): 45. June 22, 2009. ISSN 0000-0019. Retrieved October 31, 2010.
^ Jump up to: a b Crewdson, Ann (December 2009). "When You Reach Me". School Library Journal. 55 (12): 69. ISSN 0362-8930. Retrieved November 2, 2010.
Jump up ^ Gurdon, Megan (July 17, 2009). "WSJ Children's Book Review: When You Reach Me". The Wall Street Journal. Retrieved November 3, 2010.
^ Jump up to: a b c Mead, Aaron (March 10, 2010). "Juvenile Fiction: When You Reach Me, Newbery Medal Winner". Children's Books and Reviews. Retrieved November 9, 2010.
Jump up ^ Housden, Elli (February 13, 2010). "Review: The Courier Mail (Australia) February 13, 2010 Saturday". The Courier Mail. (subscription required)
Jump up ^ Long, Julie (August 2010). "When You Reach Me". Reading Time. EBSCOhost. 54 (3): 39–40. ISSN 0155-218X.
Jump up ^ Miller, Laura (June 14, 2010). "Fresh Hell; What's behind the boom in dystopian fiction for young readers?". The New Yorker. Retrieved November 27, 2010.
^ Jump up to: a b Helt, Julianna (December 8, 2009). "Mysterious letters deliver a fine thriller in "When You Reach Me"". Pittsburgh Post-Gazette. Retrieved November 14, 2010.
Jump up ^ Sutton, Roger (July–August 2009). "Review of When You Reach Me". Horn Book Magazine. EBSOhost. 85 (4): 432. ISSN 0018-5078.
Jump up ^ "Life at the Speed of Light". Reading Today. 27 (5): 25. April 2010.
Jump up ^ M.V.P (November–December 2009). "When You Reach Me". Horn Book Magazine. EBSCOhost. 85 (6): 703–704. ISSN 0018-5078.
Jump up ^ "AudioFile audiobook review: When You Reach Me by Rebecca Stead". AudioFile. August 2009. Retrieved March 5, 2011.
Jump up ^ "When You Reach Me Review from Kirkus Book Reviews". Kirkus Reviews. Retrieved November 7, 2010.
Jump up ^ "Children's Best Sellers: Chapter Books: Sunday May 9th 2010". The New York Times. May 9, 2010. Retrieved November 13, 2010.
Jump up ^ "This week's top 150 best sellers". USA Today. January 28, 2010. Retrieved November 13, 2010.
^ Jump up to: a b Augusta, Caitlin (July 2009). "When You Reach Me". School Library Journal. 55 (7): 93. ISSN 0362-8930. Retrieved November 2, 2010.
Jump up ^ Cooper, Ilene (July 1, 2009). "When You Reach Me Review". Booklist. 105 (19): 66.
Jump up ^ "2010 Newbery Medal and Honor Books". Association for Library Service to Children (ALSC). American Library Association (ALA.org). Retrieved November 2, 2015.
Jump up ^ Philbrick, Rodman (January 20, 2010). "When You Reach Me by Rebecca Stead wins 2010 Newbery Medal". The Washington Post. Retrieved January 4, 2011.
^ Jump up to: a b Rich, Motoko (January 19, 2010). "A Very New York Novel Wins Newbery Medal". The New York Times. p. 3. Retrieved January 4, 2011.
Jump up ^ Whelan, Debra Lau; Margolis, Rick; Genco, Barbara (January 19, 2010). "Random House Leaks Newbery Winner on Twitter". School Library Journal. Retrieved January 4, 2011.
Jump up ^ Bird, Elizabeth (July 7, 2012). "Top 100 Chapter Book Poll Results". A Fuse #8 Production. Blog. School Library Journal (blog.schoollibraryjournal.com). Retrieved November 2, 2015.
Jump up ^ "2009 Nebula Awards Final Ballot". Science Fiction & Fantasy Writers of America. Retrieved May 22, 2011.
Jump up ^ "SFWA announces 2009 Nebula Awards winners". Science Fiction & Fantasy Writers of America. Retrieved May 22, 2011.
Jump up ^ "Notable Books of 2009". The New York Times. December 6, 2009. p. 23. Retrieved November 13, 2010.
Jump up ^ "Kirkus Reviews Best Children's Books of 2009" (PDF). Kirkus Reviews. Retrieved November 13, 2010.
Jump up ^ "Best Children's Books of 2009". Publishers Weekly. November 2, 2009. Retrieved November 13, 2010.
Jump up ^ "Best Books 2009". School Library Journal. December 1, 2009. Retrieved November 13, 2010.
Jump up ^ "Booklist Editors' Choice: Books for Youth, 2009". Booklist Online. Retrieved June 12, 2016.
Jump up ^ "2010 Newbery Medal – ALA". ALA. Retrieved November 13, 2010.
Jump up ^ "ALSC announces 2010 Notable Children's Books". American Library Association. March 8, 2010. Retrieved November 13, 2010.
Jump up ^ "Indian Paintbrush Awards by Year: 1986–2011" (PDF). Indian Paintbrush Award. Retrieved March 23, 2011.
Jump up ^ "MCBA 2012 Winner" (PDF). Salem State University. Retrieved May 13, 2012.
Awards
Preceded by
The Graveyard Book Newbery Medal recipient
2010 Succeeded by
Moon Over Manifest
Retrieved from "https://en.wikipedia.org/w/index.php?title=When_You_Reach_Me&oldid=833727870"
Categories:
2009 American novels
2009 children's books
American children's novels
American historical novels
American science fiction novels
Children's historical novels
Children's science fiction novels
Newbery Medal-winning works
Time travel novels
Novels set in New York City
Upper West Side
1978 in fiction
1979 in fiction
Hidden categories:
Pages with login required references or sources
Pages containing links to subscription-only content
Use mdy dates from October 2012
Good articles
Pages to import images to Wikidata
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Article
Talk
Variants
Views
Read
Edit
View history
More
Search
Navigation
Main page
Contents
Featured content
Current events
Random article
Donate to Wikipedia
Wikipedia store
Interaction
Help
About Wikipedia
Community portal
Recent changes
Contact page
Tools
What links here
Related changes
Upload file
Special pages
Permanent link
Page information
Wikidata item
Cite this page
Print/export
Create a book
Download as PDF
Printable version
Languages
Română
Edit links
This page was last edited on 2 April 2018, at 03:25.
Text is available under the Creative Commons Attribution-ShareAlike License; additional terms may apply. By using this site, you agree to the Terms of Use and Privacy Policy. Wikipedia® is a registered trademark of the Wikimedia Foundation, Inc., a non-profit organization.
Privacy policy
About Wikipedia
Disclaimers
Contact Wikipedia
Developers
Cookie statement
Mobile view
Enable previews

values: mw-page-base noprint

values: mw-head-base noprint

values: This is a good article. Follow the link for more information.

value: i

values: firstHeading firstHeading en

values: siteSub noprint

values: jump-to-nav mw-jump

value: caption

values: Front cover featuring a shoe, bread bag, winter jacket, library book, Miranda's school, a key, Miranda's apartment, two-dollar bills and a mailbox.

value: td

attrs: colspan style

value: tr

value: th

values:
/wiki/Young_adult_novels
mw-redirect
Young adult novels

values:
/wiki/Wendy_Lamb_Books
mw-redirect
Wendy Lamb Books

values: float: right; margin-left: 1em; margin-right: .5em; font-size: 85%; background:#c6dbf7; color:black; width:20em; max-width: 25%;

values:
/wiki/%2420,000_Pyramid
mw-redirect
$20,000 Pyramid

values:
/wiki/Christian_Science_Monitor
mw-redirect
Christian Science Monitor

values:
/wiki/Horn_Book_Magazine
mw-redirect
Horn Book Magazine

values:
/wiki/Listening_Library
mw-redirect
Listening Library

values:
/wiki/The_Post_Gazette
mw-redirect
The Post Gazette

values:
headerSort
0
columnheader button
Sort ascending

values: background: #FDD; color: black; vertical-align: middle; text-align: center;

values:
/wiki/ALA_Notable_Children%27s_Book
mw-redirect
ALA Notable Children's Book

values:
nofollow
external text
//www.worldcat.org/issn/0018-5078

values:
/wiki/Time_Out_New_York
mw-redirect
Time Out New York

values:
nofollow
external text
//www.worldcat.org/issn/0190-8286

values:
nofollow
external text
//www.worldcat.org/issn/0042-6598

values:
nofollow
external text
//www.worldcat.org/issn/0000-0019

values:
nofollow
external text
//www.worldcat.org/issn/0362-8930

values:
/wiki/The_Courier_Mail
mw-redirect
The Courier Mail

values:
nofollow
external text
//www.worldcat.org/issn/0155-218X

values: -moz-column-width: 30em; -webkit-column-width: 30em; column-width: 30em; list-style-type: decimal;

values: Category:American science fiction novels

values: Category:Children's science fiction novels

values: Category:Pages with login required references or sources

values: Category:Pages containing links to subscription-only content

values: Category:Use mdy dates from October 2012

values: Category:Pages to import images to Wikidata

values: Discussion about edits from this IP address [ctrl-alt-n]

values: A list of edits made from this IP address [ctrl-alt-y]

values: You are encouraged to create an account and log in; however, it is not mandatory

values: You're encouraged to log in; however, it's not mandatory. [ctrl-alt-o]

values:
/wiki/When_You_Reach_Me
View the content page [ctrl-alt-c]
c

values: Discussion about the content page [ctrl-alt-t]

values: p-namespaces navigation vectorTabs p-namespaces-label

values:
p-variants
navigation
vectorMenu emptyPortlet
p-variants-label

values: Past revisions of this page [ctrl-alt-h]

values: p-views navigation vectorTabs p-views-label

values:
p-cactions
navigation
vectorMenu emptyPortlet
p-cactions-label

values:
mw-wiki-logo
/wiki/Main_Page
Visit the main page

values:
/wiki/Main_Page
Visit the main page [ctrl-alt-z]
z

values: Featured content – the best of Wikipedia

values: Find background information on current events

values:
/wiki/Special:Random
Load a random article [ctrl-alt-x]
x

values: portal navigation p-navigation p-navigation-label

values: Guidance on how to use and edit Wikipedia

values: About the project, what you can do, where to find things

values: A list of recent changes in the wiki [ctrl-alt-r]

values: portal navigation p-interaction p-interaction-label

values: List of all English Wikipedia pages containing links to this page [ctrl-alt-j]

values: Recent changes in pages linked from this page [ctrl-alt-k]

values:
/wiki/Wikipedia:File_Upload_Wizard
Upload files [ctrl-alt-u]
u

values: A list of all special pages [ctrl-alt-q]

values: Permanent link to this revision of the page

values: Link to connected data repository item [ctrl-alt-g]

values: Printable version of this page [ctrl-alt-p]

values: mediawiki ltr sitedir-ltr mw-hide-empty-elt ns-0 ns-subject page-When_You_Reach_Me rootpage-When_You_Reach_Me skin-vector action-view


text:
Sieve of Eratosthenes
From Wikipedia, the free encyclopedia
This is the current revision of this page, as edited by Headbomb (talk | contribs) at 15:41, 28 August 2017 (→Algorithmic complexity: ce). The present address (URL) is a permanent link to this version.
Revision as of 15:41, 28 August 2017 by Headbomb (talk | contribs) (→Algorithmic complexity: ce)
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Sieve of Eratosthenes: algorithm steps for primes below 121 (including optimization of starting from prime's square).
In mathematics, the sieve of Eratosthenes is a simple, ancient algorithm for finding all prime numbers up to any given limit.
It does so by iteratively marking as composite (i.e., not prime) the multiples of each prime, starting with the first prime number, 2. The multiples of a given prime are generated as a sequence of numbers starting from that prime, with constant difference between them that is equal to that prime.[1] This is the sieve's key distinction from using trial division to sequentially test each candidate number for divisibility by each prime.[2]
The earliest known reference to the sieve (Ancient Greek: κόσκινον Ἐρατοσθένους, kóskinon Eratosthénous) is in Nicomachus of Gerasa's Introduction to Arithmetic,[3] which describes it and attributes it to Eratosthenes of Cyrene, a Greek mathematician.
One of a number of prime number sieves, it is one of the most efficient ways to find all of the smaller primes. It may be used to find primes in arithmetic progressions.[4]
Contents
[hide]
1 Overview
1.1 Example
2 Algorithm and variants
2.1 Pseudocode
2.2 Segmented sieve
2.3 Incremental sieve
3 Computational analysis
4 Algorithmic complexity
5 Euler's Sieve
6 See also
7 References
8 External links
Overview[edit]
Sift the Two's and Sift the Three's,
The Sieve of Eratosthenes.
When the multiples sublime,
The numbers that remain are Prime.
“
”
Anonymous[5]
A prime number is a natural number that has exactly two distinct natural number divisors: 1 and itself.
To find all the prime numbers less than or equal to a given integer n by Eratosthenes' method:
Create a list of consecutive integers from 2 through n: (2, 3, 4, ..., n).
Initially, let p equal 2, the smallest prime number.
Enumerate the multiples of p by counting to n from 2p in increments of p, and mark them in the list (these will be 2p, 3p, 4p, ...; the p itself should not be marked).
Find the first number greater than p in the list that is not marked. If there was no such number, stop. Otherwise, let p now equal this new number (which is the next prime), and repeat from step 3.
When the algorithm terminates, the numbers remaining not marked in the list are all the primes below n.
The main idea here is that every value given to p will be prime, because if it were composite it would be marked as a multiple of some other, smaller prime. Note that some of the numbers may be marked more than once (e.g., 15 will be marked both for 3 and 5).
As a refinement, it is sufficient to mark the numbers in step 3 starting from p2, as all the smaller multiples of p will have already been marked at that point. This means that the algorithm is allowed to terminate in step 4 when p2 is greater than n.[1]
Another refinement is to initially list odd numbers only, (3, 5, ..., n), and count in increments of 2p from p2 in step 3, thus marking only odd multiples of p. This actually appears in the original algorithm.[1] This can be generalized with wheel factorization, forming the initial list only from numbers coprime with the first few primes and not just from odds (i.e., numbers coprime with 2), and counting in the correspondingly adjusted increments so that only such multiples of p are generated that are coprime with those small primes, in the first place.[6]
Example[edit]
To find all the prime numbers less than or equal to 30, proceed as follows.
First generate a list of integers from 2 to 30:
 2  3  4  5  6  7  8  9  10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30

The first number in the list is 2; cross out every 2nd number in the list after 2 by counting up from 2 in increments of 2 (these will be all the multiples of 2 in the list):
 2  3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30

The next number in the list after 2 is 3; cross out every 3rd number in the list after 3 by counting up from 3 in increments of 3 (these will be all the multiples of 3 in the list):
 2  3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30

The next number not yet crossed out in the list after 3 is 5; cross out every 5th number in the list after 5 by counting up from 5 in increments of 5 (i.e. all the multiples of 5):
 2  3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30

The next number not yet crossed out in the list after 5 is 7; the next step would be to cross out every 7th number in the list after 7, but they are all already crossed out at this point, as these numbers (14, 21, 28) are also multiples of smaller primes because 7 × 7 is greater than 30. The numbers not crossed out at this point in the list are all the prime numbers below 30:
 2  3     5     7           11    13          17    19          23                29

Algorithm and variants[edit]
Pseudocode[edit]
The sieve of Eratosthenes can be expressed in pseudocode, as follows:[7][8]
 Input: an integer n > 1. Let A be an array of Boolean values, indexed by integers 2 to n, initially all set to true. for i = 2, 3, 4, ..., not exceeding √n: if A[i] is true: for j = i2, i2+i, i2+2i, i2+3i, ..., not exceeding n: A[j] := false. Output: all i such that A[i] is true.

This algorithm produces all primes not greater than n. It includes a common optimization, which is to start enumerating the multiples of each prime i from i2. The time complexity of this algorithm is O(n log log n),[8] provided the array update is an O(1) operation, as is usually the case.
Segmented sieve[edit]
As Sorenson notes, the problem with the sieve of Eratosthenes is not the number of operations it performs but rather its memory requirements.[8] For large n, the range of primes may not fit in memory; worse, even for moderate n, its cache use is highly suboptimal. The algorithm walks through the entire array A, exhibiting almost no locality of reference.
A solution to these problems is offered by segmented sieves, where only portions of the range are sieved at a time.[9] These have been known since the 1970s, and work as follows:[8][10]
Divide the range 2 through n into segments of some size Δ ≤ √n.
Find the primes up to Δ, using the "regular" sieve.
For each Δ-sized block from √n + 1 to n, set up a Boolean array of size Δ. Eliminate the multiples of each prime p ≤ √n found in step 2.
If Δ is chosen to be √n, the space complexity of the algorithm is O(√n), while the time complexity is the same as that of the regular sieve.[8]
For ranges with upper limit n so large that the sieving primes below √n as required by the page segmented sieve of Eratosthenes cannot fit in memory, a slower but much more space-efficient sieve like the sieve of Sorenson can be used instead.[11]
Incremental sieve[edit]
An incremental formulation of the sieve[2] generates primes indefinitely (i.e., without an upper bound) by interleaving the generation of primes with the generation of their multiples (so that primes can be found in gaps between the multiples), where the multiples of each prime p are generated directly by counting up from the square of the prime in increments of p (or 2p for odd primes). The generation must be initiated only when the prime's square is reached, to avoid adverse effects on efficiency. It can be expressed symbolically under the dataflow paradigm as
  primes = [2, 3, ...] \ [[p², p²+p, ...] for p in primes],

using list comprehension notation with \ denoting set subtraction of arithmetic progressions of numbers.
Primes can also be produced by iteratively sieving out the composites through divisibility testing by sequential primes, one prime at a time. It is not the sieve of Eratosthenes but is often confused with it, even though the sieve of Eratosthenes directly generates the composites instead of testing for them. Trial division has worse theoretical complexity than that of the sieve of Eratosthenes in generating ranges of primes.[2]
When testing each prime, the optimal trial division algorithm uses all prime numbers not exceeding its square root, whereas the sieve of Eratosthenes produces each composite from its prime factors only, and gets the primes "for free", between the composites. The widely known 1975 functional sieve code by David Turner[12] is often presented as an example of the sieve of Eratosthenes[6] but is actually a sub-optimal trial division sieve.[2]
Computational analysis[edit]
This section needs additional citations for verification. Please help improve this article by adding citations to reliable sources. Unsourced material may be challenged and removed. (June 2015) (Learn how and when to remove this template message)
The work performed by this algorithm is almost entirely the operations to cull the composite number representations which for the basic non-optimized version is the sum of the range divided by each of the primes up to that range or
n ∑ p ≤ n 1 p , {\displaystyle n\sum _{p\leq n}{\frac {1}{p}},}
where n is the sieving range in this and all further analysis.
By rearranging Mertens' second theorem, this is equal to n ( log log n + M ) as n approaches infinity, where M is the Meissel–Mertens constant of about 6999261497212847642♠0.2614972128476427837554268386086958590516...
The optimization of starting at the square of each prime and only culling for primes less than the square root changes the "n" in the above expression to √n (or n1/2) and not culling until the square means that the sum of the base primes each minus two is subtracted from the operations. As the sum of the first x primes is 1/2x2 log x[13] and the prime number theorem says that x is approximately x/log x, then the sum of primes to n is n2/2 log n, and therefore the sum of base primes to √n is 1/log n expressed as a factor of n. The extra offset of two per base prime is 2π(√n), where π is the prime-counting function in this case, or 4√n/log n; expressing this as a factor of n as are the other terms, this is 4/√n log n. Combining all of this, the expression for the number of optimized operations without wheel factorization is
log  log  n − 1 log  n ( 1 − 4 n ) + M − log  2. {\displaystyle \log \log n-{\frac {1}{\log n}}\left(1-{\frac {4}{\sqrt {n}}}\right)+M-\log 2.}
For the wheel factorization cases, there is a further offset of the operations not done of
∑ p ≤ x 1 p {\displaystyle \sum _{p\leq x}{\frac {1}{p}}}
where x is the highest wheel prime and a constant factor of the whole expression is applied which is the fraction of remaining prime candidates as compared to the repeating wheel circumference. The wheel circumference is
∏ p ≤ x p {\displaystyle \prod _{p\leq x}p}
and it can easily be determined that this wheel factor is
∏ p ≤ x p − 1 p {\displaystyle \prod _{p\leq x}{\frac {p-1}{p}}}
as p − 1/p is the fraction of remaining candidates for the highest wheel prime, x, and each succeeding smaller prime leaves its corresponding fraction of the previous combined fraction.
Combining all of the above analysis, the total number of operations for a sieving range up to n including wheel factorization for primes up to x is approximately
∏ p ≤ x p − 1 p ( log  log  n − 1 log  n ( 1 − 4 n ) + M − log  2 − ∑ p ≤ x 1 p ) {\displaystyle \prod _{p\leq x}{\frac {p-1}{p}}\left(\log \log n-{\frac {1}{\log n}}\left(1-{\frac {4}{\sqrt {n}}}\right)+M-\log 2-\sum _{p\leq x}{\frac {1}{p}}\right)} .
To show that the above expression is a good approximation to the number of composite number cull operations performed by the algorithm, following is a table showing the actually measured number of operations for a practical implementation of the sieve of Eratosthenes as compared to the number of operations predicted from the above expression with both expressed as a fraction of the range (rounded to four decimal places) for different sieve ranges and wheel factorizations (Note that the last column is a maximum practical wheel as to the size of the wheel gaps Look Up Table - almost 10 million values):
n
no wheel
odds
2/3/5 wheel
2/3/5/7 wheel
2/3/5/7/11/13/17/19 wheel
103
1.4090 1.3745 0.4510 0.4372 0.1000 0.0909 0.0580 0.0453 0.0060 —
104
1.6962 1.6844 0.5972 0.5922 0.1764 0.1736 0.1176 0.1161 0.0473 0.0391
105
1.9299 1.9261 0.7148 0.7130 0.2388 0.2381 0.1719 0.1714 0.0799 0.0805
106
2.1218 2.1220 0.8109 0.8110 0.2902 0.2903 0.2161 0.2162 0.1134 0.1140
107
2.2850 2.2863 0.8925 0.8932 0.3337 0.3341 0.2534 0.2538 0.1419 0.1421
108
2.4257 2.4276 0.9628 0.9638 0.3713 0.3718 0.2856 0.2860 0.1660 0.1662
The above table shows that the above expression is a very good approximation to the total number of culling operations for sieve ranges of about a hundred thousand (105) and above.
Algorithmic complexity[edit]
The sieve of Eratosthenes is a popular way to benchmark computer performance.[14] As can be seen from the above by removing all constant offsets and constant factors and ignoring terms that tend to zero as n approaches infinity, the time complexity of calculating all primes below n in the random access machine model is O(n log log n) operations, a direct consequence of the fact that the prime harmonic series asymptotically approaches log log n. It has an exponential time complexity with regard to input size, though, which makes it a pseudo-polynomial algorithm. The basic algorithm requires O(n) of memory.
The bit complexity of the algorithm is O(n (log n) (log log n)) bit operations with a memory requirement of O(n).[15]
The normally implemented page segmented version has the same operational complexity of O(n log log n) as the non-segmented version but reduces the space requirements to the very minimal size of the segment page plus the memory required to store the base primes less than the square root of the range used to cull composites from successive page segments of size O(√n/log n).
A special rarely if ever implemented segmented version of the sieve of Eratosthenes, with basic optimizations, uses O(n) operations and O(√nlog log n/log n) bits of memory.[16][17][18]
To show that the above approximation in complexity is not very accurate even for about as large as practical a range, the following is a table of the estimated number of operations as a fraction of the range rounded to four places, the calculated ratio for a factor of ten change in range based on this estimate, and the factor based on the log log n estimate for various ranges and wheel factorizations (the combo column uses a frequently practically used pre-cull by the maximum wheel factorization but only the 2/3/5/7 wheel for the wheel factor as the full factorization is difficult to implement efficiently for page segmentation):
n
no wheel
odds
2/3/5 wheel
2/3/5/7 wheel
combo wheel
2/3/5/7/11/13/17/19 wheel
106
2.122 1.102 1.075 0.811 1.137 1.075 0.2903 1.22 1.075 0.2162 1.261 1.075 0.1524 1.416 1.075 0.114 1.416 1.075
107
2.2863 1.077 1.059 0.8932 1.101 1.059 0.3341 1.151 1.059 0.2537 1.174 1.059 0.1899 1.246 1.059 0.1421 1.246 1.059
108
2.4276 1.062 1.048 0.9638 1.079 1.048 0.3718 1.113 1.048 0.286 1.127 1.048 0.2222 1.17 1.048 0.1662 1.17 1.048
109
2.5514 1.051 1.04 1.0257 1.064 1.04 0.4048 1.089 1.04 0.3143 1.099 1.04 0.2505 1.127 1.04 0.1874 1.127 1.04
1010
2.6615 1.043 1.035 1.0808 1.054 1.035 0.4342 1.073 1.035 0.3395 1.08 1.035 0.2757 1.101 1.035 0.2063 1.101 1.035
1011
2.7608 1.037 1.03 1.1304 1.046 1.03 0.4607 1.061 1.03 0.3622 1.067 1.03 0.2984 1.082 1.03 0.2232 1.082 1.03
1012
2.8511 1.033 1.027 1.1755 1.04 1.027 0.4847 1.052 1.027 0.3828 1.057 1.027 0.319 1.069 1.027 0.2387 1.069 1.027
1013
2.9339 1.029 1.024 1.217 1.035 1.024 0.5068 1.046 1.024 0.4018 1.049 1.024 0.3379 1.059 1.024 0.2528 1.059 1.024
1014
3.0104 1.026 1.022 1.2552 1.031 1.022 0.5272 1.04 1.022 0.4193 1.044 1.022 0.3554 1.052 1.022 0.2659 1.052 1.022
1015
3.0815 1.024 1.02 1.2907 1.028 1.02 0.5462 1.036 1.02 0.4355 1.039 1.02 0.3717 1.046 1.02 0.2781 1.046 1.02
1016
3.1478 1.022 1.018 1.3239 1.026 1.018 0.5639 1.032 1.018 0.4507 1.035 1.018 0.3868 1.041 1.018 0.2894 1.041 1.018
The above shows that the log log n estimate is not very accurate even for maximum practical ranges of about 1016. One can see why it does not match by looking at the computational analysis above and seeing that within these practical sieving range limits, there are very significant constant offset terms such that the very slowly growing log log n term does not get large enough so as to make these terms insignificant until the sieving range approaches infinity – well beyond any practical sieving range. Within these practical ranges, these significant constant offsets mean that the performance of the Sieve of Eratosthenes is much better than one would expect just using the asymptotic time complexity estimates by a significant amount, but that also means that the slope of the performance with increasing range is steeper than predicted as the benefit of the constant offsets becomes slightly less significant.
One should also note that in using the calculated operation ratios to the sieve range, it must be less than about 0.2587 in order to be faster than the often compared sieve of Atkin if the operations take approximately the same time each in CPU clock cycles, which is a reasonable assumption for the one huge bit array algorithm. Using that assumption, the sieve of Atkin is only faster than the maximally wheel factorized sieve of Eratosthenes for ranges of over 1013 at which point the huge sieve buffer array would need about a quarter of a terabyte (about 250 gigabytes) of RAM memory even if bit packing were used. An analysis of the page segmented versions will show that the assumption that the time per operation stays the same between the two algorithms does not hold for page segmentation and that the sieve of Atkin operations get slower much faster than the sieve of Eratosthenes with increasing range. Thus for practical purposes, the maximally wheel factorized Sieve of Eratosthenes is faster than the Sieve of Atkin although the Sieve of Atkin is faster for lesser amounts of wheel factorization.
Using big O notation is also not the correct way to compare practical performance of even variations of the Sieve of Eratosthenes as it ignores constant factors and offsets that may be very significant for practical ranges: The sieve of Eratosthenes variation known as the Pritchard wheel sieve[16][17][18] has an O(n) performance, but its basic implementation requires either a "one large array" algorithm which limits its usable range to the amount of available memory else it needs to be page segmented to reduce memory use. When implemented with page segmentation in order to save memory, the basic algorithm still requires about O(n/log n) bits of memory (much more than the requirement of the basic page segmented sieve of Eratosthenes using O(√n/log n) bits of memory). Pritchard's work reduced the memory requirement to the limit as described above the table, but the cost is a fairly large constant factor of about three in execution time to about three quarters the sieve range due to the complex computations required to do so. As can be seen from the above table for the basic sieve of Eratosthenes, even though the resulting wheel sieve has O(n) performance and an acceptable memory requirement, it will never be faster than a reasonably Wheel Factorized basic sieve of Eratosthenes for any practical sieving range by a factor of about two. Other than that it is quite complex to implement, it is rarely practically implemented because it still uses more memory than the basic Sieve of Eratosthenes implementations described here as well as being slower for practical ranges. It is thus more of an intellectual curiosity than something practical.
Euler's Sieve[edit]
Euler's proof of the zeta product formula contains a version of the sieve of Eratosthenes in which each composite number is eliminated exactly once.[8] The same sieve was rediscovered and observed to take linear time by Gries & Misra (1978).[19] It, too, starts with a list of numbers from 2 to n in order. On each step the first element is identified as the next prime and the results of multiplying this prime with each element of the list are marked in the list for subsequent deletion. The initial element and the marked elements are then removed from the working sequence, and the process is repeated:
[2] (3) 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49 51 53 55 57 59 61 63 65 67 69 71 73 75 77 79 ... [3] (5) 7 11 13 17 19 23 25 29 31 35 37 41 43 47 49 53 55 59 61 65 67 71 73 77 79 ... [4] (7) 11 13 17 19 23 29 31 37 41 43 47 49 53 59 61 67 71 73 77 79 ... [5] (11) 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 ... [...]

Here the example is shown starting from odds, after the first step of the algorithm. Thus, on the kth step all the remaining multiples of the kth prime are removed from the list, which will thereafter contain only numbers coprime with the first k primes (cf. wheel factorization), so that the list will start with the next prime, and all the numbers in it below the square of its first element will be prime too.
Thus, when generating a bounded sequence of primes, when the next identified prime exceeds the square root of the upper limit, all the remaining numbers in the list are prime.[8] In the example given above that is achieved on identifying 11 as next prime, giving a list of all primes less than or equal to 80.
Note that numbers that will be discarded by a step are still used while marking the multiples in that step, e.g., for the multiples of 3 it is 3 × 3 = 9, 3 × 5 = 15, 3 × 7 = 21, 3 × 9 = 27, ..., 3 × 15 = 45, ..., so care must be taken dealing with this.[8]
See also[edit]
Sieve of Sundaram
Sieve of Atkin
Sieve theory
References[edit]
^ Jump up to: a b c Horsley, Rev. Samuel, F. R. S., "Κόσκινον Ερατοσθένους or, The Sieve of Eratosthenes. Being an account of his method of finding all the Prime Numbers," Philosophical Transactions (1683–1775), Vol. 62. (1772), pp. 327–347.
^ Jump up to: a b c d O'Neill, Melissa E., "The Genuine Sieve of Eratosthenes", Journal of Functional Programming, Published online by Cambridge University Press 9 October 2008 doi:10.1017/S0956796808007004, pp. 10, 11 (contains two incremental sieves in Haskell: a priority-queue–based one by O'Neill and a list–based, by Richard Bird).
Jump up ^ Hoche, Richard, ed. (1866), Nicomachi Geraseni Pythagorei Introductionis arithmeticae libri II, Leipzig: B.G. Teubner, p. 31
Jump up ^ J. C. Morehead, "Extension of the Sieve of Eratosthenes to arithmetical progressions and applications", Annals of Mathematics, Second Series 10:2 (1909), pp. 88–104.
Jump up ^ Clocksin, William F., Christopher S. Mellish, Programming in Prolog, 1984, p. 170. ISBN 3-540-11046-1.
^ Jump up to: a b Runciman, Colin (1997). "Functional Pearl: Lazy wheel sieves and spirals of primes" (PDF). J. Functional Programming. 7 (2): 219–225. doi:10.1017/S0956796897002670.
Jump up ^ Sedgewick, Robert (1992). Algorithms in C++. Addison-Wesley. ISBN 0-201-51059-6. , p. 16.
^ Jump up to: a b c d e f g h Jonathan Sorenson, An Introduction to Prime Number Sieves, Computer Sciences Technical Report #909, Department of Computer Sciences University of Wisconsin-Madison, January 2, 1990 (the use of optimization of starting from squares, and thus using only the numbers whose square is below the upper limit, is shown).
Jump up ^ Crandall & Pomerance, Prime Numbers: A Computational Perspective, second edition, Springer: 2005, pp. 121–24.
Jump up ^ Bays, Carter; Hudson, Richard H. (1977). "The segmented sieve of Eratosthenes and primes in arithmetic progressions to 1012". BIT. 17 (2): 121–127. doi:10.1007/BF01932283.
Jump up ^ J. Sorenson, The pseudosquares prime sieve, Proceedings of the 7th International Symposium on Algorithmic Number Theory. (ANTS-VII, 2006).
Jump up ^ Turner, David A. SASL language manual. Tech. rept. CS/75/1. Department of Computational Science, University of St. Andrews 1975. (primes = sieve [2..] where sieve (p:xs) = p : sieve [x | x <- xs, rem x p > 0]). But see also Peter Henderson, Morris, James Jr., A Lazy Evaluator, 1976, where we find the following, attributed to P. Quarendon: primeswrt[x;l] = if car[l] mod x=0 then primeswrt[x;cdr[l]] else cons[car[l];primeswrt[x;cdr[l]]] ; primes[l] = cons[car[l];primes[primeswrt[car[l];cdr[l]]]] ; primes[integers[2]]; the priority is unclear.
Jump up ^ E. Bach and J. Shallit, §2.7 in Algorithmic Number Theory, Vol. 1: Efficient Algorithms, MIT Press, Cambridge, MA, 1996.
Jump up ^ Peng, T. A. (Fall 1985). "One Million Primes Through the Sieve". BYTE. pp. 243–244. Retrieved 19 March 2016.
Jump up ^ Pritchard, Paul, "Linear prime-number sieves: a family tree," Sci. Comput. Programming 9:1 (1987), pp. 17–35.
^ Jump up to: a b Paul Pritchard, A sublinear additive sieve for finding prime numbers, Communications of the ACM 24 (1981), 18–23. MR600730
^ Jump up to: a b Paul Pritchard, Explaining the wheel sieve, Acta Informatica 17 (1982), 477–485. MR685983
^ Jump up to: a b Paul Pritchard, Fast compact prime number sieves (among others), Journal of Algorithms 4 (1983), 332–344. MR729229
Jump up ^ Gries, David; Misra, Jayadev (December 1978), "A linear sieve algorithm for finding prime numbers", Communications of the ACM, 21 (12): 999–1003, doi:10.1145/359657.359660 .
External links[edit]
Eratosthenes, sieve of at Encyclopaedia of Mathematics
Interactive JavaScript Page
Sieve of Eratosthenes by George Beck, Wolfram Demonstrations Project.
Sieve of Eratosthenes in Haskell
Sieve of Eratosthenes algorithm illustrated and explained. Java and C++ implementations.
A related sieve written in x86 assembly language
A highly optimized Sieve of Eratosthenes in C
A parallel implementation in C#
SieveOfEratosthenesInManyProgrammingLanguages c2 wiki page
The Art of Prime Sieving Sieve of Eratosthenes in C from 1998 with nice features and algorithmic tricks explained.
[hide]
v
t
e
Number-theoretic algorithms
Primality tests
AKS test
APR test
Baillie–PSW
Elliptic curve
Pocklington
Fermat
Lucas
Lucas–Lehmer
Lucas–Lehmer–Riesel
Proth's theorem
Pépin's
Quadratic Frobenius test
Solovay–Strassen
Miller–Rabin
Prime-generating
Sieve of Atkin
Sieve of Eratosthenes
Sieve of Sundaram
Wheel factorization
Integer factorization
Continued fraction (CFRAC)
Dixon's
Lenstra elliptic curve (ECM)
Euler's
Pollard's rho
p − 1
p + 1
Quadratic sieve (QS)
General number field sieve (GNFS)
Special number field sieve (SNFS)
Rational sieve
Fermat's
Shanks' square forms
Trial division
Shor's
Multiplication
Ancient Egyptian
Long
Karatsuba
Toom–Cook
Schönhage–Strassen
Fürer's
Discrete logarithm
Baby-step giant-step
Pollard rho
Pollard kangaroo
Pohlig–Hellman
Index calculus
Function field sieve
Greatest common divisor
Binary
Euclidean
Extended Euclidean
Lehmer's
Modular square root
Cipolla
Pocklington's
Tonelli–Shanks
Other algorithms
Chakravala
Cornacchia
LLL
Integer square root
Modular exponentiation
Schoof's
Italics indicate that algorithm is for numbers of special forms
Retrieved from "https://en.wikipedia.org/w/index.php?title=Sieve_of_Eratosthenes&oldid=797678841"
Categories:
Primality tests
Sieve theory
Algorithms
Hidden categories:
Articles containing Greek-language text
Articles containing Ancient Greek-language text
Articles needing additional references from June 2015
All articles needing additional references
Articles with example pseudocode
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Article
Talk
Variants
Views
Read
Edit
View history
More
Search
Navigation
Main page
Contents
Featured content
Current events
Random article
Donate to Wikipedia
Wikipedia store
Interaction
Help
About Wikipedia
Community portal
Recent changes
Contact page
Tools
What links here
Related changes
Upload file
Special pages
Permanent link
Page information
Wikidata item
Cite this page
Print/export
Create a book
Download as PDF
Printable version
In other projects
Wikimedia Commons
Languages
العربية
Български
Bosanski
Català
Čeština
Dansk
Deutsch
Ελληνικά
Español
Esperanto
فارسی
Français
한국어
Hrvatski
Bahasa Indonesia
Italiano
עברית
ქართული
Latina
Latviešu
Lietuvių
Magyar
Македонски
مازِرونی
Bahasa Melayu
Nederlands
日本語
Norsk
Occitan
Oʻzbekcha/ўзбекча
Piemontèis
Polski
Português
Română
Русский
Shqip
Sicilianu
සිංහල
Simple English
Slovenčina
Slovenščina
Српски / srpski
Srpskohrvatski / српскохрватски
Suomi
Svenska
Türkçe
Українська
Tiếng Việt
中文
Edit links
This page was last edited on 28 August 2017, at 15:41.
Text is available under the Creative Commons Attribution-ShareAlike License; additional terms may apply. By using this site, you agree to the Terms of Use and Privacy Policy. Wikipedia® is a registered trademark of the Wikimedia Foundation, Inc., a non-profit organization.
Privacy policy
About Wikipedia
Disclaimers
Contact Wikipedia
Developers
Cookie statement
Mobile view
Enable previews

key: html

type: local

value: div

attrs: id class

values: mw-page-base noprint

values: mw-head-base noprint

attrs: id class style

value: a

attrs: id class lang

values: firstHeading firstHeading en

values: siteSub noprint

attrs: href title

value: bdi

attrs: href class title

values:
/wiki/User_talk:Headbomb
mw-usertoollinks-talk
User talk:Headbomb

value: span

value: b

value: tbody

value: table

attrs: id class role

values:
revision-info-current
plainlinks fmbox fmbox-system
presentation

attrs: alt src width height class data-file-width data-file-height

values: position: absolute; left: 0px; top: 0px; text-align: left; font-family:'Times New Roman',serif; font-weight:bold; font-size: large; color: gray;

values: position: absolute; right: 0px; bottom: 0px; text-align: left; font-family:'Times New Roman',serif; font-weight:bold; font-size: large; color: gray;

values: float: right; clear: right; margin: 0.5em 0 0.8em 1.4em; padding: 10px; border: 1px solid #aaa; font-size: 105%; background-color: #F9F9F9;

values:
/wiki/Arithmetic_progressions
mw-redirect
Arithmetic progressions

attrs: alt src width height srcset data-file-width data-file-height

values: Help:Introduction to referencing with Wiki Markup/1

values: plainlinks metadata ambox ambox-content ambox-Refimprove

values: vertical-align: -3.338ex; width:8.218ex; height:6.676ex;

values: display:block; line-height:1em; margin:0 0.1em; border-top:1px solid;

values: display:inline-block; vertical-align:-0.5em; font-size:85%; text-align:center;

values: vertical-align: -3.171ex; width:42.343ex; height:7.509ex;

values: vertical-align: -3.338ex; width:5.769ex; height:6.676ex;

values: vertical-align: -3.338ex; margin-left: -0.056ex; width:4.691ex; height:5.843ex;

values: vertical-align: -3.338ex; margin-left: -0.056ex; width:9.551ex; height:6.843ex;

values: vertical-align: -3.338ex; margin-left: -0.056ex; width:63.945ex; height:7.676ex;

values:
/wiki/Random_access_machine
mw-redirect
Random access machine

values:
/wiki/Prime_harmonic_series
mw-redirect
Prime harmonic series

values:
/wiki/Bit_complexity
mw-redirect
Bit complexity

values: Proof of the Euler product formula for the Riemann zeta function

values:
/wiki/Linear_time
mw-redirect
Linear time

values:
/wiki/List_(computing)
mw-redirect
List (computing)

values:
nofollow
external text
http://www.jstor.org/stable/106053

values:
nofollow
external text
http://www.jstor.org/stable/1967477

values:
nofollow
external text
//doi.org/10.1007%2FBF01932283

values:
nofollow
external text
//doi.org/10.1145%2F359657.359660

values: -moz-column-width: 30em; -webkit-column-width: 30em; column-width: 30em; list-style-type: decimal;

values:
nofollow
external text
http://www.hbmeyer.de/eratosiv.htm

values:
nofollow
external text
http://zsmith.co/primes.html

values: Template talk:Number-theoretic algorithms (page does not exist)

values:
/wiki/Long_multiplication
mw-redirect
Long multiplication

values: Lenstra–Lenstra–Lovász lattice basis reduction algorithm

values: nowraplinks collapsible uncollapsed navbox-inner

values: Category:Articles containing Greek-language text

values: Category:Articles containing Ancient Greek-language text

values: Category:Articles needing additional references from June 2015

values: Category:All articles needing additional references

values: Category:Articles with example pseudocode

values: Discussion about edits from this IP address [ctrl-alt-n]

values: A list of edits made from this IP address [ctrl-alt-y]

values: You are encouraged to create an account and log in; however, it is not mandatory

values: You're encouraged to log in; however, it's not mandatory. [ctrl-alt-o]

values:
/wiki/Sieve_of_Eratosthenes
View the content page [ctrl-alt-c]
c

values: Discussion about the content page [ctrl-alt-t]

values: p-namespaces navigation vectorTabs p-namespaces-label

values:
p-variants
navigation
vectorMenu emptyPortlet
p-variants-label

values: Past revisions of this page [ctrl-alt-h]

values: p-views navigation vectorTabs p-views-label

values:
p-cactions
navigation
vectorMenu emptyPortlet
p-cactions-label

values:
mw-wiki-logo
/wiki/Main_Page
Visit the main page

values:
/wiki/Main_Page
Visit the main page [ctrl-alt-z]
z

values: portal navigation p-wikibase-otherprojects p-wikibase-otherprojects-label

values:
uls-settings-trigger
Language settings
0
button
true

values: غربال إراتوستينس – Arabic

values: Решето на Ератостен – Bulgarian

values: Κόσκινο του Ερατοσθένη – Greek

values: غربال اراتوستن – Persian

values: 에라토스테네스의 체 – Korean

values: הנפה של ארטוסתנס – Hebrew

values: ერატოსთენეს საცერი – Georgian

values: Ератостеново сито – Macedonian

values: اراتوستن غربال – Mazanderani

values: エラトステネスの篩 – Japanese

values: Решето Эратосфена – Russian

values: එරටොස්තනීස්ගේ පෙනේරය – Sinhala

values: Ератостеново сито – Serbian

values: Решето Ератосфена – Ukrainian

values: 埃拉托斯特尼筛法 – Chinese

values: /static/images/wikimedia-button-1.5x.png 1.5x, /static/images/wikimedia-button-2x.png 2x

values: /static/images/poweredby_mediawiki_132x47.png 1.5x, /static/images/poweredby_mediawiki_176x62.png 2x

values:
suggestions
display: none; font-size: 13px;

values: mediawiki ltr sitedir-ltr mw-hide-empty-elt ns-0 ns-subject page-Sieve_of_Eratosthenes rootpage-Sieve_of_Eratosthenes skin-vector action-view