Conway series, can someone explain the formula?
a(1)=a(2)=1, a(n) = a(a(n-1)) + a(n-a(n-1)) for n>2.
I have two version of the program: 1)conway:=proc(n) description`Conway with remember table`: option remember: if n=1 then return 1; elif n=2 then return 1; else return conway(a(a[n-1]))+conway(a(n-a[n-1])); end if; end proc;
2)conway2:=proc(n) local A,k; A[1],A[2]:=1,1; for k from 3 to n do A[n]:=A[A[k-1]]+A[k-A[k-1]]; end do; return A; end proc;
both are not returing the sequence
what is the deal with the conway series? can somone explain the formula?
man, i just read this paper on recursive programing and i think this might be more subtle than i thought
but give me your thoughts on it
i might just be missing somehting obvious
I think it's this \[\huge a _{n} = a _{a _{n-1}} + a _{n-a _{n-1}}\]
yeah, that what i am thinking, thats why i put in maple a[a[n-1]], the brackets are suppose to denote subscripts
you supposed to be implementing recursively?
i guess so, its not explicetly mentioned in the problem(the problem only says go to internet and search conway, then right a program on it), but upon googling conway series it says that its a recursive formula
sec
so what site are you looking at?
thats basically it on info about conway, there are someothers like wolfram that has info on conway series, but its all the same
we should click your own link a bunch of times and then you should ask the question: "Does anyone know any know of any good links with info about the Conway Series?? plz hapl"
eventually, due to recursion, we'll get a good link with all the info we need.
you sent me back to my own problem, your a genius :)
i might have found something broski, let me try it
stand back everybody summoning the math gods... @UnkleRhaukus @experimentX @estudier @ganeshie8 @ByteMe @algebraic!
I summoned myself only for the sake of recursion.
like i am using this program: conway:=proc(n) description`Conway with remember table`: option remember: if n=1 then return 1; elif n=2 then return 1; else return A(A(n-1))+A(n-A(n-1)); end if; end proc; but when i input in maple i get this: conway(1); 1 conway(2); 1 conway(3); A(A(2)) + A(3 - A(2))
hmm yeah, maple probably has some special notation for terms in a series with sub scripts
that's not "A[ ] "
now i changed it to:A[A(n-1)]+A[n-A(n-1)]; and got: conway(3); A[A(2)] + A[3 - A(2)]
what are you trying to get?
yeah I don't think " A[ ]" is going to do it... we need something like:
i am trying output the conway series
he's trying to find a recursion relation for the conway series so he can implement in Maple
Error, unable to match delimiters could you edit the program?
I find it easy to program in Matlab.
Need something like \[\huge Conway _{n} = Conway _{Conway _{n-1}} +Conway _{n-Conway _{n-1}}\]
wow that totally worked
\[ Conway _{n} = Conway _{Conway _{n-1}} +Conway _{n-Conway _{n-1}}\]
\[\huge Conway _{n} = Conway _{Conway _{n-1}} \] \[\huge +Conway _{n-Conway _{n-1}}\]
check this out, its different versions of what i have tried:
see what I'm saying?
if you can find the syntax in Maple for 'series terms with subcripts' it would make it easier...
did you see the first part of that pdf i sent you
i have made a matlab code that seems working
please post it, thank you
the thing with mine, is that it gives me the subscripts but it doesnt want to evauate or give me the value of that term, if i could figure out how to do that, it would work
% conway % L=20; % lenght of series a=1:L; % set vector a a(1)=1; % initial value a(2)=1; % second value for n=3:L; a(n) = a(a(n-1)) + a(n-a(n-1)); % other values end a % dipsplay
>> conway a = Columns 1 through 20 1 1 2 2 3 4 4 4 5 6 7 7 8 8 8 8 9 10 11 12
yeah so, find out the Maple syntax for terms in a series with sub scripts it's evidently not " A [ ]"
yup thats the series
To select members of a sequence, use index notation: s[i]refers to the ith element of the sequence s.
or figure out how to write a Maple proc that opens matlab and executes that program and then returns the result, all the while pretending that it did the work... *whistles innocently* might help
there ya go
but isnt that notation what i have used in my program?
I took it to mean you have to use 's' specifically... maybe A is some notation used for a matrix? I dunno...
ah, part of the problem is that in your program I don't think you tell it that A[1] =1 and A[2] =1 ...?
you just tell it what to return...
@UnkleRhaukus in matlab is () suppose to denote a subscript?
i do define a[1] and a[2]
yeah
ok, in the second program..? but you have the brackets wrong in that one...
s[n] := s[s(n-1)]+s[n-s(n-1)] <---you mean here?
can't copypasta from pdf but... in " conway2:= " you have the wrong brackets for some of the things that *should* be subscripts....
I changed that and look what i got: seq(G[i],i=3..30); s[3], s[4], s[5], s[6], s[7], s[8], s[9], s[10], s[11], s[12], s[13], s[14], s[15], s[16], s[17], s[18], s[19], s[20], s[21], s[22], s[23], s[24], s[25], s[26], s[27], s[28], s[29], s[s[29]] + s[30 - s[29]]
" A[A(n-1)] " try it with A[A[n-1]]
whats the program is not doing is this: i defined the terms s[1] and s[2], they should both be 1, so when i plug in n=3 meaning i want the s[3] term, it should automatically say okay s[3-1] is s[2] and i know s[2] is =1 , so then it should use 1 and the subscript for the outer s
in matlab is () suppose to denote a subscript? Yes
I'd try the exact code you have in conway2 , but with the right brackets... if that doesn't work... then, one problem down.
I switched it to this:s[n]:= s[s[n-1]]+s[n-s[n-1]];
ok
with s[1] = s[2] =1 ?
and it gave me this:seq(G[i],i=3..30); s[3], s[4], s[5], s[6], s[7], s[8], s[9], s[10], s[11], s[12], s[13], s[14], s[15], s[16], s[17], s[18], s[19], s[20], s[21], s[22], s[23], s[24], s[25], s[26], s[27], s[28], s[29], s[s[29]] + s[30 - s[29]]
yup i said:s[1], s[2] := 1, 1
try i=1..30 , looks like it's not including s[1], s[2]
all it does is include 1,1 but the rest of them stayed the same
seq(G[i]:=s[s[n-1]]+s[n-s[n-1]],i=1..30) ?
dead end
don't know... syntax thing.
conway2 looks closest to me... I'd play with it.
thanks for wokring with me, i'll try and keep working on it to see what happens
So check out this link, scroll down to where it says Maple: http://oeis.org/A004001
you wanna know somethin crazy, i just called Neil Sloane, the guy that wrote that page. Well he didnt answer but i left my number.
anyway, can you believe that all i did was copy and paste that code into maple, and its acutally does return each indivdual conway term
rfl
but what i am trying to figure out is does A00400l have a deeper meaning in maple or is that just a name for soomething?
"option remember" maybe you have to turn recursion on in maple. I like how the function name is a link to the page. just keep recurring.
right, but in maple, does A004001 actually have a meaning or does it just name the program
name it I think, it's a joke...I'm guessing.
what does rfl stand for?
like, "hey, if I click this link, it'll show me what the function is!"
so, lets say that i edit my program and instead of A004001 i write conway, could it still work?
Yeah, I think so.
or maybe he just names his functions on each page after each page address. if they're* all recursive functions, that's kind of funny. when he calls back, ask him for me.
yea i will, you know whats funny? is that his wife or daughter answers, and when i ask to speak to mister sloan, she is like" sure, can he call you back", really politely, she dosent even who is. I think i am not the first student to call him.
she doesent even ask who it is *
lol. sounds like a family with a sense of humor.
now let me ask you, how does this program work?
just like we've been doing all along, I guess the brackets don't matter... it's the same thing I wrote above. also I don't know what 'option remember' means in Maple, maybe that needs to be enabled so it can call a function inside itself (it remembers where it is in 'n')
oh man, the program rembers the values of the conway(1) and conway(2)
Join our real-time social learning platform and learn together with your friends!