mersenneforum.org Help me please solve this equation with pari gp
 User Name Remember Me? Password
 Register FAQ Search Today's Posts Mark Forums Read

 2021-12-06, 10:05 #1 dimas   Dec 2021 18 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 425210 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

2·5,711 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 232558 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

22×1,063 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

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

"Ed Hall"
Dec 2009

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

9,901 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

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

100110101011012 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 05:08.

Thu Aug 11 05:08:54 UTC 2022 up 34 days, 23:56, 2 users, load averages: 1.47, 1.23, 1.35

Copyright ©2000 - 2022, Jelsoft Enterprises Ltd.

This forum has received and complied with 0 (zero) government requests for information.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.
A copy of the license is included in the FAQ.

โ  ยฑ โ รท ร ยท โ โ โฐ โ โ โ โ โ โค โฅ โฆ โง โจ โฉ โบ โป โผ โฝ โ โ โ โ ยฒ ยณ ยฐ
โ  โ ยฐ โ ~ โ โ โซ
โก โ โ โ โ โช โซ โโ โโ โ โ โ โ โง โจ โฉ โช โจ โ โ ๐ ๐ ๐ โฒ โณ
โ โ โ โฆ โฃ โฉ โช โ โ โ โ โ โ โ โ โ โ โ โ โ โ โค โ โ โ โต โถ โท โธ ๐
ยฌ โจ โง โ โ โ โ โ โ โ โ โ โด โต โค โฅ โข โจ โซค โฃ โฆ โฏ โฎ โฐ โฑ
โซ โฌ โญ โฎ โฏ โฐ โ โ ฮด โ โฑ โ โ
๐ข๐ผ ๐ฃ๐ฝ ๐ค๐พ ๐ฅ๐ฟ ๐ฆ๐๐ ๐ง๐ ๐จ๐ ๐ฉ๐๐ ๐ช๐ ๐ซ๐ ๐ฌ๐ ๐ญ๐ ๐ฎ๐ ๐ฏ๐ ๐ฐ๐ ๐ฑ๐ ๐ฒ๐ ๐ด๐๐ ๐ต๐ ๐ถ๐ ๐ท๐๐ ๐ธ๐ ๐น๐ ๐บ๐