## Search found 42 matches

Sun Oct 18, 2020 7:41 pm
Forum: Clarifications on Project Euler Problems
Topic: Problem 601
Replies: 3
Views: 1249

### Re: Problem 601

I was able to use an algorithm that correctly gives the answer to the examples. To be clear, the answer should be the sum of 31 summands? Not ranging 1 to 31 for each power of 4? That is I should only be calculating: P(1,4) + P(2,16) + P(3,64) + ... I wrote a brute force algorithm as well, that was ...
Sat Jul 02, 2016 2:04 pm
Forum: Number
Topic: Determining the size of an L-System string
Replies: 1
Views: 8916

### Determining the size of an L-System string

I've been writing a program to play around with L-Systems (Lindenmayer System). https://en.wikipedia.org/wiki/L-system if your curious about them. I'd like to add a progress bar for higher order calculation, but to do that I need to develop a method to determining the total number of items that will...
Thu Dec 31, 2015 9:07 pm
Forum: Recreational
Topic: Gearbox Problem
Replies: 0
Views: 3229

### Gearbox Problem

I am looking for help in either the math needed or algorithm needed to solve the following problem. A GearBox consists of an 8x8 grid. The columns are labeled A-H. Rows are labeled 1-8. You are able to place up to 15 shafts, that can hold up to 3 gears per shaft. Gears come in the following sizes: 1...
Fri Jun 26, 2015 7:54 am
Forum: Number
Topic: Help with Expected Value.
Replies: 1
Views: 8680

### Help with Expected Value.

EV problems have always been the hardest for me to figure how to get a formula for them, esp open ended ones where the results are not guaranteed to happen. (e.g how many times do you have to pick a random number between 1-1000 before you choose a 1). So I have problem I'm trying to write an app for...
Tue Apr 16, 2013 2:14 am
Forum: Clarifications on Project Euler Problems
Topic: Problem 173 & 174
Replies: 41
Views: 16507

### Re: Problem 173 & 174

I was curious if anyone who had solved this could PM. I have solution for N(n) for 1 <= n <= 20. My N(15) matches 832 correctly but my summation of 1 to 10 seems off. I was wondering if could PM someone that list to see how far off i was.
Sun Feb 26, 2012 8:02 am
Forum: Combinatorics
Topic: Dice Rolling
Replies: 3
Views: 3663

### Re: Dice Rolling

Heh of course your right. Very simple. Thank you for the insight, I've already solved my problem and sent one back. Though now that I've been thinking about this a bit, i'm wondering if there is an easy solution to the following: Say you have the letter sequence MISSISSIPPI. 1.How many ways can you ...
Sat Feb 25, 2012 6:12 pm
Forum: Combinatorics
Topic: Dice Rolling
Replies: 3
Views: 3663

### Dice Rolling

Sadly mathhelpform seems to have gone down. I usually post such questions there, but thought I might try here. A friend and I like to pose various problems to each other. The most recent one I got was: What are the odds of rolling a dice n times without repeating a number. (i'm pretty sure this isn'...
Thu Feb 23, 2012 5:03 am
Forum: Game Theory
Topic: Blackjack dice game variant
Replies: 4
Views: 11869

### Re: Blackjack dice game variant

What happens if player A reaches 21 and player B is at 10? If the answer is the game continues, and thus A's next roll will cause him to lose my gut instinct is B has the advantadge. The winning strategy for either player is to take the lowest numbered dice possible in each roll. This has a 2 effect...
Thu Feb 23, 2012 4:31 am
Forum: Geometry
Topic: Points, circumference and circles
Replies: 11
Views: 16591

### Re: Points, circumference and circles

Posted a proof that it could only be 2 points, but I was assuming angle subtended by the points and center had to be rational. Which it does not. Given angle 106.26..and 73.73.. (the angles of a 345 triangle) you can place 4 points around the circumfernce all of which will be 6 , 8 or 10 units from ...
Thu Feb 23, 2012 3:50 am
Forum: Number Theory
Topic: Even numbers and twin prime
Replies: 3
Views: 3464

### Re: Even numbers and twin prime

Well since for any prime p, φ(p) = p-1 your equation reduces to
2n =p*(q+1) - q*(p-1)
2n = pq+p-pq-q

2n = 2pq + (p-q) where p is any odd prime, and q is the smaller of a twin prime pair.

I'm not sure what else we could say about n in this situation to elimnate possible solutions.
Thu Feb 23, 2012 3:16 am
Forum: Geometry
Topic: Points, circumference and circles
Replies: 11
Views: 16591

### Re: Points, circumference and circles

When you say distance do you mean the chord length between 2 points, or the arc length along the circumference?
Wed Feb 22, 2012 11:21 pm
Forum: Recreational
Topic: Recurring themes & tools
Replies: 3
Views: 3297

### Re: Recurring themes & tools

I have a PrimeFactor Class, that can take a number and:
break it down into prime factors (and a count of each of those) (e.g 72 = 2^3*3^2 )
generate a list of all divisors (from which you can get a total number of divisors as well as sum of divisors)

I've used this in a number of problems
Mon Nov 28, 2011 11:10 am
Forum: Number
Topic: Reciprocal of 9899 and similar numbers.
Replies: 4
Views: 5997

### Re: Reciprocal of 9899 and similar numbers.

Lucas Numbers: http://en.wikipedia.org/wiki/Lucas_number I guess those do fit the bill in a way. They are just the Fibonacci numbers where F(0)=2, F(1)=1 So far all the sequences generated by the formula I showed above have S(0)=1, S(1)=A where a = 9-middle number. I'll have to play around to see i...
Mon Nov 28, 2011 11:05 am
Forum: Number
Topic: Reciprocal of 9899 and similar numbers.
Replies: 4
Views: 5997

### Re: Reciprocal of 9899 and similar numbers.

Just found a much faster, and cleaner way to generate the reciprocals. 1/(10^(2n)-A*10^n-1) will generate a decimal expansion of the sequence, in which each term is n padded digits: S(n) = a*S(n-1)*S(n-2). so for 2 digit length and fibonacci (a=1) we get: 1/(10^4-1*10^2-1) = 1/9899. for 4 digit Pell...
Mon Nov 28, 2011 10:33 am
Forum: Number
Topic: Reciprocal of 9899 and similar numbers.
Replies: 4
Views: 5997

### Reciprocal of 9899 and similar numbers.

A while back I learned that the decimal representation of 1/9899 formed the fibonacci sequence. Specifically it equals .00010102030508... Of course as the numbers get larger they run over each other. However you can fix this by adding an equal number of 9s to the front and back. Any number of the fo...
Thu Nov 24, 2011 10:49 am
Forum: Clarifications on Project Euler Problems
Topic: Problem 110
Replies: 6
Views: 3348

### Re: Problem 110

I apparently have the uncanny ability to work on a problem for days or weeks, and then find the bug minutes after posting here
Tue Nov 22, 2011 6:02 am
Forum: Clarifications on Project Euler Problems
Topic: Problem 117
Replies: 1
Views: 1728

### Problem 117

To see the problem: Problem 117 (View Problem)

Always sad to have to be the person to start a new problem thread

Bah! Nothing but an overflow problem
Thu Nov 10, 2011 6:55 am
Forum: Programming languages
Topic: MPIR Question C++
Replies: 2
Views: 3861

### MPIR Question C++

I recently got MPIR installed and have been using it with Visual C++, specifically with the c++ wrapper that has the mpz_class, mpq_class, and mpf_class. When I use the cumbersome mpz_t format, my numbers will increase to an arbitrary precision, but when I use the class wrapper, they act like _int32...
Wed Nov 09, 2011 10:56 pm
Forum: Clarifications on Project Euler Problems
Topic: Problem 091
Replies: 31
Views: 11520

### Re: Problem 091

I think idea is well under answer, it was for 9. I don't actually enumerate every triangle. I thinking of all the possible triangles there could be.. Calculating the ones for which an easy formula was available, then using a program to enumerate the rest. If any solver is willing, I'd like to PM my ...
Tue Nov 08, 2011 5:09 am
Forum: Recreational
Topic: Missing Wedding Ring Finger
Replies: 18
Views: 16883

### Re: Missing Wedding Ring Finger

Have you tried: The police weren't there? And/or he killed the man as well for no witnesses. In regards to lateral thinking puzzles. If you enjoy party games you might try to track down this one: http://www.boardgamegeek.com/boardgame/1254/crack-the-case Its a neat party game where players take turn...