mersenneforum.org Help me please solve this equation with pari gp
 Register FAQ Search Today's Posts Mark Forums Read

 2021-12-06, 10:05 #1 dimas   Dec 2021 1 Posts Help me please solve this equation with pari gp find all primes not exceeding 10 ^ 8, in the ternary notation of which the number of twos is equal to the total number of zeros and ones it should be 187914
 2021-12-06, 11:21 #2 paulunderwood     Sep 2002 Database er0rr 32·443 Posts Code: c=0;forprime(p=3,10^8,V=digits(p,3);W=[0,0,0];for(v=1,#V,W[V[v]+1]++);if(W[3]==W[2]+W[1],c++));c 187914 Last fiddled with by paulunderwood on 2021-12-06 at 11:28
2021-12-06, 17:07   #3
xilman
Bamboozled!

"๐บ๐๐ท๐ท๐ญ"
May 2003
Down not across

2B8A16 Posts

Quote:
 Originally Posted by Dr Sardonicus EDIT: As my blood caffeine rose to working level.
Please be careful. Hypocaffeinaemia can be dangerous and lead to serious consequences.

https://dilbert.com/strip/1998-06-07

 2021-12-06, 18:08 #4 Batalov     "Serge" Mar 2008 Phi(4,2^7658614+1)/2 100101111000002 Posts This looks like a homework (and wrong forum), and now the homework is ruined. S/he will simply turn it in and get credit that s/he doesn't deserve.
2021-12-06, 18:31   #5
paulunderwood

Sep 2002
Database er0rr

F9316 Posts

Quote:
 Originally Posted by Batalov This looks like a homework (and wrong forum), and now the homework is ruined. S/he will simply turn it in and get credit that s/he doesn't deserve.

2021-12-06, 18:34   #6
chalsall
If I May

"Chris Halsall"
Sep 2002

3·19·179 Posts

Quote:
 Originally Posted by Batalov S/he
"They" also works (at least, in English)...

 2021-12-06, 19:29 #7 Batalov     "Serge" Mar 2008 Phi(4,2^7658614+1)/2 25E016 Posts One shall be ashamed of credit that they didn't deserve.
2021-12-06, 20:09   #8
EdH

"Ed Hall"
Dec 2009

2·11·191 Posts

Quote:
 Originally Posted by Batalov This looks like a homework (and wrong forum), and now the homework is ruined. S/he will simply turn it in and get credit that s/he doesn't deserve.
This was my first thought, but did PaulU actually give the answer wanted? The OP seemed (to me) to ask for a list of those primes, rather than a count There is still work to do on the OP's part to study how to get the listing of primes.

2021-12-07, 01:23   #9
Batalov

"Serge"
Mar 2008
Phi(4,2^7658614+1)/2

25E016 Posts

Quote:
 Originally Posted by EdH This was my first thought, but did PaulU actually give the answer wanted? The OP seemed (to me) to ask for a list of those primes, rather than a count There is still work to do on the OP's part to study how to get the listing of primes.
That's like when a college student is required to run a mile, and instead asks you to give them a lift to 10 feet from the finish line. "I will still have to run 10 feet, right?"

2021-12-07, 03:14   #10
EdH

"Ed Hall"
Dec 2009

101528 Posts

Quote:
 Originally Posted by Batalov That's like when a college student is required to run a mile, and instead asks you to give them a lift to 10 feet from the finish line. "I will still have to run 10 feet, right?"
Yeah! That's right. Your avatar is quite fitting. . .

2021-12-07, 04:07   #11
Batalov

"Serge"
Mar 2008
Phi(4,2^7658614+1)/2

25×3×101 Posts

Quote:
 Originally Posted by EdH Yeah! That's right. Your avatar is quite fitting. . .
Exactly.
But the bigger question is "which avatar?"
which of them? there is a dozen

 Similar Threads Thread Thread Starter Forum Replies Last Post rockzur PARI/GP 13 2020-08-16 11:02 JM Montolio A Miscellaneous Math 18 2018-03-09 15:32 flouran Miscellaneous Math 23 2009-01-04 20:03 davar55 Puzzles 3 2008-10-09 00:35 davar55 Puzzles 52 2007-06-26 21:41

All times are UTC. The time now is 09:26.

Fri Jan 28 09:26:27 UTC 2022 up 189 days, 3:55, 2 users, load averages: 1.22, 1.42, 1.27