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

Home > Just Math
Integer Expression Exploration (Posted on 2025-01-07) Difficulty: 3 of 5
How many positive integers cannot be written as 7a + 19b + 28c, where a, b, and c are positive integers (not necessarily distinct)?

No Solution Yet Submitted by Danish Ahmed Khan    
No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution proposed solution | Comment 1 of 3
clc,clearvars
had=zeros(1,6000);
ct=0;
for a=1:2999
  for b=1:2999
    for c=1:2999
      v=7*a+19*b+28*c;
      if v<=3000
        had(v)=1;
      end
    end
  end
end
for i=1:3000
  if had(i)==0
    disp(i)
    ct=ct+1;
  end
end
ct

There are 107 positive integers unobtainable, as given by the bottom line below:

     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    55
    56
    57
    58
    59
    60
    62
    63
    64
    65
    66
    67
    69
    70
    71
    72
    74
    76
    77
    78
    79
    81
    83
    84
    85
    86
    88
    90
    91
    93
    95
    97
    98
   100
   102
   104
   105
   107
   109
   112
   114
   116
   119
   121
   123
   126
   128
   133
   135
   140
   142
   147
   154
   161
ct =
   107


  Posted by Charlie on 2025-01-07 09:22:44
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 (4)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

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