# Number Of Prime factor (N.O.P.) Week 1

First week of Number of Prime factor (N.O.P.) will be started from 26 July, 2020 .

But before that some important things to be mentioned for those who will be participating :

• The task of each participant will be announced through a new notice on the day itself (i.e. 26 July, 2020)

• Each and every participant kindly try to submit the input and the output both before the end of the week (i.e 2 August, 2020)

• The program will be there on that notice itself with the value of variable $k,l$ and $m$ separately for each participants. It will be shown on a table like this one below :

 NAME Value of $k$ Value of $l$ Value of $m$ XYZ 123 123 123 XYZ 123 123 123 XYZ 123 123 123
• All participants can send their results on any day throughout the week.

• Any one can join for this week till coming Sunday. After that names of participants for the next week will be registered.

Note :

• Special request to Páll Márton to share the code (input) of this

• Any suggestion can be made here.

• If you have any doubt related to this then clear it here quickly!

• Name of participants for week 1 is given below in the comments.

• If you want to participate then give your name in the comments

• See On Most common number of prime factor! for more information

Note by Zakir Husain
2 weeks, 4 days ago

This discussion board is a place to discuss our Daily Challenges and the math and science related to those challenges. Explanations are more than just a solution — they should explain the steps and thinking strategies that you used to obtain the solution. Comments should further the discussion of math and science.

When posting on Brilliant:

• Use the emojis to react to an explanation, whether you're congratulating a job well done , or just really confused .
• Ask specific questions about the challenge or the steps in somebody's explanation. Well-posed questions can add a lot to the discussion, but posting "I don't understand!" doesn't help anyone.
• Try to contribute something new to the discussion, whether it is an extension, generalization or other idea related to the challenge.

MarkdownAppears as
*italics* or _italics_ italics
**bold** or __bold__ bold
- bulleted- list
• bulleted
• list
1. numbered2. list
1. numbered
2. list
Note: you must add a full line of space before and after lists for them to show up correctly
paragraph 1paragraph 2

paragraph 1

paragraph 2

[example link](https://brilliant.org)example link
> This is a quote
This is a quote
    # I indented these lines
# 4 spaces, and now they show
# up as a code block.

print "hello world"
# I indented these lines
# 4 spaces, and now they show
# up as a code block.

print "hello world"
MathAppears as
Remember to wrap math in $$ ... $$ or $ ... $ to ensure proper formatting.
2 \times 3 $2 \times 3$
2^{34} $2^{34}$
a_{i-1} $a_{i-1}$
\frac{2}{3} $\frac{2}{3}$
\sqrt{2} $\sqrt{2}$
\sum_{i=1}^3 $\sum_{i=1}^3$
\sin \theta $\sin \theta$
\boxed{123} $\boxed{123}$

Sort by:

Participants of week 1:

- 2 weeks, 4 days ago

Sir, please remove my name. I have even downloaded the software, but I got a lot of assignments from school in this week. Maybe the online test will also be held soon. So, I need to complete my backlog, otherwise I will be left behind. Sorry that I could not participate, but I will help if you mention me for some small things, which won't take much time.

- 2 weeks, 4 days ago

Ok, I'll try to give you small ranges so that the task of yours can be completed faster. It will take less than 5 minutes. If still wanted to remove then you can ask for it again.

- 2 weeks, 4 days ago

Is there any specific time, or I can do it anytime when I open my device?

- 2 weeks, 4 days ago

Also you have the whole week for the task you can do it whenever you want

- 2 weeks, 4 days ago

Oh, then I will surely do it! Please don't remove me, then!

- 2 weeks, 4 days ago

- 2 weeks, 4 days ago

  1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 #include #include using namespace std; typedef long long int longint; vector first; vector second; vector solution; const longint minimum=2; longint maximum=1000000; int main() { first.resize(maximum+1,0); second.resize(maximum+1,0); for(int a=minimum;a<=maximum;a++){ if(second[a]==-1) continue; for(int b=a;b<=maximum;b+=a){ first[b]++; second[b]=(second[b]==-1)?-1:(second[b]==0)?a:(a%second[b]==0)?second[b]:-1; } } for(int a=minimum;a<=maximum;a++){ if(first[a]>=solution.size()) solution.resize(first[a]+1,0); solution[first[a]]++; } for(int a=1;a

- 2 weeks, 4 days ago

thanks!

- 2 weeks, 4 days ago

You are welcome! I like the programming. If you have other interesting problems, then please share them :)

- 2 weeks, 4 days ago

I can’t run it on mobile since I don’t want to fry the CPU :( and I don’t have access to my computer recently

- 2 weeks, 3 days ago

will you have your computer till $2_{nd}$ August,2020?

- 2 weeks, 3 days ago

I guess I’ll have it in a week :)

- 2 weeks, 3 days ago

I’ll compute sizes with time less than 20 secs theoretically (as my computer would take minutes) :D

- 2 weeks, 3 days ago

BTW I think we can't use my code in intervalls. I think you should write a program, which print you the prime numbers(in my program in the second vector you can see they have only one factor),then you upload it, after than the people download it, save into a txt, and after that you should write another program which read the txt files and fills the vectors in the given intervalls like my code(if you know the prime numbers, then the second vector us unnecessary). Don't forget the powers(I don't know how to translate it, so I used the name of the c++ function) :) If you have any questions, then I will answer them, when I can. Can you write how will you solve that? I think if you upload your codes, examples etc. then more people will join.

- 2 weeks, 3 days ago

I know that, I will mention the code in the notice (on 26 July) there the code will be written so that every one can copy and paste @Siddharth Chakravarty

- 2 weeks, 3 days ago

@Zakir Husain could you paste the code what you want us to run in the program, rather than we typing and looking from the image what you have posted, so that we can copy easily and there are no errors.

- 2 weeks, 3 days ago

$\Large{An\space important\space announcement\space :\space I've\space eliminated\space variable\space ''k''\space,\space so\space in\space the\space table\space tomorrow\space variable\space k\space will\space not\space be\space there.\space The\space code\space will\space be\space provided\space with\space the\space variables\space (only\space ''l''\space and\space ''m'')\space and\space there\space values.}$

Note :

What I've done is that I've wrote the variable $k$ in terms of variable $m$, because I some how figured out that it depends on the value of $''m''$, so i just removed it from the program which will be sent tomorrow, or you can ask if you want it now. But the list of the variable will not be sent today (as it is being prepared)

- 1 week, 6 days ago

Send it now @Zakir Husain

- 1 week, 6 days ago

  1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 from math import * l=#type l here (value given to you) m=#type m here (value given to you) def primefact(x): if x==1:return [] if x%2==0:return [2]+primefact(x/2) if x%3==0:return [3]+primefact(x/3) for a in range(1,int(((x+1)**0.5)/6+1)+1): if x %(6*a-1)==0: return [6*a-1]+primefact(int(x/(6*a-1))) if x %(6*a+1)==0: return [6*a+1]+primefact(int(x/(6*a+1))) return [x] for b in range(0,1+int(log(m,2))): c=str(b) a="a"+c globals()[a]=[] for a in range(l,m): if a%(10**5)==0:print(a) eval("a"+str(len(primefact(a)))+".append("+str(a)+")") 

- 1 week, 6 days ago

Use three  symbols, give the name of the programming language, line break, code, line break, again the three symbols.

- 1 week, 6 days ago

Didn't understood well...

- 1 week, 6 days ago

 1 print "I don't know what" 

- 1 week, 6 days ago

Please provide the latex you wrote, not the result.

- 1 week, 6 days ago

Only at the end of the whole code write the second three symbols

- 1 week, 6 days ago

  1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 from math import * l=#type l here (value given to you) m=#type m here (value given to you) def primefact(x): if x==1:return [] if x%2==0:return [2]+primefact(x/2) if x%3==0:return [3]+primefact(x/3) for a in range(1,int(((x+1)**0.5)/6+1)+1): if x %(6*a-1)==0: return [6*a-1]+primefact(int(x/(6*a-1))) if x %(6*a+1)==0: return [6*a+1]+primefact(int(x/(6*a+1))) return [x] for b in range(0,1+int(log(m,2))): c=str(b) a="a"+c globals()[a]=[] for a in range(l,m): if a%(10**5)==0:print(a) eval("a"+str(len(primefact(a)))+".append("+str(a)+")") 

- 1 week, 6 days ago

How you did that???

- 1 week, 6 days ago

Python from math import * l=#type l here (value given to you) m=#type m here (value given to you) def primefact(x): if x==1:return [] if x%2==0:return [2]+primefact(x/2) if x%3==0:return [3]+primefact(x/3) for a in range(1,int(((x+1)**0.5)/6+1)+1): if x %(6*a-1)==0: return [6*a-1]+primefact(int(x/(6*a-1))) if x %(6*a+1)==0: return [6*a+1]+primefact(int(x/(6*a+1))) return [x] for b in range(0,1+int(log(m,2))): c=str(b) a="a"+c globals()[a]=[] for a in range(l,m): if a%(10**5)==0:print(a) eval("a"+str(len(primefact(a)))+".append("+str(a)+")") 

- 1 week, 6 days ago

 Python
<whole code>
`

- 1 week, 6 days ago

- 1 week, 6 days ago

Finally, done!!

- 1 week, 6 days ago

It's working :) (with 2-10)

- 1 week, 6 days ago

What did you mean by ''(with 2-10)''

- 1 week, 6 days ago

from 2 to 10

- 1 week, 6 days ago

What 2 to 10

- 1 week, 6 days ago

I don't understand. It's working in the [2;10] interval

- 1 week, 6 days ago

(Did you mean this)- You didn't understood what I am doing from line 2 to line 10 in my program???

- 1 week, 6 days ago

No. I tested the program.

- 1 week, 6 days ago

Wait, wait. Write what you want to say, I'm not understanding. Kindly explain

- 1 week, 6 days ago

I pasted your program into a python file, saved, ran it with l=2 and m=10 and I got the right numbers

- 1 week, 6 days ago

Ok, so you tested my program

- 1 week, 6 days ago

Yeah.

- 1 week, 6 days ago

Although I've send it here, it will be written separately in another note also (tomorrow).

- 1 week, 6 days ago