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

Home > Numbers
Seven-digit Number (Posted on 2023-07-28) Difficulty: 3 of 5
Find a 7-digit decimal number such that:
It is prime;
Its sod() is 38;
The sod() of the first 3 digits is the reverse of the sod() of the last 3 digits;
When it is converted from decimal to base-N, where N is any integer from 11 to 36, all 10 numeric digits and 23 different letters appear, but there is never a Q, S, or Z in its base-N representation (for those bases).

These constraints determine a unique 7-digit number.
Find it.

Bonus: what is its pop culture significance?

Note: the sod(N) is the sum of digits of N

No Solution Yet Submitted by Larry    
Rating: 5.0000 (1 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution computer solution | Comment 1 of 5
clearvars
ct=0;
global thirty8 thirtyEight
thirtyEight=double.empty(0,7);
for i=0:9
  thirty8=i;
  addon;
end
for i=1:length(thirtyEight)
  thirty8=thirtyEight(i,:);
  list38=uniqueperms(thirty8);
  for j=1:size(list38,1)
    nAsList=list38(j,:);
    ns=char(nAsList+48);
    n=str2double(ns);
    if isprime(n) && n>1000000
      a=char(string(sod(ns(1:3))));
      z=char(string(sod(ns(5:7))));
      if isequal(a,flip(z))
        had=[];
        for base=11:36
          bval=dec2base(n,base);          
          if length(strfind(bval,'Q'))>0
            continue
          end
          if length(strfind(bval,'S'))>0
            continue
          end 
          if length(strfind(bval,'Z'))>0
            continue
          end
          had(bval)=1;
        end
        if sum(had)==33
          disp([n sum(had)])
          disp(char(find(had==1)))
        end
      end
    end
  end
end

function addon
global thirty8 thirtyEight
  for i=thirty8(end):9
    if i+sum(thirty8)<=38
      if i+sum(thirty8)+9*(6-length(thirty8))>=38
        thirty8(end+1)=i;
        if length(thirty8)==7
          thirtyEight(end+1,:)=thirty8;
        else
          addon
        end
        thirty8=thirty8(1:end-1);
      end
    end
  end
end

finds

     8675309          33
0123456789ABCDEFGHIJKLMNOPRTUVWXY

being the number, the number of different digits used in bases 10 to 36, and those digits.

The number in pop culture represents a phone number, in the song "867-5309/Jenny" a 1981 song written by Alex Call and Jim Keller and performed by Tommy Tutone that was released on the album Tommy Tutone 2, on the Columbia Records label. It peaked at No. 4 on the Billboard Hot 100 chart in May 1982, and No. 1 on the Billboard Hot Mainstream Rock Tracks chart in April 1982. (Wikipedia)

  Posted by Charlie on 2023-07-28 12:25:19
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 (9)
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