![]() |
![]() |
#1 |
Dec 2021
12 Posts |
![]()
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 |
![]() |
![]() |
![]() |
#2 |
Sep 2002
Database er0rr
10000011010012 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 |
![]() |
![]() |
![]() |
#3 |
Bamboozled!
"๐บ๐๐ท๐ท๐ญ"
May 2003
Down not across
11,369 Posts |
![]()
Please be careful. Hypocaffeinaemia can be dangerous and lead to serious consequences.
https://dilbert.com/strip/1998-06-07 |
![]() |
![]() |
![]() |
#4 |
"Serge"
Mar 2008
Phi(4,2^7658614+1)/2
268116 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. |
![]() |
![]() |
![]() |
#5 |
Sep 2002
Database er0rr
4,201 Posts |
![]() |
![]() |
![]() |
![]() |
#6 |
If I May
"Chris Halsall"
Sep 2002
Barbados
101001001010002 Posts |
![]() |
![]() |
![]() |
![]() |
#7 |
"Serge"
Mar 2008
Phi(4,2^7658614+1)/2
100110100000012 Posts |
![]()
One shall be ashamed of credit that they didn't deserve.
|
![]() |
![]() |
![]() |
#8 |
"Ed Hall"
Dec 2009
Adirondack Mtns
32·7·73 Posts |
![]()
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.
|
![]() |
![]() |
![]() |
#9 |
"Serge"
Mar 2008
Phi(4,2^7658614+1)/2
9,857 Posts |
![]()
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?"
|
![]() |
![]() |
![]() |
#10 |
"Ed Hall"
Dec 2009
Adirondack Mtns
32·7·73 Posts |
![]() |
![]() |
![]() |
![]() |
#11 |
"Serge"
Mar 2008
Phi(4,2^7658614+1)/2
268116 Posts |
![]() |
![]() |
![]() |
![]() |
Thread Tools | |
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to solve this equation with pari gp ... | rockzur | PARI/GP | 13 | 2020-08-16 11:02 |
How to solve: k(b^m)-z=n*d. ? | JM Montolio A | Miscellaneous Math | 18 | 2018-03-09 15:32 |
Solve for mod function | flouran | Miscellaneous Math | 23 | 2009-01-04 20:03 |
An Equation to Solve | davar55 | Puzzles | 3 | 2008-10-09 00:35 |
Solve this equation | davar55 | Puzzles | 52 | 2007-06-26 21:41 |