Jump to content

Addition-chain exponentiation: Difference between revisions

→‎{{header|Go}}: Added code to generate the first 100 terms of A003313.
(→‎{{header|Go}}: Added a (hopefully) admissible solution for this task.)
(→‎{{header|Go}}: Added code to generate the first 100 terms of A003313.)
Line 570:
{0, 0, 0, 0, 0, 1},
{0, 0, 0, 0, 1, 0},
}
fmt.Println("\nThe first 100 terms of A003313 are:")
for i := 1; i <= 100; i++ {
fmt.Printf("%d ", seqLen(i))
if i%10 == 0 {
fmt.Println()
}
}
exs := [2]int{m, n}
Line 597 ⟶ 604:
Cached 29696
Cached 30720
 
The first 100 terms of A003313 are:
0 1 2 2 3 3 4 3 4 4
5 4 5 5 5 4 5 5 6 5
6 6 6 5 6 6 6 6 7 6
7 5 6 6 7 6 7 7 7 6
7 7 7 7 7 7 8 6 7 7
7 7 8 7 8 7 8 8 8 7
8 8 8 6 7 7 8 7 8 8
9 7 8 8 8 8 8 8 9 7
8 8 8 8 8 8 9 8 9 8
9 8 9 9 9 7 8 8 8 8
 
Exponent: 27182
9,485

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.