Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9114959
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T04:19:04+00:00 2026-06-17T04:19:04+00:00

EDIT : I’m moving this to cstheory.stackexchange.com I want a binary decision on an

  • 0

EDIT : I’m moving this to cstheory.stackexchange.com

I want a binary decision on an input sequence of integers. For a given n in the sequence output whether it is prime or not. Don’t use AKS, don’t use Miller Rabin, don’t use trial division, don’t even hard code in that the last digit must be 1,3,7,9 and that it must be congruent to 1 or 5 modulo 6.

Only use machine learning.

I don’t know for certain, but I assess that the “general consensus” is/would be that machine learning techniques (neural networks, SVM, binary classifiers, clustering, Bayesian inference, etc) will be unable to crunch this problem?

What do people think?

Okay and secondly, what if we have some vector representation of the integers that carries some useful information, (unknown), are there any major in principle objections to machine learning being able to classify n as prime or composite, given we could “select the right features” so-to-speak?

Let’s ignore the trivial case where the vector contains, say, the factorization of n.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T04:19:05+00:00Added an answer on June 17, 2026 at 4:19 am

    Machine learning is not the answer of everything. Machine learning, as the name says, learns from data. The problem is that to learn something, we need a pattern in the data that we can teach the algorithm to learn.

    By definition: A prime number is a natural number greater than 1 that has no positive divisors other than 1 and itself.

    The basic difficulty here is that the sequence of primes

    2, 3, 5, 7, 11, 13, 17, 19, 23, . . .

    behaves “unpredictably” or “randomly”, we do not have a (useful) exact formula for the nth prime number !

    Even if you try to train an algorithm you will have something that will approximate a solution.
    You can’t choose features good enough to predict the solution.

    Let’s say, the hard way is to train your model with these features:

    • Any number ending with an even number (except 2) is not a prime number.
    • Any number which all digits added equals 3, 6, 9 or its divisors is not a prime number.
    • Any number ending with a 5 is not a prime number. (except 5)
    • Any number with the same digits is not prime number. (unless ends with 1)

    You end up with all prime numbers end with 1, 3, 7 or 9 but not all are prime numbers.

    So there is no need to find an algorithm that will approximate something when we want an exact solution and when there is already an exact way to compute it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

EDIT 07/14 As Bill Burgess mentionned in a comment of his answer, this question
EDIT : It turned out that this can only be done through an external
EDIT: Simple version of the question: I want to create server variables in the
EDIT:This did it: SELECT DISTINCT profileid FROM profilesrelevation WHERE profileid NOT IN ( SELECT
EDIT: for those who come here with a similar problem, now i know this
--EDIT-- I believe this is a valid question that may have multiple answers (as
Edit 08/01/2014 As of this edit time I realised that the subject property db.UserProperty()
EDIT: IS there any pre-built libraries to do this for me, that either uses
edit: change of question if my code is like this: <form name=login action=https://login.extremebb.net/login method=post
Edit a few years on: this was clearly a terrible approach, at the start

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.