Monday, February 20, 2017

How many Palindromic Primes under one million?

So, someone asks, "How many prime palindromic numbers are between 1 and 1-000-000?"

The answer is 113...

1. palindromic prime: 2
2. palindromic prime: 3
3. palindromic prime: 5
4. palindromic prime: 7
5. palindromic prime: 11
6. palindromic prime: 101
7. palindromic prime: 131
8. palindromic prime: 151
9. palindromic prime: 181
10. palindromic prime: 191
11. palindromic prime: 313
12. palindromic prime: 353
13. palindromic prime: 373
14. palindromic prime: 383
15. palindromic prime: 727
16. palindromic prime: 757
17. palindromic prime: 787
18. palindromic prime: 797
19. palindromic prime: 919
20. palindromic prime: 929
21. palindromic prime: 10301
22. palindromic prime: 10501
23. palindromic prime: 10601
24. palindromic prime: 11311
25. palindromic prime: 11411
26. palindromic prime: 12421
27. palindromic prime: 12721
28. palindromic prime: 12821
29. palindromic prime: 13331
30. palindromic prime: 13831
31. palindromic prime: 13931
32. palindromic prime: 14341
33. palindromic prime: 14741
34. palindromic prime: 15451
35. palindromic prime: 15551
36. palindromic prime: 16061
37. palindromic prime: 16361
38. palindromic prime: 16561
39. palindromic prime: 16661
40. palindromic prime: 17471
41. palindromic prime: 17971
42. palindromic prime: 18181
43. palindromic prime: 18481
44. palindromic prime: 19391
45. palindromic prime: 19891
46. palindromic prime: 19991
47. palindromic prime: 30103
48. palindromic prime: 30203
49. palindromic prime: 30403
50. palindromic prime: 30703
51. palindromic prime: 30803
52. palindromic prime: 31013
53. palindromic prime: 31513
54. palindromic prime: 32323
55. palindromic prime: 32423
56. palindromic prime: 33533
57. palindromic prime: 34543
58. palindromic prime: 34843
59. palindromic prime: 35053
60. palindromic prime: 35153
61. palindromic prime: 35353
62. palindromic prime: 35753
63. palindromic prime: 36263
64. palindromic prime: 36563
65. palindromic prime: 37273
66. palindromic prime: 37573
67. palindromic prime: 38083
68. palindromic prime: 38183
69. palindromic prime: 38783
70. palindromic prime: 39293
71. palindromic prime: 70207
72. palindromic prime: 70507
73. palindromic prime: 70607
74. palindromic prime: 71317
75. palindromic prime: 71917
76. palindromic prime: 72227
77. palindromic prime: 72727
78. palindromic prime: 73037
79. palindromic prime: 73237
80. palindromic prime: 73637
81. palindromic prime: 74047
82. palindromic prime: 74747
83. palindromic prime: 75557
84. palindromic prime: 76367
85. palindromic prime: 76667
86. palindromic prime: 77377
87. palindromic prime: 77477
88. palindromic prime: 77977
89. palindromic prime: 78487
90. palindromic prime: 78787
91. palindromic prime: 78887
92. palindromic prime: 79397
93. palindromic prime: 79697
94. palindromic prime: 79997
95. palindromic prime: 90709
96. palindromic prime: 91019
97. palindromic prime: 93139
98. palindromic prime: 93239
99. palindromic prime: 93739
100. palindromic prime: 94049
101. palindromic prime: 94349
102. palindromic prime: 94649
103. palindromic prime: 94849
104. palindromic prime: 94949
105. palindromic prime: 95959
106. palindromic prime: 96269
107. palindromic prime: 96469
108. palindromic prime: 96769
109. palindromic prime: 97379
110. palindromic prime: 97579
111. palindromic prime: 97879
112. palindromic prime: 98389
113. palindromic prime: 98689
114. palindromic prime: 1003001

And here is the code that proves it... PalindromicPrimeFinder.

Sunday, February 19, 2017

New Rotorcraft User Group on Facebook

I just created a new Rotorcraft User Group on Facebook.  It is designed for general discussions on anything/everything rotorcraft related.  It is not in place to compete with existing helicopter forums, but to compliment them.  Here are a few other rotorcraft forums that I am aware of:


Saturday, February 18, 2017

Can 196 evolve into a palindrone?

Do it yourself: PalindroneFinder


Take a look at Lychrel numbers. A Lychrel number is a number that cannot form a palindrome through the iterative process of repeatedly reversing its digits and adding the resulting numbers.

Example 1

Start PalindromeFinder for 23...

Stage: 23 + 32 = 55

A palindrome was found!


Example 2

Start PalindromeFinder for 254...

Stage: 254 + 452 = 706
Stage: 706 + 607 = 1313
Stage: 1313 + 3131 = 4444
A palindrome was found!


Example 3

Start PalindromeFinder for 2519...

Stage: 2519 + 9152 = 11671
Stage: 11671 + 17611 = 29282
Stage: 29282 + 28292 = 57574
Stage: 57574 + 47575 = 105149
Stage: 105149 + 941501 = 1046650
Stage: 1046650 + 566401 = 1613051
Stage: 1613051 + 1503161 = 3116212
Stage: 3116212 + 2126113 = 5242325
Stage: 5242325 + 5232425 = 10474750
Stage: 10474750 + 5747401 = 16222151
Stage: 16222151 + 15122261 = 31344412
Stage: 31344412 + 21444313 = 52788725

A palindrome was found!

Example 4


Start PalindromeFinder for 196...

[ Who the heck knows if 196 produces a palindrome! Have a fast computer, test it yourself with the PalindroneFinder, though expect the process to take months. :).
Stage: 196 + 691 = 887
Stage: 887 + 788 = 1675
Stage: 1675 + 5761 = 7436
Stage: 7436 + 6347 = 13783
Stage: 13783 + 38731 = 52514
Stage: 52514 + 41525 = 94039
Stage: 94039 + 93049 = 187088
Stage: 187088 + 880781 = 1067869
Stage: 1067869 + 9687601 = 10755470
Stage: 10755470 + 7455701 = 18211171
Stage: 18211171 + 17111281 = 35322452
Stage: 35322452 + 25422353 = 60744805
Stage: 60744805 + 50844706 = 111589511
Stage: 111589511 + 115985111 = 227574622
Stage: 227574622 + 226475722 = 454050344
Stage: 454050344 + 443050454 = 897100798
Stage: 897100798 + 897001798 = 1794102596
...



Friday, February 17, 2017

Mathematical Constants

Need a mathematical constant?  Here they are in Java as BigDecimals provided by GitHub's JMathConstant project.

And here is a quicklook of the code:

package com.gliesian.constants;

import java.math.BigDecimal;

public class MathConstant {

    private MathConstant() {
    }
    
    public static BigDecimal ZERO = new BigDecimal("0.0");
    public static BigDecimal ONE = new BigDecimal("1.0");
    public static BigDecimal MEISSEL_MERTENS = new BigDecimal("0.26149721284764278375542683860869585");
    public static BigDecimal BERNSTEINS = new BigDecimal("0.28016949902386913303");
    public static BigDecimal GAUSS_KKUZMIN_WIRSING = new BigDecimal("0.30366300289873265859744812190155623");
    public static BigDecimal HAFNER_SARNAK_MCCURLEY = new BigDecimal("0.35323637185499598454351655043268201");
    public static BigDecimal LANDAUS = new BigDecimal("0.5");
    public static BigDecimal EULER_MASCHERONI = new BigDecimal("0.57721");
    public static BigDecimal OMEGA = new BigDecimal("0.56714329040978387299996866221035555");
    public static BigDecimal GOLOMB_DICKMAN = new BigDecimal("0.6243299885435508709929363831083724");
    public static BigDecimal CAHEN = new BigDecimal("0.6434105463");
    public static BigDecimal TWO_PRIME = new BigDecimal("0.6601618158468695739281211001455577");
    public static BigDecimal LAPLANE_LIMIT = new BigDecimal("0.66274341934918158097474209710925290");
    public static BigDecimal EMBREE_TREFETHEN = new BigDecimal("0.70258");
    public static BigDecimal LANDAU_RAMANUJAN = new BigDecimal("0.76422365358922066299069873125009232");
    public static BigDecimal ALLADI_GRINSTEAD = new BigDecimal("0.8093940205");
    public static BigDecimal BRUN = new BigDecimal("0.8705883800");
    public static BigDecimal CATALANS = new BigDecimal("0.91596559417721901505460351493238411");
    public static BigDecimal LEGENDRE = new BigDecimal("1.0");
    public static BigDecimal LENGYELS = new BigDecimal("1.0986858055");
    public static BigDecimal VISWANATHS = new BigDecimal("1.13198824");
    public static BigDecimal APERYS = new BigDecimal("1.20205690315959428539973816151144999");
    public static BigDecimal GLAISHER_KINKELIN = new BigDecimal("1.2824271291");
    public static BigDecimal CONWAYS = new BigDecimal("1.30357726903429639125709911215255189");
    public static BigDecimal MILLS = new BigDecimal("1.30637788386308069046861449260260571");
    public static BigDecimal PLASTIC = new BigDecimal("1.32471795724474602596090885447809734");
    public static BigDecimal PYTHAGORAS = new BigDecimal("1.4142135623730950488");
    public static BigDecimal RAMANUJAN_SOLDNER = new BigDecimal("1.45136923488338105028396848589202744");
    public static BigDecimal PORTERS = new BigDecimal("1.4670780794");
    public static BigDecimal BACKHOUSE = new BigDecimal("1.45607494858268967139959535111654356");
    public static BigDecimal LIEBS_SQUARE_ICE = new BigDecimal("1.5396007178");
    public static BigDecimal ERDOS_BORWEIN = new BigDecimal("1.60669515241529176378330152319092458");
    public static BigDecimal GOLDEN_RATIO = new BigDecimal("1.61803398874989484820458683436563811772030917980576286213544862270526046281890");
    public static BigDecimal NIVENS = new BigDecimal("1.70521114010536776428855145343450816");
    public static BigDecimal THEODORUS = new BigDecimal("1.73205080756887729352744634150587236");
    public static BigDecimal BRUNS = new BigDecimal("1.9021605823");
    public static BigDecimal UNIVERSAL_PARABOLIC = new BigDecimal("2.29558714939263807403429804918949039");
    public static BigDecimal SILVER_RATIO = new BigDecimal("2.4142135623730950488");
    public static BigDecimal FEIGENBAUMS_FIRST = new BigDecimal("2.50290787509589282228390287321821578");
    public static BigDecimal SIERPINSKI = new BigDecimal("2.58498175957925321706589358738317116");
    public static BigDecimal KHINCHIN = new BigDecimal("2.68545200106530644530971483548179569");
    public static BigDecimal NAPIERS = new BigDecimal("2.7182818284590452353602874713527");
    public static BigDecimal FRANSEN_ROBINSON = new BigDecimal("2.80777024202851936522150118655777293");
    public static BigDecimal ARCHIMEDES = new BigDecimal("3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989");
    public static BigDecimal LEVYS = new BigDecimal("3.27582291872181115978768188245384386");
    public static BigDecimal RECIPROCAL_FIBONACCI = new BigDecimal("3.35988566624317755317201130291892717");
    public static BigDecimal FEIGENBAUMS_SECOND = new BigDecimal("4.66920160910299067185320382046620161");

    public static void main(String[] args) {
        System.out.println("MEISSEL_MERTENS CONSTANT: " + MEISSEL_MERTENS);
    }
}

Thursday, February 16, 2017

Mysterious Recurring Decimals

I found this video fascinating, so I coded it up...

Notice the pattern (. 000 001 002 003) from 1/998001.0:

0.000001002003004005006007008009010011012013014015016017018019020021022023024025026027028029030031032033034035036037038039040041042043044045046047048049050051052053054055056057058059060061062063064065066067068069070071072073074075076077078079080081082083084085086087088089090091092093094095096097098099100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997999000001002

import java.math.BigDecimal;
import java.math.RoundingMode;

public class MysteriousRecurringDecimals {
    public static void main(String[] args) {
        BigDecimal bigDecimal1 = new BigDecimal("1.0");
        BigDecimal bigDecimal2 = new BigDecimal("998001.0");
        System.out.println(bigDecimal1.divide(bigDecimal2, 3006, RoundingMode.HALF_UP));      
    }
}

Wednesday, February 15, 2017

Successful Emergency Helicopter Operations

Here are a few successful emergency helicopter operations...


Power Failure at a Hover

 

Power Failure at Altitude


Low RPM Recovery

 Settling with Power






 Tail Rotor Failure





Dynamic Rollover




Sunday, February 12, 2017

How to get your recreational helicopter pilot license

Here are seven things to do to get your recreational helicopter pilot license.
  • Buy a few things
  • Get your student pilot certificate
  • Get medically evaluated
  • Find a flight instructor / flight school and target rotorcraft
  • Pass the helicopter knowledge exam
  • Pass the helicopter practical exam
  • (Acquire the appropriate aeronautical experience)
Helicopters flying over Ocean City, NJ

1. Buy a few things (my recommendations)...

2. Get your Student Pilot Certificate

Register for your Student Pilot certificate from Integrated Airman Certification and Rating Application (IACRA).  It's free.  You will need to be 16 and be able to read, speak and write the English Language.

3. Get medically evaluated

Get medically evaluated from a Aviation Medical Examiner.  
Learn more on medical requirements from 14 CFR Part 67, Subpart D - Third-Class Airman Medical Certificate.


4. Find a flight instructor / flight school and target rotorcraft 


Answer these two questions:

5. Pass the Recreational Helicopter Pilot Knowledge Exam

Sign up for, sit and pass the RECREATIONAL PILOT – ROTOTCRAFT/HELICOPTER (RPH) relative to 14 CFR 61.97 - Aeronautical knowledge.  It is best that you attend a good ground school to assist in acquiring the appropriate knowledge.  You will also need a logbook endorsement.

6. Pass the Recreational Helicopter Pilot Practical Exam

For a helicopter rating, you must be proficient in the following:
  • Preflight preparation;
  • Preflight procedures;
  • Airport and heliport operations;
  • Hovering maneuvers;
  • Takeoffs, landings and go-arounds;
  • Performance maneuvers;
  • Ground reference maneuvers;
  • Navigation;
  • Emergency operations; 
  • Postflight procedures.

The following is achieved through flight training and a log book endorsement.  Here is a demonstration of the practical exam.



7. (Acquire the appropriate aeronautical experience)

Accomplish 30 hours of flight time that includes the hours as defined by 14 CFR 61.99 - Aeronautical experience.


* Simulation support

Consider setting up X-Plane to support your learning.