ChatGPT-4 uses Math Wolfram Plugin to Solve a Math Brain Teaser Question


This post, we look at a simple Math question (Brain Teaser), and we solve it by Python. We take a look at the LLM (Large Language Model): ChatGPT3.5, and ChatGPT4. With ChatGPT-Plus Subscription (Currently $20 per month + VAT), we can enable the Plugins for ChatGPT-4, thus, we also take a look at the ChatGPT-4 with the Wolfram Plugin.

The Math Question: Smallest Integer Greater Than 95,555 and Having 4 Identical Digits

math-95555 ChatGPT-4 uses Math Wolfram Plugin to Solve a Math Brain Teaser Question Artificial Intelligence ChatGPT (OpenAI) math python Python

What is the smallest integer greater than 95555, in which there will be 4 identical numbers? The answer is 95999


The Question (A bit Math, a bit Brain Teaser) is: What is the smallest integer greater than 95,555, in which there will be 4 identical numbers?

TLDR; The answer is 95999.

Python Solution

Let’s verify using the Computer Program. The following Python Code tries next number from 95,556 until it finds a number that contains 4 identical numbers:

1
2
3
4
5
6
7
8
9
from collections import Counter
 
x = 95555
while True:
    x += 1
    counter = Counter(str(x))
    if max(counter.values()) == 4:
        print(x)
        break
from collections import Counter

x = 95555
while True:
    x += 1
    counter = Counter(str(x))
    if max(counter.values()) == 4:
        print(x)
        break

The output is 95999.

python-code-to-find-out-the-solution ChatGPT-4 uses Math Wolfram Plugin to Solve a Math Brain Teaser Question Artificial Intelligence ChatGPT (OpenAI) math python Python

Python code to find out the smallest integer that has 4 identical numbers and greater than 95,555

ChatGPT-3.5 Attempting to Solve the Math Brain Teaser Question

The ChatGPT3.5 isn’t clever enough to figure this out, and it makes obvious mistakes but pretends it is correct.

chatgpt-3.5-fails-to-solve-brain-teaser-question ChatGPT-4 uses Math Wolfram Plugin to Solve a Math Brain Teaser Question Artificial Intelligence ChatGPT (OpenAI) math python Python

ChatGPT 3.5 Fails to Solve the Brainer Teaser / Math Question

ChatGPT-4 Needs some Hints

ChatGPT-4 is a little bit better, it finds 96666 the second attempt after I pointed out the mistake for its first answer 95666.

chatgpt-4-needs-some-help-to-solve-brain-teaser-scaled ChatGPT-4 uses Math Wolfram Plugin to Solve a Math Brain Teaser Question Artificial Intelligence ChatGPT (OpenAI) math python Python

ChatGPT 4 Needs to Improve Its Math Skills

ChatGPT-4 Plus the Math Wolfram Plugin

ChatGPT-4 with Plugins enabled can solve the problem by querying the Math Wolfram Plugin with the following request.

REQUEST TO WOLFRAM

1
2
3
{
  "input": "nextNumber = 95556; While[Count[IntegerDigits[nextNumber], _?(# == Max[IntegerDigits[nextNumber]] &)] != 4, nextNumber++]; nextNumber"
}
{
  "input": "nextNumber = 95556; While[Count[IntegerDigits[nextNumber], _?(# == Max[IntegerDigits[nextNumber]] &)] != 4, nextNumber++]; nextNumber"
}

RESPONSE FROM WOLFRAM

1
"95999"
"95999"
chatgpt-4-with-wolfram-math-plugin-to-solve-a-brainer-teaser-question ChatGPT-4 uses Math Wolfram Plugin to Solve a Math Brain Teaser Question Artificial Intelligence ChatGPT (OpenAI) math python Python

ChatGPT-4 uses Wolfram Math Plugin

It solves the problem, but technically, it is not ChatGPT but Wolfram who solves the question.

ChatGPT Use Cases

ChatGPT - AGI (Artificial General Intelligence)

ChatGPT Fails to

–EOF (The Ultimate Computing & Technology Blog) —

GD Star Rating
loading...
701 words
Last Post: TRON Blockchain: How to Send the USDT (TRC-20) Transacton using Python tronpy?
Next Post: Teaching Kids Programming - Algorithms to Compute the Minimum String Length After Removing Substrings (Brute Force + Stack)

The Permanent URL is: ChatGPT-4 uses Math Wolfram Plugin to Solve a Math Brain Teaser Question

Leave a Reply