## Search found 867 matches

- Thu Mar 01, 2018 10:41 pm UTC
- Forum: The Help Desk
- Topic: PyPI [resolved]
- Replies:
**8** - Views:
**2244**

### Re: PyPI

OK. Well, labmath is now up and functioning as intended and is shamelessly self-promoted in my signature, so thank you all for your help.

- Thu Mar 01, 2018 10:31 pm UTC
- Forum: The Help Desk
- Topic: PyPI [resolved]
- Replies:
**8** - Views:
**2244**

### Re: PyPI

... huh. That seems a bit weird. Is there a way to do things so that I don't have to have that line in my __init__.py, or even not have the __init__.py at all?

- Thu Mar 01, 2018 8:33 pm UTC
- Forum: The Help Desk
- Topic: PyPI [resolved]
- Replies:
**8** - Views:
**2244**

### Re: PyPI

Code: Select all

`>>> import labmath`

>>> dir(labmath)

['__builtins__', '__cached__', '__doc__', '__file__', '__loader__', '__name__', '__package__', '__path__', '__spec__']

- Thu Mar 01, 2018 6:22 pm UTC
- Forum: The Help Desk
- Topic: PyPI [resolved]
- Replies:
**8** - Views:
**2244**

### PyPI [resolved]

I made myself a library of math functions in Python3. It works perfectly if I put it in the working directory; I can then import and use the functions and everything's all nice and smooth. This is a bit annoying, however, since I need to keep copying it everywhere on my machine and onto other machin...

- Thu Jan 11, 2018 6:17 pm UTC
- Forum: Mathematics
- Topic: Lenstra's algorithm for divisors in residue classes
- Replies:
**2** - Views:
**1075**

### Lenstra's algorithm for divisors in residue classes

I'm attempting to implement Lenstra's algorithm for finding divisors in residue classes as described as Algorithm 9.1.29 in Cohen's A Course in Computational Algebraic Number Theory (also available here in PDF form). My initial translation of the description into Python-with-goto is as follows: def ...

- Thu May 18, 2017 8:48 am UTC
- Forum: Mathematics
- Topic: Unit Spheres in a Pile
- Replies:
**5** - Views:
**2481**

### Re: Unit Spheres in a Pile

Gauss only proved that for lattices. The full theorem was only resolved in 1998.

- Wed Apr 12, 2017 5:52 am UTC
- Forum: The Help Desk
- Topic: Issues with opengl / webgl on Ubuntu 16.04 MATE
- Replies:
**1** - Views:
**2795**

### Issues with opengl / webgl on Ubuntu 16.04 MATE

System info: ⋅ Ubuntu 16.04.2 LTS (Xenial) 64-bit ⋅ Kernel 4.4.0-47-generic x86_64 ⋅ MATE 1.12.1 ⋅ Intel i7-6700K ⋅ 64 GB RAM ⋅ GeForce GT 730 ⋅ NVIDIA binary driver version 375.39 Some time ago (a few weeks to a couple mon...

- Sat Apr 01, 2017 7:31 pm UTC
- Forum: Mathematics
- Topic: Odd cubic perfect numbers divisible by 5
- Replies:
**0** - Views:
**3392**

### Odd cubic perfect numbers divisible by 5

Have they been shown to be nonexistent? I know that the existence of odd perfect numbers is an open question, and I also know that so many constraints have been derived on them that they probably don't exist, but I'm presently concerned only with those that are also cubes and multiples of 5. This ar...

- Sun Oct 23, 2016 9:51 am UTC
- Forum: Coding
- Topic: Where to find interview-style coding problems?
- Replies:
**8** - Views:
**4425**

### Re: Where to find interview-style coding problems?

Programming Praxis posts interview questions every now and then.

- Tue Oct 04, 2016 4:36 am UTC
- Forum: Science
- Topic: Ideal lenses
- Replies:
**0** - Views:
**4595**

### Ideal lenses

TL;DR: What is the shape of the ideal planoconvex lens? More precise formulation, and my work so far: A lens sits in the xy plane. The lens has index of refraction n 2 and the rest of the plane has index of refraction n 1 . The lens is bounded below by the x axis and above by a function f ( x ). Le...

- Mon Oct 03, 2016 2:04 pm UTC
- Forum: Mathematics
- Topic: Factorization using modular arithmetic
- Replies:
**41** - Views:
**9029**

### Re: Factorization using modular arithmetic

Solving quadratic equations modulo composites is indeed easy when the modulus is small, but when the modulus is large, the best methods we know of involve actually factoring the modulus. So unless you have a fast way to solve modular quadratics that doesn't involve factoring, this isn't going anywhe...

- Thu Sep 08, 2016 3:52 am UTC
- Forum: Mathematics
- Topic: What's your favourite irrational number?
- Replies:
**78** - Views:
**20283**

### Re: What's your favourite irrational number?

Eebster the Great wrote:What about the number x defined such that 0 < x < 1 and the i^{th}digit of x is the i^{th}element of 0^{†}(mod 10), ordered lexicographically, where 0^{†}is zero dagger?

The problem with that is that it might not exist.

- Wed Aug 31, 2016 11:00 am UTC
- Forum: Science
- Topic: What is the largest possible artificial lake we could make today?
- Replies:
**16** - Views:
**3553**

### Re: What is the largest possible artificial lake we could make today?

We can avoid the issues presented by dams by simply flooding a pre-existing endorheic basin. In fact, we've already done this by accidentally creating the Salton Sea . The Salton Sea is currently 73m below sea level; to raise it to 0m, we could just dig a canal from the ocean to the New River or Ala...

- Wed Aug 31, 2016 10:37 am UTC
- Forum: Mathematics
- Topic: Torsion subgroups for elliptic curves over Q
- Replies:
**3** - Views:
**2085**

### Re: Torsion subgroups for elliptic curves over Q

Computing 12P directly is quite inefficient when P isn't a torsion point: for non-torsion points, the denominators of nP are about twice the size (in terms of bit length) of the denominators of (n-1)P, which slows down the computation dramatically. So it's much more efficient for non-torsion points ...

- Mon Aug 29, 2016 9:56 am UTC
- Forum: Mathematics
- Topic: Torsion subgroups for elliptic curves over Q
- Replies:
**3** - Views:
**2085**

### Torsion subgroups for elliptic curves over Q

TL;DR : Is there a way faster than the Nagell-Lutz theorem to tell whether the torsion subgroup of the elliptic curve y 2 = x 3 + ax + b over Q , where a and b are integers, is trivial? Context: As a personal project I wrote some code to analyze an elliptic curve over the rationals to extract and c...

- Wed Aug 24, 2016 12:24 pm UTC
- Forum: Individual XKCD Comic Threads
- Topic: 0827: "My Business Idea"
- Replies:
**98** - Views:
**24775**

### Re: 0827: "Business Idea"

OP here. 'Tis changed.

- Wed Aug 03, 2016 1:02 pm UTC
- Forum: Computer Science
- Topic: How good is lattice based cryptography looking?
- Replies:
**1** - Views:
**3083**

### Re: How good is lattice based cryptography looking?

I have no answer for this, but I'd like to quasi-hijack this thread to ask the corresponding question about cryptography based on supersingular isogeny.

- Thu Jun 23, 2016 1:46 am UTC
- Forum: Forum Games
- Topic: Count up with the Five Fives puzzle
- Replies:
**298** - Views:
**18591**

### Re: Count up with the Five Fives puzzle

27=5*5+((5+5)/5)

- Wed Jun 15, 2016 6:02 pm UTC
- Forum: Mathematics
- Topic: Completions, Cauchy sequences, and countability
- Replies:
**7** - Views:
**3103**

### Re: Completions, Cauchy sequences, and countability

If it's just decimals that you don't like, then I recommend using continued fractions instead. There is a 1-to-1 correspondence between infinite simple continued fractions and irrational numbers: each infinite SCF converges to a single value, and each irrational number has a unique SCF that represen...

- Wed Jun 08, 2016 11:50 pm UTC
- Forum: Coding
- Topic: Memoizing a generator in Python
- Replies:
**1** - Views:
**3372**

### Memoizing a generator in Python

I'd like to memoize a generator in Python. Specifically, I have an incremental sieve of Eratosthenes that gets called from scratch a lot , and I'd like to avoid recomputing (up to some arbitrary finite number of) the numbers it yields. Memoizing a pure function is easy enough, and there are any numb...

- Thu Jun 02, 2016 2:01 am UTC
- Forum: Forum Games
- Topic: Can you produce [X] in less than 15 seconds?
- Replies:
**7464** - Views:
**588006**

### Re: Can you produce [X] in less than 15 seconds?

There is one within 15 seconds' distance from me, but actually finding it in that pile of junk took too long.

A pressure vessel of any sort?

A pressure vessel of any sort?

- Tue May 31, 2016 4:59 pm UTC
- Forum: Forum Games
- Topic: Can you produce [X] in less than 15 seconds?
- Replies:
**7464** - Views:
**588006**

### Re: Can you produce [X] in less than 15 seconds?

Took me more than 15 seconds to decide which one was the best, but all my options were within 15 seconds of me, so yes.

Copper that isn't part of a coin or electrical device?

Copper that isn't part of a coin or electrical device?

- Sun May 29, 2016 11:12 am UTC
- Forum: Forum Games
- Topic: Can you produce [X] in less than 15 seconds?
- Replies:
**7464** - Views:
**588006**

### Re: Can you produce [X] in less than 15 seconds?

Nope. Never even heard of such a feature.

In other news, I have several pounds of tungsten sitting on my desk.

In other news, I have several pounds of tungsten sitting on my desk.

- Sun May 29, 2016 11:10 am UTC
- Forum: Forum Games
- Topic: Complete the Grid!
- Replies:
**1232** - Views:
**109593**

- Sun May 15, 2016 2:50 am UTC
- Forum: Forum Games
- Topic: Complete the Grid!
- Replies:
**1232** - Views:
**109593**

- Sun May 15, 2016 2:37 am UTC
- Forum: Forum Games
- Topic: The Incredible Changing Sentence
- Replies:
**5618** - Views:
**582497**

### Re: The Incredible Changing Sentence

Christian canonized caramel chameleons' circadian Circassian Kardashians' Cardassians' Dame Rapunzel Č. McGuirewa's not the Empress who wished for so much purple omorashi that my platinum clock and the moribund pancake mandrake then creates plans, definitely Dirty... so why not Marxism?

- Wed May 11, 2016 5:13 am UTC
- Forum: Forum Games
- Topic: Complete the Grid!
- Replies:
**1232** - Views:
**109593**

### Re: Complete the Grid!

I reflected the rainbow in F5.

- Wed May 11, 2016 5:03 am UTC
- Forum: Forum Games
- Topic: The Incredible Changing Sentence
- Replies:
**5618** - Views:
**582497**

### Re: The Incredible Changing Sentence

Of chameleons' circadian Circassian Kardashians' Cardassians, Rapunzel Č. McGuire was not convinced, but Empress Violentlyyeti, viewing my platinum clock, and the slimy pancake I then create, is definitely Dirty Beatrix Potter.

- Sun May 08, 2016 7:51 pm UTC
- Forum: Coding
- Topic: [Resolved] Generalized Hamming numbers in Python
- Replies:
**3** - Views:
**3600**

### Re: [Resolved] Generalized Hamming numbers in Python

Thanks; that was enlightening.

- Sat May 07, 2016 8:04 pm UTC
- Forum: Coding
- Topic: [Resolved] Generalized Hamming numbers in Python
- Replies:
**3** - Views:
**3600**

### [Resolved] Generalized Hamming numbers in Python

I found an elegant and efficient Hamming number generator in Python, which I have modified a bit to fit my own personal idiom: from itertools import tee, chain, groupby from heapq import merge def hamming0(): def deferred_output(): yield from output p2, p3, p5, result = tee(deferred_output(), 4) m2,...

- Wed Apr 06, 2016 6:42 pm UTC
- Forum: Mathematics
- Topic: Efficiently summing a multiplicative function via inclusion-exclusion
- Replies:
**3** - Views:
**1978**

### Re: Efficiently summing a multiplicative function via inclusion-exclusion

Because the folks running the challenge discourage participants from posting full solutions on their blogs or finding the solutions by googling for people who do post their solutions like that. From their FAQ: I solved it by using a search engine, does that matter? Making use of the internet to rese...

- Tue Apr 05, 2016 7:11 pm UTC
- Forum: Mathematics
- Topic: Efficiently summing a multiplicative function via inclusion-exclusion
- Replies:
**3** - Views:
**1978**

### Efficiently summing a multiplicative function via inclusion-exclusion

This might be better suited to the Coding or CS sections, but this seems mathy enough to belong here. I'm working on a problem for a programming challenge (obfuscated to make googling this thread harder: it's # 22 2 in rot13(Cebwrpg Rhyre)). It devolves to computing the sum of a multiplicative funct...

- Fri Mar 04, 2016 5:51 pm UTC
- Forum: Mathematics
- Topic: Cardano triplets
- Replies:
**0** - Views:
**4049**

### Cardano triplets

Project Euler problem #251 defines a Cardano triplet as a triplet of positive integers ( a , b , c ) such that ∛( a + b √ c ) + ∛( a - b √ c ) = 1. We are asked to find the number of Cardano triplets with a + b + c ≤ 110,000,000. There's a reasonably obvious solution (transform the equation to b 2 ...

- Wed Feb 24, 2016 2:03 am UTC
- Forum: Science
- Topic: Food pressure
- Replies:
**3** - Views:
**2302**

### Re: Food pressure

Soooo.... convert the chemical potential energy of that cantaloupe into heat but keep it in the same volume, and you'd have a gas with 10

^{9}Pa of pressure?- Sat Feb 13, 2016 3:57 am UTC
- Forum: Mathematics
- Topic: Initial seeds for Aberth's method
- Replies:
**1** - Views:
**1549**

### Initial seeds for Aberth's method

When using Aberth's method for approximation of polynomial roots, are there any restrictions on the values of the initial seeds? Various root-finding methods are known to fail when the initial seeds are ill-conditioned in some manner (such as Durand-Kerner's inability to find non-real roots when the...

- Tue Jan 19, 2016 3:28 am UTC
- Forum: Coding
- Topic: xkcd Phone: Application Programming Language
- Replies:
**21** - Views:
**7247**

### Re: xkcd Phone: Application Programming Language

There will be no such thing as indentation. Lines beginning with whitespace produce syntax errors.

- Wed Jan 06, 2016 1:57 am UTC
- Forum: Mathematics
- Topic: Elementary evaluation of Legendre symbol (3|p)
- Replies:
**2** - Views:
**1521**

- Tue Jan 05, 2016 3:43 am UTC
- Forum: Mathematics
- Topic: Elementary evaluation of Legendre symbol (3|p)
- Replies:
**2** - Views:
**1521**

### Elementary evaluation of Legendre symbol (3|p)

Using Euler's criterion and quadratic reciprocity, it can be shown with little difficulty that for odd primes p ≥5, we have 3 ( p -1)/2 ≡(-1) ⌊(p+1)/6⌋ (mod p ), which then reduces further to +1 if p ≡±1 (mod 12) and -1 if p ≡±5 (mod 12). I'd like to prove this in a more elementary f...

- Sat Dec 26, 2015 6:04 pm UTC
- Forum: Mathematics
- Topic: Counting tetris arrangements
- Replies:
**2** - Views:
**1684**

### Re: Counting tetris arrangements

The shifted version you describe would not be considered stable.

- Sat Dec 26, 2015 1:47 am UTC
- Forum: Mathematics
- Topic: Counting tetris arrangements
- Replies:
**2** - Views:
**1684**

### Counting tetris arrangements

So I received this lamp for xmas... https://www.thinkgeek.com/images/products/zoom/f034_tetris_stackable_LED_desk_lamp.jpg It consists of the seven Tetris pieces; the long one plugs into the wall, and the other pieces can be pushed up against it to light up. Their arrangement must be coplanar, and t...