All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Numbers
Summing or Multiplying (Posted on 2006-08-21) Difficulty: 4 of 5
123 is a peculiar integer, because 1+2+3=1*2*3. 1412 is also peculiar, since 1+4+1+2=1*4*1*2.

A simple question: are there infinitely many such numbers?

A not so simple question: if so, are there such numbers for ANY number of digits?

See The Solution Submitted by e.g.    
Rating: 4.2500 (8 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
With a program | Comment 4 of 21 |

With a program testing up to 26 non-"1" digits, most numbers of digits show up quickly as possible, but 24, 34, 35, 44, 48, and 66 (and possibly others) don't show up in the time I have to wait for them. Either they need a lot of non-"1" digits to fit the rule or they don't fit the rule.

public class Test
{
 public static void main(String[] args)
 {
  KeyboardReader reader = new KeyboardReader ();
 for(int count=-24;count>-100;count++)
 { 
  
 for (int a=1;a<=9;a++)
 {
 for (int b=1;b<=9;b++)
 {
 for (int c=1; c<=9;c++)

(up to z)

 for (int z=1;z<=9;z++)
      {
       if (count==-2||count==8||count==9||count==18||count==22)
       {
       a=b=c=d=e=f=g=h=i=j=k=l=m=n=o=p=q=r=s=t=u=v=x=y=z=10;
       }
       
       if (a*b*c*d*e*f*g*h*i*j*k*l*m*n*o*p*q*r*s*t*u*v*w*x*y*z-a-b-c-d-e-f-g-h-i-j-k-l-m-n-o-p-q-r-s-t-u-v-w-x-y-z==count)
       {
        a=b=c=d=e=f=g=h=i=j=k=l=m=n=o=p=q=r=s=t=u=v=w=x=y=z=10;
            
        System.out.println(count+26);
         
       }


  Posted by Joe on 2006-08-21 16:45:01
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (14)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2024 by Animus Pactum Consulting. All rights reserved. Privacy Information