mersenneforum.org  

Go Back   mersenneforum.org > New To GIMPS? Start Here! > Homework Help

Reply
 
Thread Tools
Old 2021-12-06, 10:05   #1
dimas
 
Dec 2021

18 Posts
Question 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
dimas is offline   Reply With Quote
Old 2021-12-06, 11:21   #2
paulunderwood
 
paulunderwood's Avatar
 
Sep 2002
Database er0rr

425210 Posts
Default

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
paulunderwood is offline   Reply With Quote
Old 2021-12-06, 17:07   #3
xilman
Bamboozled!
 
xilman's Avatar
 
"๐’‰บ๐’ŒŒ๐’‡ท๐’†ท๐’€ญ"
May 2003
Down not across

2·5,711 Posts
Default

Quote:
Originally Posted by Dr Sardonicus View Post
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
xilman is offline   Reply With Quote
Old 2021-12-06, 18:08   #4
Batalov
 
Batalov's Avatar
 
"Serge"
Mar 2008
Phi(4,2^7658614+1)/2

232558 Posts
Thumbs down

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.
Batalov is offline   Reply With Quote
Old 2021-12-06, 18:31   #5
paulunderwood
 
paulunderwood's Avatar
 
Sep 2002
Database er0rr

22×1,063 Posts
Thumbs down

Quote:
Originally Posted by Batalov View Post
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.
paulunderwood is offline   Reply With Quote
Old 2021-12-06, 18:34   #6
chalsall
If I May
 
chalsall's Avatar
 
"Chris Halsall"
Sep 2002
Barbados

295016 Posts
Default

Quote:
Originally Posted by Batalov View Post
S/he
"They" also works (at least, in English)...
chalsall is offline   Reply With Quote
Old 2021-12-06, 19:29   #7
Batalov
 
Batalov's Avatar
 
"Serge"
Mar 2008
Phi(4,2^7658614+1)/2

100110101011012 Posts
Wink

One shall be ashamed of credit that they didn't deserve.
Batalov is offline   Reply With Quote
Old 2021-12-06, 20:09   #8
EdH
 
EdH's Avatar
 
"Ed Hall"
Dec 2009
Adirondack Mtns

7·11·61 Posts
Default

Quote:
Originally Posted by Batalov View Post
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.
EdH is offline   Reply With Quote
Old 2021-12-07, 01:23   #9
Batalov
 
Batalov's Avatar
 
"Serge"
Mar 2008
Phi(4,2^7658614+1)/2

9,901 Posts
Default

Quote:
Originally Posted by EdH View Post
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?"
Batalov is offline   Reply With Quote
Old 2021-12-07, 03:14   #10
EdH
 
EdH's Avatar
 
"Ed Hall"
Dec 2009
Adirondack Mtns

7·11·61 Posts
Default

Quote:
Originally Posted by Batalov View Post
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. . .
EdH is offline   Reply With Quote
Old 2021-12-07, 04:07   #11
Batalov
 
Batalov's Avatar
 
"Serge"
Mar 2008
Phi(4,2^7658614+1)/2

100110101011012 Posts
Default

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

Thread Tools


Similar Threads
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

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

Powered by vBulletin® Version 3.8.11
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.

โ‰  ยฑ โˆ“ รท ร— ยท โˆ’ โˆš โ€ฐ โŠ— โŠ• โŠ– โŠ˜ โŠ™ โ‰ค โ‰ฅ โ‰ฆ โ‰ง โ‰จ โ‰ฉ โ‰บ โ‰ป โ‰ผ โ‰ฝ โŠ โŠ โŠ‘ โŠ’ ยฒ ยณ ยฐ
โˆ  โˆŸ ยฐ โ‰… ~ โ€– โŸ‚ โซ›
โ‰ก โ‰œ โ‰ˆ โˆ โˆž โ‰ช โ‰ซ โŒŠโŒ‹ โŒˆโŒ‰ โˆ˜ โˆ โˆ โˆ‘ โˆง โˆจ โˆฉ โˆช โจ€ โŠ• โŠ— ๐–• ๐–– ๐–— โŠฒ โŠณ
โˆ… โˆ– โˆ โ†ฆ โ†ฃ โˆฉ โˆช โŠ† โŠ‚ โŠ„ โŠŠ โŠ‡ โŠƒ โŠ… โŠ‹ โŠ– โˆˆ โˆ‰ โˆ‹ โˆŒ โ„• โ„ค โ„š โ„ โ„‚ โ„ต โ„ถ โ„ท โ„ธ ๐“Ÿ
ยฌ โˆจ โˆง โŠ• โ†’ โ† โ‡’ โ‡ โ‡” โˆ€ โˆƒ โˆ„ โˆด โˆต โŠค โŠฅ โŠข โŠจ โซค โŠฃ โ€ฆ โ‹ฏ โ‹ฎ โ‹ฐ โ‹ฑ
โˆซ โˆฌ โˆญ โˆฎ โˆฏ โˆฐ โˆ‡ โˆ† ฮด โˆ‚ โ„ฑ โ„’ โ„“
๐›ข๐›ผ ๐›ฃ๐›ฝ ๐›ค๐›พ ๐›ฅ๐›ฟ ๐›ฆ๐œ€๐œ– ๐›ง๐œ ๐›จ๐œ‚ ๐›ฉ๐œƒ๐œ— ๐›ช๐œ„ ๐›ซ๐œ… ๐›ฌ๐œ† ๐›ญ๐œ‡ ๐›ฎ๐œˆ ๐›ฏ๐œ‰ ๐›ฐ๐œŠ ๐›ฑ๐œ‹ ๐›ฒ๐œŒ ๐›ด๐œŽ๐œ ๐›ต๐œ ๐›ถ๐œ ๐›ท๐œ™๐œ‘ ๐›ธ๐œ’ ๐›น๐œ“ ๐›บ๐œ”