Transitioning from a maths background, is it possible to find a data science job, by just being able to write my own code (kmeans, kNNs, logistic regression etc) without using any popular commercial software?
Please take my answer with a pinch of salt and is purely based on my experience in the data science industry for the last couple of years.
Coming from a maths background you should find it relatively easier to learn and implement algorithms like Logistic regression, kmeans etc etc. However, in the industry, its important to understand how you can use them for valid problems as solutions and the options to write them from scratch are much lesser as there are several scientific packages like
sklearn that already implement these algorithms quite well and have been tested by the data science community multiple times.
However, you could use your skills to contribute to these packages as they are mostly open source.
Also, data science is a vast domain and to find a job means is to understand what you really want to do with data and the domain you chose to be in.
Given your background in maths and experience with programming, the barrier to get a data science job will ideally be much thinner.
The basic answer is yes, what you're describing is possible. But the real question is should you?
I'd like to hear a little bit more about your motivations for doing this. The reality is that data science requires a passion & curiosity that most people (even smart people) just don't have. They just want the money in data science.
I read my fair share of resumes on a daily basis and the most difficult part of a resume with someone strictly with a maths background is that they don't have the business knowledge that is required. For most of us working in the field, data science is not theoretical, these algorithms actually get deployed and people work with them. More importantly, they work to solve core business issues/use cases. Most of the applied data science out there (i.e. projects that pay you) will start with a business use case.
Can you effectively stand in front of a room of executives that haven't taken a math course in decades and explain what you want to do without any formulas or any jargon that will lose the audience? Can you effectively work across multiple teams to create all the infrastructure you will need (data pipelines, storage, processing power, etc)?
From there, you also have to "sell" your solution and implementation because, since it's a use case, you may be asking a large corporation to completely shift their approach from one direction to another. Yes, you know the algorithm works. But to them, you're saying, "turn your business over to me and let this algorithm, that you can't see or touch, run your business". Spoiler alert: you're going to get a lot of executives rolling their eyes at you - it's not an easy thing to do!
So you should be asking yourself if you are an expert in a particular business domain or what are the items that you bring to the table in a business discussion? Those are the parts, and the lack of passion for data science, that will be the biggest roadblocks to making the transition.