Power Tree

Submit

Your name:
File:
Open code-statistics:

Language is selected by the extension of the file. See the list of supported languages to know the extension of your language.

Problem

Print Knuth's power tree (http://oeis.org/A122352), or an addition chain from the tree.

Options

exec is denied

now post-mortem time, all source codes will be revealed

Sample input:_

t100

Sample output:

1 2 2 3 3 5 4 6 5 10 6 10 7 10 8 16 9 14 10 14 11 13 12 15 13 18 14 28 15 28 16 17 17 21 18 36 19 26 20 40 21 40 22 30 23 42 24 48 25 48 26 52 27 44 28 38 29 31 30 56 31 42 32 64 33 66 34 46 35 57 36 37 37 50 38 76 39 76 40 41 41 43 42 80 43 84 44 47 45 70 46 62 47 57 48 49 49 51 50

Sample input:_

c100

Sample output:

1 2 3 5 10 15 25 50 100

Sample input:_

c31337

Sample output:

1 2 3 5 10 15 30 60 120 121 241 482 964 1928 3856 3977 7833 15666 31332 31337

Ranking

Python _

RankUserSizeTimeDateStatistics
1hallvabo1882.33852011/09/22 23:51:07103B / 57B / 28B
2boothby2611.02342011/09/11 05:46:3014B / 125B / 84B

JavaScript _

RankUserSizeTimeDateStatistics
1nn1712.96732011/09/18 21:09:180B / 76B / 89B

J _

RankUserSizeTimeDateStatistics
1I., S.1302.44352011/09/12 12:26:070B / 37B / 87B
2pooq2030.09752011/09/10 12:35:170B / 124B / 51B
3I., S.1122.44012011/10/02 00:28:070B / 35B / 72B

C _

RankUserSizeTimeDateStatistics
1nn2100.05282011/09/19 14:54:290B / 90B / 118B

Language Ranking_

RankLangUserSizeScore
1JI., S.11210000
2JavaScriptnn1716549
3Pythonhallvabo1885957
4Cnn2105333

return top