Any demoscener from Mensa?
category: residue [glöplog]
Well, as a Mensan, I see the "law" according to which this series is composed at one glance... The question is just: Why?
Anyway, you just asked for the function, which is (note: now I'm using anes' notion of n):
f(n) = 2 for 4 <= n <= 7
f(n) = f(n-1) + f(n-3) for even n >= 8
f(n) = f(n-2) + f(n-4) for odd n >= 9
f(n) = 2 for 4 <= n <= 7
f(n) = f(n-1) + f(n-3) for even n >= 8
f(n) = f(n-2) + f(n-4) for odd n >= 9
well, you can even write it easier, it is a fibonacci alike, it is easy to see. So, being a fibonacci you can even write it in an explicit formula, you know. (But I don't need it)
So, now you have seen this clear... the why is the question now. Stop using your computer horsepower and use your brain logic :D
So, now you have seen this clear... the why is the question now. Stop using your computer horsepower and use your brain logic :D
actually i constructed the numbers using the fibonacci sequence, i used the computer for multiplying them by two.
i'm preparing an explanation now :)
i'm preparing an explanation now :)
x[n] = ( ax[1] ) mod 10
x[n-1] = ( ax[2] + y[1] ) mod 10
x[n-2] = ( ax[3] + y[2] ) mod 10
.
.
x[1] = ( ax[n] + y[n-1] ) mod 10
Where:
y[1] = ( ax[1] ) div 10
y[2] = ( ax[2] + y[1] ) div 10
.
.
y[n] = ( ax[n] + y[n-1] ) div 10 = 0
As could be expected a=1 represents a trivial solution since y[i]=0 for 1<=i<=n, so any symmetric X is a solution.
It's also obvious that since y[n]=0, if you let x[n+1..2n]=x[1..n] when x[1..n] is a solution, you get an additional solution for 2n digits. In fact given any number of solutions (A,B,C..) you can combine those in any symmetric fashion: ABA, ABCBA, ACBABCA, etc.
You may also insert any m+1-digit sequence satisfying the above, but keeping in mind:
y[i] = ( ax[i] + y[i-1] ) div 10
y[i+1] = ( ax[i+1] + y[i] ) div 10
.
.
y[i+m] = ( ax[i+m] + y[i+m-1] ) div 10 = y[i-1]
A sequence of 9's is obvious for this since e.g. 999*4+3) mod 1000 = 999 and (999*4+3) div 1000 = 3 (i.e. the right-hand side carry of 3 is carried through, leaving all 9's after the multiplication).
So well, that's completely untested, maybe a few mistakes too, but it's probably part of the answer, and that's as much time as i want to spend on it. ;) I have a world I need to dominate. \o/
x[n-1] = ( ax[2] + y[1] ) mod 10
x[n-2] = ( ax[3] + y[2] ) mod 10
.
.
x[1] = ( ax[n] + y[n-1] ) mod 10
Where:
y[1] = ( ax[1] ) div 10
y[2] = ( ax[2] + y[1] ) div 10
.
.
y[n] = ( ax[n] + y[n-1] ) div 10 = 0
As could be expected a=1 represents a trivial solution since y[i]=0 for 1<=i<=n, so any symmetric X is a solution.
It's also obvious that since y[n]=0, if you let x[n+1..2n]=x[1..n] when x[1..n] is a solution, you get an additional solution for 2n digits. In fact given any number of solutions (A,B,C..) you can combine those in any symmetric fashion: ABA, ABCBA, ACBABCA, etc.
You may also insert any m+1-digit sequence satisfying the above, but keeping in mind:
y[i] = ( ax[i] + y[i-1] ) div 10
y[i+1] = ( ax[i+1] + y[i] ) div 10
.
.
y[i+m] = ( ax[i+m] + y[i+m-1] ) div 10 = y[i-1]
A sequence of 9's is obvious for this since e.g. 999*4+3) mod 1000 = 999 and (999*4+3) div 1000 = 3 (i.e. the right-hand side carry of 3 is carried through, leaving all 9's after the multiplication).
So well, that's completely untested, maybe a few mistakes too, but it's probably part of the answer, and that's as much time as i want to spend on it. ;) I have a world I need to dominate. \o/
#include <stdio.h>
int f(int n)
{
int count = 1 ;
int i, j ;
if(n < 4) return 0 ;
for(i = 4 ; i <= n / 2 ; ++i)
{
count += 1 ;
for(j = i ; j <= n / 2 ; ++j)
{
count += f(n - j * 2) ;
}
}
return count ;
}
int main()
{
int i ;
for(i = 4 ; i < 30 ; ++i)
{
//printf("f(%d) = %d\n", i, f(i)) ;
printf("%d ", f(i)) ;
}
scanf(" ") ;
return ;
}
so you gave me f(4) = 2 and f(n) = 0 for n < 4.
when i increase the digits further. i could find another number of that kind by putting extra 9's in the middle
for 5 digits 10989
for 6 digits 109989 etc.
so i have at least f(n) >= 2
for an explanation on this see my post two pages before.
but for digits greater than equal to 8 i start getting numbers like 10891089 which are also of that kind. it's like a two digit number in radix 10^4. its digits don't generate a carry during multiplication because of the definition of the problem (if they did multiplication would create a 3 digit number). so we have a numerous of numbers like:
1089|1089|1089
10989|10999989|10989
and the same rules apply if they are treated as multi base (radix10^5,radix10^8,radix10^5 in this case). | shows the places carry won't occur. also i could append zeros to these breaks, it will still work.
(1089|00|1089)
the important condition is that these multi base numbers must be palindromic so that they will read the same both forwards and backwards when multiplied, so when converted back to base 10 problem definitions are met.
now their count..
for digit n
you can convert all the numbers from digit n-2 by
-putting a 99 in the middle if mid digit in multi base is nonzero.
(1089|1089|1089 to 1089|109989|1089)
-putting a 00 in the middle if the mid digit is 0 or it doesn't exist.
(10989|10989 to 10989|00|10989)
you can also convert all the numbers from digit n-4 by
-putting a 1089 in the middle if the mid digit is 0 (or there is no mid digit).
(1089|00|1089 to 1089|0|1089|0|1089)
-partioning the number and converting its mid 9's to 0 if there is any.
(10999989 to 1089|00|1089)
so we get f(n) = f(n-2) + f(n-4)
the property of f(n-4) component is that numbers generated by it, have no correspondence to f(n-2) (they can't be converted by adding only 2 digits).
the equation doesn't contain odd differences because the methods we could apply to digit n-1 are those we applied to digit n-2 because of palindrome rule.
(thus we have f(n) = f(n-1) for odd n.
the equation doesn't contain even differences more than 4 because they are inherent in n-2 and n-4.
(there are no base numbers like 1089 with more than 4 digits. remember 10989 is converted by adding a 9.)
i have a painful sense that there is a muuuch simpler explanation :)
int f(int n)
{
int count = 1 ;
int i, j ;
if(n < 4) return 0 ;
for(i = 4 ; i <= n / 2 ; ++i)
{
count += 1 ;
for(j = i ; j <= n / 2 ; ++j)
{
count += f(n - j * 2) ;
}
}
return count ;
}
int main()
{
int i ;
for(i = 4 ; i < 30 ; ++i)
{
//printf("f(%d) = %d\n", i, f(i)) ;
printf("%d ", f(i)) ;
}
scanf(" ") ;
return ;
}
so you gave me f(4) = 2 and f(n) = 0 for n < 4.
when i increase the digits further. i could find another number of that kind by putting extra 9's in the middle
for 5 digits 10989
for 6 digits 109989 etc.
so i have at least f(n) >= 2
for an explanation on this see my post two pages before.
but for digits greater than equal to 8 i start getting numbers like 10891089 which are also of that kind. it's like a two digit number in radix 10^4. its digits don't generate a carry during multiplication because of the definition of the problem (if they did multiplication would create a 3 digit number). so we have a numerous of numbers like:
1089|1089|1089
10989|10999989|10989
and the same rules apply if they are treated as multi base (radix10^5,radix10^8,radix10^5 in this case). | shows the places carry won't occur. also i could append zeros to these breaks, it will still work.
(1089|00|1089)
the important condition is that these multi base numbers must be palindromic so that they will read the same both forwards and backwards when multiplied, so when converted back to base 10 problem definitions are met.
now their count..
for digit n
you can convert all the numbers from digit n-2 by
-putting a 99 in the middle if mid digit in multi base is nonzero.
(1089|1089|1089 to 1089|109989|1089)
-putting a 00 in the middle if the mid digit is 0 or it doesn't exist.
(10989|10989 to 10989|00|10989)
you can also convert all the numbers from digit n-4 by
-putting a 1089 in the middle if the mid digit is 0 (or there is no mid digit).
(1089|00|1089 to 1089|0|1089|0|1089)
-partioning the number and converting its mid 9's to 0 if there is any.
(10999989 to 1089|00|1089)
so we get f(n) = f(n-2) + f(n-4)
the property of f(n-4) component is that numbers generated by it, have no correspondence to f(n-2) (they can't be converted by adding only 2 digits).
the equation doesn't contain odd differences because the methods we could apply to digit n-1 are those we applied to digit n-2 because of palindrome rule.
(thus we have f(n) = f(n-1) for odd n.
the equation doesn't contain even differences more than 4 because they are inherent in n-2 and n-4.
(there are no base numbers like 1089 with more than 4 digits. remember 10989 is converted by adding a 9.)
i have a painful sense that there is a muuuch simpler explanation :)
pasting the code wasn't on purpose ;)
and i forgot to add f(n-2) + f(n-4) can't be applied to odd digits because of the palindrome rule again.
function exactly is:
f(n) =
0 ; n < 4
2 ; n = 4
f(n-1) ; n odd
f(n-2)+f(n-4) ; n even
function exactly is:
f(n) =
0 ; n < 4
2 ; n = 4
f(n-1) ; n odd
f(n-2)+f(n-4) ; n even
hmm no, the palindrome rule wouldn't prevent me from breaking apart an odd digit.
(10989 to 1089|0|1089)
f(n) =
0 ; n < 4
2 ; n = 4 or n = 5
f(n-2)+f(n-4) ; ow
(10989 to 1089|0|1089)
f(n) =
0 ; n < 4
2 ; n = 4 or n = 5
f(n-2)+f(n-4) ; ow
searching for that rules is correct. But don't forget to demostrate all cases. For example, could you answer why there is no solutions multiplied by 2?
bahh this thread makes me feeling... i don't know how, but definitely not good.
so, i have to counter this with the following puzzle, dedicated to all those mensa freaks liking to think about math...
the first part: continue the sequence 14 52 78 133.
the second part, in the case you managed the first part (presumably by creative googling): try to understand the meaning of what you found. and do not post while thinking.
kthanksbye.
so, i have to counter this with the following puzzle, dedicated to all those mensa freaks liking to think about math...
the first part: continue the sequence 14 52 78 133.
the second part, in the case you managed the first part (presumably by creative googling): try to understand the meaning of what you found. and do not post while thinking.
kthanksbye.
i don't need to. i have always constructed other solutions by exploiting the two you gave me.
if you want an explanation on why there aren't others even for n=4, it'd take much more. but briefly, for the multibase decomposition there are only three numerals that can occupy a digit:
1099...9989
2199...9978
0000...0000
let P(n) = 1099..9989 with n digits.
P(n) = 11 * (99..9) <- (n - 2 9's)
these numbers are P(n), P(n) * 2, P(n) * 0 respectively.
what i found out last week was
M*P(n) and (10-M)*P(n) are decimal reverse of each other.
for M between 2 and 9 there is only 1 and 2 that is a divider of (10 - M). so
1*P(n) * 9 = 9*P(n)
2*P(n) * 4 = 8*P(n)
and P(n)'s are the only numbers that all generate carry's till the halfway and don't from there (here's the long part, i'm omitting it). thus they are the basis for multi base decomposition method. thus only 4 and 9 can be used for multiplication :)
also f(n) = 0 for n < 4 since P(n) is not n digits for those n's.
in fact i didn't notice that i may not see carry's till the halfway until i executed adok's code. knowing f(n) could be larger than 2 was almost solving it.
if you want an explanation on why there aren't others even for n=4, it'd take much more. but briefly, for the multibase decomposition there are only three numerals that can occupy a digit:
1099...9989
2199...9978
0000...0000
let P(n) = 1099..9989 with n digits.
P(n) = 11 * (99..9) <- (n - 2 9's)
these numbers are P(n), P(n) * 2, P(n) * 0 respectively.
what i found out last week was
M*P(n) and (10-M)*P(n) are decimal reverse of each other.
for M between 2 and 9 there is only 1 and 2 that is a divider of (10 - M). so
1*P(n) * 9 = 9*P(n)
2*P(n) * 4 = 8*P(n)
and P(n)'s are the only numbers that all generate carry's till the halfway and don't from there (here's the long part, i'm omitting it). thus they are the basis for multi base decomposition method. thus only 4 and 9 can be used for multiplication :)
also f(n) = 0 for n < 4 since P(n) is not n digits for those n's.
in fact i didn't notice that i may not see carry's till the halfway until i executed adok's code. knowing f(n) could be larger than 2 was almost solving it.
blala, are you going to make me learng algebra? Ughs... I hate it :D
for all number sequence needs:
http://www.research.att.com/~njas/sequences/
But I believe this is not what you have been looking for:
http://www.research.att.com/~njas/sequences/
But I believe this is not what you have been looking for:
Quote:
Greetings from The On-Line Encyclopedia of Integer Sequences!
Hints
Search: 14, 52, 78, 133
Displaying 1-1 of 1 results found. page 1
Format: long | short | internal | text Sort: relevance | references | number Highlight: on | off
A113907 Dimensions of the five sporadic Lie groups. +20
1
14, 52, 78, 133, 248 (list; graph; listen)
OFFSET
1,1
REFERENCES
N. Bourbaki, Groups et Alg\`{e}bres de Lie, Chap. 4, 5 et 6, Hermann, Paris, 1968.
Mario Livio, The Equation That Couldn't Be Solved, Simon & Schuster, 2005, page 257.
CROSSREFS
Sequence in context: A009961 A059997 A007588 this_sequence A118856 A118530 A048971
Adjacent sequences: A113904 A113905 A113906 this_sequence A113908 A113909 A113910
KEYWORD
nonn,fini,full
AUTHOR
Justin Herrick (justin(AT)lionstower.com), Jan 29 2006
page 1
do not use commas.
and don't ask me why :)
Well it's all nice with a pointless discrete maths problem now and then, but you still haven't solved my puzzle:
What did the little mountain say to the big mountain?
What did the little mountain say to the big mountain?
"Do you want to have sex with me?" :-)
"Mountains are able to speak?"
"No, we can't"
"No, we can't"
Well, I've been thinking if posting or not one problem. It is very famous, and it is probably the most controversy-generator problem EVER. It is easy to solve, and it has a concrete solution... but at first sight it use to look ilogical. So, before answering, please think a bit...
You are in a TV show. There are 3 closed doors. You know that behind one of the doors there is a car as prize and behind the other doors there is no prize at all. You desire to win the prize.
First, the presenter ask you to choose one of the doors, the one you think the car is behind.
Then, from the unselected doors, the presenter opens one of the doors and show you there is no prize. Now the presenter ask you: do you want to continue selecting the door you have already selected or to change to selection to the other door?
So what should you do to have more possibilities to win the car? Stay with your first selection, change your selection or it is not important at all?
*Note: the car is always in the same door during all the show.
You are in a TV show. There are 3 closed doors. You know that behind one of the doors there is a car as prize and behind the other doors there is no prize at all. You desire to win the prize.
First, the presenter ask you to choose one of the doors, the one you think the car is behind.
Then, from the unselected doors, the presenter opens one of the doors and show you there is no prize. Now the presenter ask you: do you want to continue selecting the door you have already selected or to change to selection to the other door?
So what should you do to have more possibilities to win the car? Stay with your first selection, change your selection or it is not important at all?
*Note: the car is always in the same door during all the show.
texel, off the top of my head, i'd say you should always switch.. 1/3 of the time you're throwing away the prize, 2/3 of the time you'll win it.
btw, what selfrespecting mensa member would visit a TV show, anyway? :P
btw, what selfrespecting mensa member would visit a TV show, anyway? :P
IMHO it doesn't matter at all if you switch or if you don't... after the presenter has opened the one door, the remaining chance is always 50:50.
"Hey, I have a question that I'm going to ask just to ventilate polarized unnecessary knowledge in faux-science, and you won't be able to answer it!"
"Gee, you're so clever!"
"Gee, you're so clever!"
kb: the problem is, it is not a question of opinion :)
http://en.wikipedia.org/wiki/Monty_Hall_problem
prof.spock:
"But I believe this is not what you have been looking for"
well, according your copypasted search result, that was the only matching sequence in the most comprehensive database available. draw the conclusion.
http://en.wikipedia.org/wiki/Monty_Hall_problem
prof.spock:
"But I believe this is not what you have been looking for"
well, according your copypasted search result, that was the only matching sequence in the most comprehensive database available. draw the conclusion.
I AM A GENIOUS AND KB_ IS NOT !!!
I AM A GENIOUS AND KB_ IS NOT !!!
I AM A GENIOUS AND KB_ IS NOT !!!
I AM A GENIOUS AND KB_ IS NOT !!!
I AM A GENIOUS AND KB_ IS NOT !!!
in other news, any sucker could solve this one with pen, paper and a probability tree :-)
I AM A GENIOUS AND KB_ IS NOT !!!
I AM A GENIOUS AND KB_ IS NOT !!!
I AM A GENIOUS AND KB_ IS NOT !!!
I AM A GENIOUS AND KB_ IS NOT !!!
in other news, any sucker could solve this one with pen, paper and a probability tree :-)