En İyi Sorular
Zaman Çizelgesi
Sohbet
Bakış Açıları

Dudeney sayısı

Vikipedi'den, özgür ansiklopediden

Remove ads

Bir Dudeney sayısı basamaklarının sayı değerleri toplamının küpü kendisine eşit olan sayma sayısıdır. Bu sayıların adı bu sayıların varlığını ilk keşfeden Henry Dudeney'den gelmektedir.

Toplamda 6 tane Dudeney sayısı vardır:

    1 =  1 x  1 x  1 ; 1 = 1
  512 =  8 x  8 x  8 ; 8 = 5 + 1 + 2
 4913 = 17 x 17 x 17 ; 17 = 4 + 9 + 1 + 3
 5832 = 18 x 18 x 18 ; 18 = 5 + 8 + 3 + 2
17576 = 26 x 26 x 26 ; 26 = 1 + 7 + 5 + 7 + 6
19683 = 27 x 27 x 27 ; 27 = 1 + 9 + 6 + 8 + 3
Remove ads

C# Programlama Dili ile sayıların bulunması

           for (int j = 0; j < int.MaxValue; j++)
           {
               string sayi = j.ToString();
               int[] s = new int[sayi.Length];
               for (int i = 0; i < sayi.Length; i++)
               {
                   s[i] = Convert.ToInt32(sayi[i].ToString());
               }
               int c = 1;
               double t = 0.0;
               for (int i = 0; i < sayi.Length; i++)
               {
                   t = s[i] + t;
               }
               c = Convert.ToInt32(Math.Pow(t, 3.0));
               if (c == j)
               {
                   listBox1.Items.Add(j);
               }
           }
Remove ads

Kaynakça

  • H. E. Dudeney, 536 Puzzles & Curious Problems, Souvenir Press, Londra, 1968, s. 36.
Loading related searches...

Wikiwand - on

Seamless Wikipedia browsing. On steroids.

Remove ads