"Tim Little" <tim@little-possums.net> wrote in message news:slrni1tjkg.jrj.tim@soprano.little-possums.net... > On 2010-06-21, Peter Webb <webbfamily@DIESPAMDIEoptusnet.com.au> wrote: >> No, I only need a finite algorithm which will calculate it to n >> decimal places with finite input. > > You have previously stated that you can do this with "about three > lines of Java code". > > Here's your Java method signature: int antidiagonalDigit(BigInteger n). > > Here are the first twenty digits of the first twenty members of my > list: > > 93525532854532512838 > 32127313472944276266 > 70595916184994935423 > 20733652719572401688 > 30472031767118774150 > 47190325821263633948 > 74236814853458351851 > 58521903865615844550 > 91701104659863267390 > 39510921669610680229 > 19656091025330568974 > 49591084533660072011 > 81683520683673830124 > 93720622611168810054 > 50284245443806050152 > 11702670934156383526 > 58534679962278312978 > 68478827933494896765 > 83579375050000862329 > 50241229144880453593 > > Now let's see your Java code. >
Here is my p-code.
Take the nth digit of the nth item. If its a "1", the anti-diagonal is a "2", otherwise its a "1".
In terms of the list you have provided, the anti-diagonal is ...
0.111111 ...
> > If I then give you the first 10^100 list entries to 10^10 digits, > would the same code suffice?
Yes.
> Would it have to be enlarged?
No.
> How large > would it be if I required any digit up to the 10^100'th? >
The algoritm would be no longer. It would however loop a few more times.
> How large would it have to be if I asked for an algorihm that produces > *any* digit on request? >