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 12 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 10000011010102 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

11,369 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 27·7·11 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

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.

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

"Chris Halsall"
Sep 2002

2×11×479 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 232008 Posts One shall be ashamed of credit that they didn't deserve.
2021-12-06, 20:09   #8
EdH

"Ed Hall"
Dec 2009

2×3×13×59 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

27·7·11 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

460210 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

27·7·11 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:48.

Tue Jun 28 09:48:33 UTC 2022 up 75 days, 7:49, 1 user, load averages: 0.86, 0.82, 0.87