I propose much more simplier "matrix sieve" algorithm for finding prime numbers: In order to find all primes (up to a given limit) in the sequence S1(p)=6p+5,(p=0,1,2,3,...): Step 1a. Starting from 5 cross out each 5th member of the row of positive integersN(n)=0,1,2,3,4..., i.e remove the following integers: 5, 10, 15,... Step 1b. Starting from 5 cross out each 7th member of the row of positive integers, i.e remove the following integers: 5, 12, 19,.. Step 2a.Starting from 23 cross out each 11th member of the row of positive integers, i.e remove the following integers: 23, 34, 45,... Step 2b. .Starting from 23 cross out each 13th member of the row of positive integers, i.e remove the following integers 23, 36, 49,... ......... Step ia. Starting from (6i^2−1) cross out each (6i−1)th member of the row of positive integers. Step ib. Starting from (6i^2−1) cross out each (6i+1)th member of the row of positive integers. Remaining members of N(n) are indexes p of all primes (up to a given limit) in the sequence S1(p)=6p+5: p=0,1,2,3,4,...,6,7,8,9,...,11,..,13,14,....,16.....p=and primes are 5,11,17,23,29,...,41,47,53,59,...,71,...,83,89,... In order to find all (up to a given limit) primes in the sequence S2(p)=6p+7,(p=0,1,2,3,...): Step 1a. Starting from 3 cross out each 5th member of the row of positive integers, i.e remove the following integers 3,8,13,... Step 1b. .Starting from 7 cross out each 7th member of the row of positive integers, i.e remove the following integers 7,14,21,... Step 2a.Starting from 19 cross out each 11th member of the row of positive integers, i.e remove the following integers 19,30,41,... Step 2b. .Starting from 27 cross out each 13th member of the row of positive integer, i.e remove the following integers 27,40,53,... ......... Step ia.Starting from (6i^2−1−2i) cross out each (6i−1)th member of the row of positive integers. Step ib.Starting from (6i^2−1+2i) cross out each (6i+1)th member of the row of positive integers. Remaining members of N(n) are indexes p of all primes (up to a given limit) in the sequence S2(p)=6p+7: p=0,1,2,..,4,5,6,..,9,10,11,12,...,15,16.... and primes are7,13,19,...,31,37,43,...,61,67,73,79,...,97,103,... C++ program: www.planet-source-code.com/vb/scripts/BrowseCategoryOrSearchResults.asp?lngWId=3&blnAuthorSearch=TRUE&lngAuthorId=21687209&strAuthorName=Boris%20Sklyar&txtMaxNumberOfEntriesPerPage=25
when i saw this video on youtube then I though who will waste 15 minutes because I already know the program of the prime no. but when i watched this video Now I am able to make the same program with optimized way. Thank You Sir.
Tnks sir muje ajj hi apka Chanel mila h jisko dekh kr muje c Easy lgi phli war tnq ❤️ sir ji please esi hi hmare lie video bnate rhy tnq ❤️ u sir tnq ❤️ alote ❤️
sir my name is fakhra ma just ap ke he video dakti ho muga bht zada pasnd ha ap ka lecture ap bht bht acha teach karta ha ma cs ke student ho or ma chati ho k mari programing bht ache ho or muga apke bht ache sumg ati ha
Sir it is so amazing Wonderful sir Thankyou so much for your forever good teaching I think you are the best teacher in the RUclips for solving and understanding c
I always read your all videos because of you explain about all things very well and I want to learn full package of .Net. So I am requested you to make video about .Net. Thank in Advance!!
Sir, Thank you sir for your great solution of prime number. Recent when i am going run a program called prime factorialization or called prime factors... i couldn't found the correct answer. it will be very helpful for me if you make us understand the algorithm and program also Thank you again Ahammed Imtiaze
You are very good Sir. I got obvious understanding of what you have expalined. And its a great prestige to have you as you are explaining in my mother tougue.
Thank you too much sir..Your videos are so helpful to me..I have a problem to print prime, factors of a number,Armstrong number ..You make a video tutorial about that I'll be highly obliged to you...
Very nice explanation..But I have one doubt like if you will divide 11 by 2 then you will get remainder also.so why we are considering its remainder and why we are checking it till 5..like you said we will chek it by 2,3,4..till 5..thanks..
sir ur videos r very nice ....thank u soooo much ...its very helpful ....my teacher teaches same thing but i cant stand but i understood when u taught ....thant u sooooo much sir ...ur a great teacher
sir i want learn programming but i'm not choose technology in difference technology plz u tell me deference between .net technology and java . who is best technology
Thnq so much sir 4 ur vdos. I cleared my O level exam of C language bcz of u...
Hiiii
@@basitulislam2134 idar love jihad nahi chalega chutiye
seriously
@@basitulislam2134 chitiya.. Getout( )
I propose much more simplier "matrix sieve" algorithm for finding prime numbers:
In order to find all primes (up to a given limit) in the sequence S1(p)=6p+5,(p=0,1,2,3,...):
Step 1a. Starting from 5 cross out each 5th member of the row of positive integersN(n)=0,1,2,3,4..., i.e remove the following integers: 5, 10, 15,...
Step 1b. Starting from 5 cross out each 7th member of the row of positive integers, i.e remove the following integers: 5, 12, 19,..
Step 2a.Starting from 23 cross out each 11th member of the row of positive integers, i.e remove the following integers: 23, 34, 45,...
Step 2b. .Starting from 23 cross out each 13th member of the row of positive integers, i.e remove the following integers 23, 36, 49,...
.........
Step ia. Starting from (6i^2−1) cross out each (6i−1)th member of the row of positive integers.
Step ib. Starting from (6i^2−1) cross out each (6i+1)th member of the row of positive integers.
Remaining members of N(n) are indexes p of all primes (up to a given limit) in the sequence S1(p)=6p+5: p=0,1,2,3,4,...,6,7,8,9,...,11,..,13,14,....,16.....p=and primes are 5,11,17,23,29,...,41,47,53,59,...,71,...,83,89,...
In order to find all (up to a given limit) primes in the sequence S2(p)=6p+7,(p=0,1,2,3,...):
Step 1a. Starting from 3 cross out each 5th member of the row of positive integers, i.e remove the following integers 3,8,13,...
Step 1b. .Starting from 7 cross out each 7th member of the row of positive integers, i.e remove the following integers 7,14,21,...
Step 2a.Starting from 19 cross out each 11th member of the row of positive integers, i.e remove the following integers 19,30,41,...
Step 2b. .Starting from 27 cross out each 13th member of the row of positive integer, i.e remove the following integers 27,40,53,...
.........
Step ia.Starting from (6i^2−1−2i) cross out each (6i−1)th member of the row of positive integers.
Step ib.Starting from (6i^2−1+2i) cross out each (6i+1)th member of the row of positive integers.
Remaining members of N(n) are indexes p of all primes (up to a given limit) in the sequence S2(p)=6p+7: p=0,1,2,..,4,5,6,..,9,10,11,12,...,15,16.... and primes are7,13,19,...,31,37,43,...,61,67,73,79,...,97,103,...
C++ program:
www.planet-source-code.com/vb/scripts/BrowseCategoryOrSearchResults.asp?lngWId=3&blnAuthorSearch=TRUE&lngAuthorId=21687209&strAuthorName=Boris%20Sklyar&txtMaxNumberOfEntriesPerPage=25
Sir aaap bhot badia padhate ho , most simplified programming channel on RUclips
when i saw this video on youtube then I though who will waste 15 minutes because I already know the program of the prime no. but when i watched this video Now I am able to make the same program with optimized way.
Thank You Sir.
I'm very HAPPY to know this brother. Keep learning :)
Tnks sir muje ajj hi apka Chanel mila h jisko dekh kr muje c Easy lgi phli war tnq ❤️ sir ji please esi hi hmare lie video bnate rhy tnq ❤️ u sir tnq ❤️ alote ❤️
Sir aapki video like krne k baad hi start krta hu,,,,obviously video would be excellent.
You are the best....teacher for programing
A.O.A sir you are very sweet teacher I am very happy to see your lectures and learns large data related of C language & C++ language thanks 💓 a lot..
sir my name is fakhra ma just ap ke he video dakti ho muga bht zada pasnd ha ap ka lecture ap bht bht acha teach karta ha ma cs ke student ho or ma chati ho k mari programing bht ache ho or muga apke bht ache sumg ati ha
I can understand your video easily .
Thank you for teaching us.
Yep
Thanks, apke video se sare concept clear ho jate hai sir i like it
Proper reasoning for each step this is what conceptual analysis thanx for your great support sir
You're welcome brother. Keep learning :)
You are also a best teacher of programming.
I also learn more point to your video.
i don't know how to thanks you sir !!
*A BIG SALUTE FROM ME* 😉👌👌👌😃🙌
Doubt ko clear karne ke liye apka bahut Shukriya sir
Sir the way u explain is fabulous, blessings for more tutorials 👍👍
You r the first teacher who make programming easy for me🙏🙏
your teaching style is totally different from other and excellent.
Sir it is so amazing
Wonderful sir
Thankyou so much for your forever good teaching
I think you are the best teacher in the RUclips for solving and understanding c
Best way of teaching
you are a best teacher I have lot of learn with you
I always read your all videos because of you explain about all things very well and I want to learn full package of .Net. So I am requested you to make video about .Net.
Thank in Advance!!
bht AXA lga apse pdke sir.
Sir the way u explain is fabulous
Thakuu so much sir ... 💖🤩🤩🤩🤩I have learned oop , pf from uh thankuuu so much .God bless uh
thank u sir.your videos are awsm .Helped me to learn alot and also removed my fear about coding !!
Thank you for the video sir, can you also please make a video explaining prime number checking with recursion in C
Thanks you sir for making this video 🙏
Thank you sir I am completely clear about this prime number 🥰🥰🥰🥰
Very nice sir you are great God bless you.
Programming Baadshah ho aap, bahot dhanyawaad Sir ji!! __/\__
Sir you are best teacher of cimputer
Thankyou so much sir ! I have seen many videos on utube for this ...and I have also seen -smart programming-..but I love this wayy...thnku
Best sir
Zindagi badal di apni sir
Love you
That's your modestly brother. Keep learning GOD BLESS YOU 😊
awesome pandey g.i have become fan of you
thanks sir ji ,I have learn alot,Which i could not got in class.
+sundeep chaurasiya, You're welcome dear, keep learning :)
Nice explanation 👍👍😉👌👍
Sir aapne bahut achchhe se explain kiya very helpful thank you sir
sir aapka videos hame bahut madat karta h
Thank you soooo much. It really works. I'm from Pakistan.
Thanks sir !!! can we use else instead of goto label???
Yes you can.
@@easytuts4youcom nope
@@nandonongmeikapam5646 you can.
Thankyou! you are doing good job.
Sir,
Thank you sir for your great solution of prime number. Recent when i am going run a program called prime factorialization or called prime factors... i couldn't found the correct answer. it will be very helpful for me if you make us understand the algorithm and program also
Thank you again
Ahammed Imtiaze
Really helpful thanku brother👍
Great explanation sir........
goto end is very new for me. I understood sir. Thankyou!!!!
Thank you sir 😊 for teaching
Oooo
You are very good Sir. I got obvious understanding of what you have expalined. And its a great prestige to have you as you are explaining in my mother tougue.
Thank you so much for your kind words. Keep learning. GOD BLESS YOU :)
yes।।।i agree with ur complament।
Deepti Joshi hii
good
Deepti Joshi hey try this code ..if(no%2==0)
if u have other basic knowledge.
Sir bahut achha tutorial h
Do no%2 and compare with sqrt (n0) and increase i until sqrt no then it is prime no if i>s then it is prime no
Many many thanks to u sir🙏☺️☺️
you are very good Sir.
Very helpful sir 👍
Best teacher 🤗😊
Sir apka method bhut easy h👌👌👌👌👌👌👌👌😍😍
your tutorial is realy useful thans for making this tutorials.
very clear description ...thank you sir ....
Thanks for very good videos
Thank you sir my confusion and question are solved really thank u and I subscribed and liked the video again thank you
You're welcome brother. Keep learning :)
Brilliantly explained..thank you so much for making videos..and please keep making it... thanks once again..
Very very thank full video sir
Thank you too much sir..Your videos are so helpful to me..I have a problem to print prime, factors of a number,Armstrong number ..You make a video tutorial about that I'll be highly obliged to you...
Sir you are best
Thanks i understand
Very nice explanation..But I have one doubt like if you will divide 11 by 2 then you will get remainder also.so why we are considering its remainder and why we are checking it till 5..like you said we will chek it by 2,3,4..till 5..thanks..
sir ur videos r very nice ....thank u soooo much ...its very helpful ....my teacher teaches same thing but i cant stand but i understood when u taught ....thant u sooooo much sir ...ur a great teacher
very nice sir. Thank you
I wish in future making lot of video in programming
To kya esme the if.. Else statement ka use kar sakte hai.......?
Best explained
Thanks sir for teaching
Sir Thank you Very Much you are doing a great job
+Real Muddasar, You're welcome dear :)
best explanation sirrrr
thanks alot
+ajay aswal, You're welcome dear :)
very good ,Sir ji
sir ya " error: label 'end' used but not defined" a raha hy main c++ use kr raha hu
You r great sir g
sir ,we can excute this program by only one statement ,
if(no%2==0)
if{
}
else
{
}
so for what this type of long program u tought us
plz reply..
thank you sir it is very useful...and clear..
+Fairoj Mohammad, You're welcome dear :)
But sir instead of using for loop we can directly divide no.. By 2 and we get answer right?
Nice 👌 ☺
sir i want learn programming but i'm not choose technology in difference technology
plz u tell me deference between .net technology and java . who is best technology
VERY GOOD SIR
Sir aap kamal ho bs mera ek doubt he aap wo please bta denge?
Sir by using hoti it is showing compilation error,
But with else it's working perfectly
very much helpful
Fabulous sir 🌹👏👏👏
Sir, mujhe ek do programming janna hai wo kaise kiya jaiye
series:- 1-3+5-7+9
And 1^1-4^4+7^7-10^10
As soon as possible
Thank u sir
go to की जगह पे break use कीजिये सर 👍👍
Can we use if else statement instead of using go to statement
yes tiku sinha u can use any variable
sir can i get a video for ,check perfect number?
Thanks sir..Great sir
thanks sir bahut accha ...😊😊
one tutorial for strong number..
please sir ur learning skilll re veryy niceee.
+Ayesha Seemab, Thanks for your comment. See this tutorial for Strong Number:
ruclips.net/video/GNh0s8HmqjA/видео.html
great explaination
Very helpful videos.thnkas sir
You're welcome brother :)
thankuuuuu vikas pandey
You're welcome dear :)
thanks sir ...... u r too good
....
Nice I like it your teach
nice job
for even and odd - #learning site
Sir, can you make videos of machine learning?
Dear Sir would you please explain that it is necessary to take ansi as variable can we use another variables like x,y,z instead of ansi.
Yeah, you can use anything...whatever you want