Posts

Showing posts with the label fermat numbers

Fermat numbers | Rosetta Code | #24

URL to the problem page:  http://rosettacode.org/wiki/Fermat_numbers In mathematics, a Fermat number, named after Pierre de Fermat who first studied them , is a positive integer of the form F n  = 2 2^ n  + 1 where n is a non-negative integer. Despite the simplicity of generating Fermat numbers, they have some powerful mathematical properties and are extensively used in cryptography & pseudo-random number generation, and are often linked to other number theoric fields. As of this writing, (mid 2019), there are only five known prime Fermat numbers, the first five ( F 0  through F 4 ). Only the first twelve Fermat numbers have been completely factored, though many have been partially factored. Find and display here, on this page, the first 10 Fermat numbers - F 0  through F 9 . #include   <iostream> using   namespace   std ; int   power ( int   a ,  int   b ) {      int  re...
My photo
Ercan Tomac
instagram.com/ercantomac