This is my 1st F# program so I'm open to any and all criticism on my syntax and the way I approached the problem.
Challenge
Project Euler 16: Power Digit Sum
2^15 = 32768 and the sum of its digits is 3 + 2 + 7 + 6 + 8 = 26. What is the sum of the digits of the number 2^1000?
open System
open System.Numerics
let digitPower (n:bigint) p = pown n p
let digitToPowerSum (n:bigint) p =
(digitPower n p) |>
string |>
(fun s -> s.ToCharArray()) |>
Array.map (fun x -> Int32.Parse (x.ToString())) |>
Array.sum
[<EntryPoint>]
let main argv =
let n = new bigint(2)
let p = 1000
let value = digitPower n p
let sum = digitToPowerSum n p
Console.WriteLine(String.Format("{0}^{1} = {2:n}", n, p, value))
Console.WriteLine()
Console.WriteLine(String.Format("Its digit sum is {0}", sum))
Console.ReadKey() |> ignore
0
I'm primarily concerned with