Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Help!!! Write a public class Lucky2019 that prints the first 314 lucky numbers. OEIS.org::Lucky numbers [OEIS::A000959] is an integer sequence generated as follows. Start with

Help!!!

Write a public class Lucky2019 that prints the first 314 "lucky numbers."

OEIS.org::Lucky numbers [OEIS::A000959] is an integer sequence generated as follows.

 "Start with the natural numbers [1 2 3 4 5 ...]. Delete every 2nd number, leaving 1 3 5 7 ...; the 2nd number remaining is 3, so delete every 3rd number, leaving 1 3 7 9 13 15 ...; now delete every 7th number, leaving 1 3 7 9 13 ...; now delete every 9th number; etc." [source: OEIS.org] Note: Wikipedia.org has a good Lucky number page. 

The output of the program must match the following. {output file}

1...1 2...3 3...7 4...9 5...13 6...15 7...21 8...25 9...31 10...33 11...37 12...43 13...49 14...51 15...63 16...67 17...69 18...73 19...75 20...79 21...87 22...93 23...99 24...105 25...111 26...115 27...127 28...129 29...133 30...135 31...141 32...151 33...159 34...163 35...169 36...171 37...189 38...193 39...195 40...201 41...205 42...211 43...219 44...223 45...231 46...235 47...237 48...241 49...259 50...261 51...267 52...273 53...283 54...285 55...289 56...297 57...303 58...307 59...319 60...321 61...327 62...331 63...339 64...349 65...357 66...361 67...367 68...385 69...391 70...393 71...399 72...409 73...415 74...421 75...427 76...429 77...433 78...451 79...463 80...475 81...477 82...483 83...487 84...489 85...495 86...511 87...517 88...519 89...529 90...535 91...537 92...541 93...553 94...559 95...577 96...579 97...583 98...591 99...601 100...613 101...615 102...619 103...621 104...631 105...639 106...643 107...645 108...651 109...655 110...673 111...679 112...685 113...693 114...699 115...717 116...723 117...727 118...729 119...735 120...739 121...741 122...745 123...769 124...777 125...781 126...787 127...801 128...805 129...819 130...823 131...831 132...841 133...855 134...867 135...873 136...883 137...885 138...895 139...897 140...903 141...925 142...927 143...931 144...933 145...937 146...957 147...961 148...975 149...979 150...981 151...991 152...993 153...997 154...1009 155...1011 156...1021 157...1023 158...1029 159...1039 160...1041 161...1053 162...1057 163...1087 164...1093 165...1095 166...1101 167...1105 168...1107 169...1117 170...1123 171...1147 172...1155 173...1167 174...1179 175...1183 176...1189 177...1197 178...1201 179...1203 180...1209 181...1219 182...1231 183...1233 184...1245 185...1249 186...1251 187...1261 188...1263 189...1275 190...1281 191...1285 192...1291 193...1303 194...1309 195...1323 196...1329 197...1339 198...1357 199...1365 200...1369 201...1387 202...1389 203...1395 204...1401 205...1417 206...1419 207...1435 208...1441 209...1455 210...1459 211...1471 212...1473 213...1485 214...1491 215...1495 216...1497 217...1501 218...1503 219...1519 220...1533 221...1543 222...1545 223...1563 224...1567 225...1575 226...1579 227...1585 228...1587 229...1597 230...1599 231...1611 232...1639 233...1641 234...1645 235...1659 236...1663 237...1675 238...1693 239...1701 240...1705 241...1711 242...1723 243...1731 244...1737 245...1749 246...1765 247...1767 248...1771 249...1773 250...1777 251...1797 252...1801 253...1809 254...1819 255...1827 256...1831 257...1833 258...1839 259...1857 260...1869 261...1879 262...1893 263...1899 264...1915 265...1921 266...1923 267...1933 268...1941 269...1945 270...1959 271...1963 272...1965 273...1977 274...1983 275...1987 276...1995 277...2001 278...2019 279...2023 280...2031 281...2053 282...2059 283...2065 284...2067 285...2079 286...2083 287...2085 288...2095 289...2113 290...2115 291...2121 292...2125 293...2127 294...2133 295...2163 296...2173 297...2187 298...2209 299...2211 300...2215 301...2217 302...2221 303...2239 304...2251 305...2253 306...2257 307...2271 308...2277 309...2281 310...2283 311...2301 312...2311 313...2317 314...2323

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Climate And Environmental Database Systems

Authors: Michael Lautenschlager ,Manfred Reinke

1st Edition

1461368332, 978-1461368335

More Books

Students also viewed these Databases questions