Twins(n)

Version 1.0.0.0 (181 Bytes) by Jesse Crotts
Gives a vector of twin primes up to "n"
41 Downloads
Updated 30 Oct 2016

View License

This code uses the prime function and finds its intersection with itself plus 2. Then it removes 2,3 as being twin primes.

Cite As

Jesse Crotts (2026). Twins(n) (https://se.mathworks.com/matlabcentral/fileexchange/60007-twins-n), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2015b
Compatible with any release
Platform Compatibility
Windows macOS Linux
Categories
Find more on Discrete Math in Help Center and MATLAB Answers
Version Published Release Notes
1.0.0.0