| Bytes | Lang | Time | Link |
|---|---|---|---|
| 062 | JavaScript Node.js | 250401T001623Z | Andrew B |
| 023 | J | 230328T035353Z | south |
| 032 | R | 220826T042856Z | pajonk |
| 030 | Jelly | 230327T115618Z | Joao-3 |
| 125 | Nibbles | 230325T221215Z | xigoi |
| 016 | Pyt | 230226T133239Z | Kip the |
| nan | 230119T185307Z | The Thon | |
| 045 | Python | 220826T055413Z | Rhaixer |
| 051 | Prolog SWI | 220902T005933Z | Aiden Ch |
| 014 | MATL | 220826T052421Z | Mukundan |
| 015 | Pyth | 220826T035507Z | Mukundan |
| 032 | Wolfram Language Mathematica | 220826T174446Z | naffetS |
| 012 | Jelly | 220826T125050Z | Jonathan |
| 013 | Vyxal | 220826T002713Z | lyxal |
| 047 | Bash | 220826T114943Z | fipsbox |
| 015 | MathGolf | 220826T084103Z | Kevin Cr |
| 033 | Burlesque | 220826T083355Z | DeathInc |
| 011 | 05AB1E | 220826T082150Z | Kevin Cr |
| 021 | Charcoal | 220826T062009Z | Neil |
| 038 | Factor + math.unicode | 220826T023640Z | chunes |
| 045 | PARI/GP | 220826T021053Z | alephalp |
| 011 | Vyxal | 220826T000922Z | naffetS |
| 037 | Python 2 | 220826T000559Z | xnor |
JavaScript (Node.js), 62 bytes
console.log(8n**42n*14448825433n*(2n**31n-1n)*(2n**61n-1n)+'')
port of similar solutions to JavaScript
J, 23 bytes
echo*/(,<:)2^q:3772545x
Same solution as most answers.
echo*/(,<:)2^q:3772545x
3772545x NB. extended precision literal
q: NB. prime factors
2^ NB. raise 2 to each factor
(,<:) NB. monadic hook
<: NB. decrement
, NB. concat with hook input
*/ NB. product reduce
echo NB. print
R, 33 32 bytes
Edit -1 byte thanks to @xnor.
prod(8^42,2^c(3,5,7,19,31,61)-1)
Spells out the product.
@alephalpha's approach lead to +1 byte for me, but @Dominic van Essen found a 32-byte version (see the footer of the TIO link above).
Jelly, 30 bytes
My first Jelly answer! Hope I'll get better in the future.
2*’
[3,5,7,19,31,61]ç
¢×/æ«126
Nibbles, 16 15 12.5 bytes
`*.`D62*;^2$-$~ a8532dc3
-2.5 bytes thanks to Dominic van Essen
Nibbles has no prime-related built-ins, so I had to resort to good old base conversion.
`*.`D62*;^2$-$~ a8532dc3
`* Product
. for each n in
`D62 convert from base 62
a8532dc3 2824023491
* multiply
^2 2 to the power of
$ n
; $ with itself
- ~ minus 1
Pyt, 22 17 16 bytes
3772545ǰϼ2⇹^Đ⁻*Π
3772545 push 3, 7, 7, 2, 5, 4, 5
ǰ ǰoin elements on stack with no delimiter
ϼ get unique ϼrime factors (casts to integer)
2⇹^ raise 2 to each power
Đ⁻ Đuplicate; decrement
* element-wise multiplication
Π product of list; implicit print
Thunno, \$ 17 \log_{256}(96) \approx \$ 13.99 bytes
3772545AF2@D1-z*P
Port of Kevin Cruijssen's 05AB1E answer.
3772545AF2@D1-z*P
3772545 # Push 3772545 (there's no integer compression in Thunno)
AF # Prime factors of that ([3, 5, 7, 19, 31, 61])
2@ # 2 ** each one ([8, 32, 128, 524288, 2147483648, 2305843009213693952])
D1- # Duplicate and subtract one ([7, 31, 127, 524287, 2147483647, 2305843009213693951])
z* # Multiply ([56, 992, 16256, 274877382656, 4611686016279904256, 5316911983139663489309385231907684352])
P # Product of the list (6086555670238378989670371734243169622657830773351885970528324860512791691264)
Python, 49 46 45 bytes
Did some google calculation.
print(2**126*14448825433*(2**31-1)*(2**61-1))
Prolog (SWI), 51 bytes
Thanks JoKing and Steffan for helping me golf some bytes
?-X is(2^61-1)*14448825433*(2^31-1)*2^126,write(X).
My very first Prolog answer :D, probably can be golfed a lot though.
MATL, 21 19 18 14 bytes
3772545YfWtqhp
3772545YfWtqhp
3772545Yf # Prime factorize 3772545 (3, 5, 7, 19, 31, 61)
W # 2 ** elements
t # duplicate list
q # decrement elements in copy by 1
h # concatenate lists
p # product
-2 bytes thanks to @Luis Mendo
Pyth, 20 19 16 15 bytes
*FsmtB^2dPC"9
*FsmtB^2dPC"9
C"9 # compressed 3772545
P # prime factors (3, 5, 7, 19, 31, 61)
mtB^2d # map d: [2**d, 2**d - 1]
s # flatten
*F # reduce on multiplication
-3 bytes thanks to @CursorCoercer
-1 byte thanks to @isaacg
Jelly, 12 bytes
⁹Æs;ÆdÆṣƑƲ1#
A full program that will (eventually!) print the result.
Don't Try it online!
The ⁹ starts the search at 256, if one replaces it with 1 it'll find 12 - try that here.
Faster in 13:
“;Y,’Æf2*×’$P
Try it here.
Vyxal, 16 13 bytes
₆¨*≬K₍L∑¨=∆Kc
half-Legitimate calculation is was shorter than hard coding lol. Given enough time and memory, this would eventually output the right number.
Explained
₆¨*≬K₍L∑¨=∆Kc
₆¨*≬ c # From all multiples of 64 (which contains the target number), get the first where:
K₍L∑ # The list [len(factors), sum(factors)]
¨=∆K # Is invariant under sum of proper divisors
MathGolf, 15 bytes
357HT╟)]ó_(m*ε*
Explanation:
3 # Push 3
5 # Push 5
7 # Push 7
H # Push 19
T # Push 31
╟ # Push 60
) # Increase the 60 by 1
] # Wrap the stack into a list: [3,5,7,19,31,61]
ó # Calculate 2 to the power each of these integers
_ # Duplicate the list
( # Decrease each by 1
m* # Multiply the values at the same positions in the lists together
ε* # Product: reduce by multiplication
# (after which the entire stack joined together is output implicitly as result)
Burlesque, 33 bytes
{Jfc~]++==}s1r1f{fcsa%1!j++%1!&&}
Given infinite time, should find sublime numbers
{ # IsPerfect function
J # Duplicate
fc # Factors
~] # Without self
++ # Sum
== # Equals self
}s1 # Store as "1"
r1 # Range 1..inf
f{ # Filter
fc # Factors
sa # Non-destructive Length
%1! # IsPerfect
j++ # Sum of factors
%1! # IsPerfect
&& # And
}
05AB1E, 13 11 bytes
•w4н•foD<*P
-2 bytes thanks to @alephalpha.
Explanation:
•w4н• # Push compressed integer 3772545
f # Get its prime factors: [3,5,7,19,31,61]
o # Get 2 to the power for each of these integers
D # Duplicate the list
< # Decrease each by 1 in the copy
* # Multiply the values at the same positions in the two lists
P # Get the product of this list
# (after which the result is output implicitly)
See this 05AB1E tips of mine (section How to compress large integers?) to understand why •w4н• is 3772545.
Charcoal, 21 bytes
IΠEX²⁻E357COm℅ι⁴⁸×ι⊖ι
Try it online! Link is to verbose version of code. Explanation:
357COm Literal string `357COm`
E Map over characters
ι Current character
℅ ASCII code
⁻ Vectorised subtract
⁴⁸ Literal integer `48`
X Vectorised exponentiate with base
² Literal integer `2`
E Map over powers of `2`
ι Current power of `2`
⊖ Decremented
× Multiplied by
ι Current power of `2`
Π Take the product
I Cast to string
Implicitly print
Factor + math.unicode, 40 38 bytes
4 2 [ "=">array n^v ] bi@ v- Π .
-2 bytes from porting @alephalpha's PARI/GP answer.
Note "=" is a literal string that is equivalent to { 3 5 7 19 31 61 }. You can only see the = since the rest are non-printable, but you can see the non-printable characters on TIO. This needs to be converted to an array because n^v is buggy otherwise. Still 4 bytes shorter than the sequence literal.
4 2 [ ... ] bi@Apply[ ... ]to both 4 and 2.{ 3 5 7 19 31 61 } n^vInput raised to 3, input raised to 5, etc.v-Subtract two vectors.ΠTake the product..Print the result to stdout.
PARI/GP, 45 bytes
print(vecprod([4^i-2^i|i<-[3,5,7,19,31,61]]))
The number is \$\prod_{i\in\{3,5,7,19,31,61\}}(4^i-2^i)\$. In fact, \$126=3+5+7+19+31+61\$.
Another interesting fact is that \$2^{126}\$ is just the sum of divisors of \$\prod_{i\in\{3,5,7,19,31,61\}}(2^i-1)\$. This might be useful for some golfing language if there is a built-in for divisor sum.
Vyxal, 14 13 11 bytes
»;⟑L»ǐE:‹*Π
-1 byte thanks to alephalpha and -2 bytes thanks to Mukundan314.
Jelly, 17 16 bytes
“¤¦¬Œþ=‘2*’æ«21P
-1 byte thanks to xnor.
Python 2, 37 bytes
print~-2**31*~-2**61*14448825433<<126
Writes out \$2^{31}-1\$, \$2^{61}-1\$, and the bit-shift \$2^{126}\$, and hardcodes the remaining product.