proposed
approved
proposed
approved
editing
proposed
x^2 = (x)^2 ; x^3 = x * x^2 ; x^5 = x^2 * x^3
x^2 = (x)^2 ; x^4 = (x^2)^2 ; x^5 = x * x^4
x^2 = (x² )^2 ; x^3 = x * x^2 ; x^5 = x^2 * x^3
x^2 = (x² )^2 ; x^4 = (x^2)² ^2 ; x^5 = x * x^4
approved
editing
Laurent Thévenoux and _Christophe Mouilleron (christophe.mouilleron(AT)ens-lyon.org), _, Feb 23 2011
proposed
approved
allocated Maximal number of squarings in an evaluation scheme for Christophe Mouilleronx^n achieving the minimal number of operations.
0, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 3, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 4, 5, 5, 5, 4, 5, 5, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5
1,4
a(n) is also the maximal number of doublings in a shortest addition chain for n.
We have a(n) = floor(log_2(n)) for all n ≤ 60 except 23, 39, 43 and 46.
For n=5, we can evaluate x^5 using only 3 operations in 2 ways:
x^2 = x² ; x^3 = x * x^2 ; x^5 = x^2 * x^3
x^2 = x² ; x^4 = (x^2)² ; x^5 = x * x^4
The second way achieves the maximal number of doublings, which is a(5) = 2.
Cf A003313.
allocated
nonn
Laurent Thévenoux and Christophe Mouilleron (christophe.mouilleron(AT)ens-lyon.org), Feb 23 2011
approved
proposed
allocated for Christophe Mouilleron
recycled
allocated
proposed
approved
Numbers such that the sum of the digits plus the product of the digits equals the square of the sum of the digits.
2, 10, 100, 1000, 3445, 3454, 3544, 4345, 4354, 4435, 4453, 4534, 4543, 5344, 5434, 5443, 10000, 12567, 12576, 12657, 12675, 12756, 12765, 15267, 15276, 15627, 15672, 15726, 15762, 16257, 16275, 16527, 16572, 16725, 16752, 17256, 17265, 17526, 17562, 17625, 17652, 21567, 21576
1,1
22354 is in the sequence because (2+2+3+5+4) + (2*2*3*5*4) = (2+2+3+5+4)^2
= 16^2.
with(numtheory):for n from 1 to 50000 do:l:=length(n):n0:=n:s:=0:p:=1:for m
from 1 to l do:q:=n0:u:=irem(q, 10):v:=iquo(q, 10):n0:=v :s:=s+u:p:=p*u:od:if
s+p=s^2 then printf(`%d, `, n):else fi:od:
nonn,base,less,changed
recycled
Michel Lagneau (mn.lagneau2(AT)orange.fr), Feb 21 2011