Found what i needed to discover the repetition index of rational decimal
expansions.:


*]n=. x:%p:3+i.20*

*1r7 1r11 1r13 1r17 1r19 1r23 1r29 1r31 1r37 1r41 1r43 1r47 1r53 1r59 1r61
1r67 1r71 1r73 1r79 1r83*

NB. Verb for finding repetition index:


* rpt =.3 :'~.|-/"1]2,\I.>+./ea*./"1 ea=ea({10,.i.500)$ea{3}.0j1000":y'*

* rpt ea n*

*┌─┬─┬─┬──┬──┬──┬──┬──┬─┬─┬──┬──┬──┬──┬──┬──┬──┬─┬──┬──┐*

*│6│2│6│16│18│22│28│15│3│5│21│46│13│58│60│33│35│8│13│41│*

*└─┴─┴─┴──┴──┴──┴──┴──┴─┴─┴──┴──┴──┴──┴──┴──┴──┴─┴──┴──┘*

Skip

Skip Cave
Cave Consulting LLC


On Sat, Jan 11, 2020 at 10:00 PM Skip Cave <[email protected]> wrote:

> I'll need something like this:
>
> n=.'abcdefgabcdefgabcdefgabcdefgabcdefgabcdefg'
>
> nc=.n="1
> |:n,.(1|.n),.(2|.n),.(3|.n),.(4|.n),.(5|.n),.(6|.n),.(7|.n),.(8|.n),.(9|.n),.(10|.n)
>
> +/"1 nc
>
> 42 0 0 0 0 0 0 42 0 0 0
>
> So it is clear, n repeats every 8 digits.
>
>
> There's got to be a non-looping way to define nc more concisely.
>
>
> Skip
>
> Skip Cave
> Cave Consulting LLC
>
>
> On Sat, Jan 11, 2020 at 9:40 PM Skip Cave <[email protected]> wrote:
>
>> If I remember my college math courses, what I need is what is
>> typically called "autocorrelation" which finds the repetitiveness of a
>> vector of numbers. In this case, rather than a probability statistic, there
>> should be an integer defining the exact number of digits before repetition
>> begins.
>>
>> Skip Cave
>> Cave Consulting LLC
>>
>>
>> On Sat, Jan 11, 2020 at 8:08 PM Julian Fondren <[email protected]>
>> wrote:
>>
>>> On Sat, 2020-01-11 at 19:55 -0600, Julian Fondren wrote:
>>> > I don't have a good answer
>>>
>>> geh, I could've said that again. I only looked up e. after wondering
>>> why exactly I got the final wrong result.
>>>
>>>     '500500500' e. '50'
>>> 1 1 1 1 1 1 1 1 1
>>>
>>> Is all ones as it's only finding either '5' or '0' in each of those
>>> positions. So this is useless, sorry.
>>>
>>> > On Sat, 2020-01-11 at 19:22 -0600, Skip Cave wrote:
>>> > > Beautiful! Thank you Roger.
>>> > >
>>> > > Now, how can I find the number of digits in each repeating cycle of
>>> > > a
>>> > > rational number?
>>> > >
>>> > > Skip
>>> > >
>>> > > Skip Cave
>>> > > Cave Consulting LLC
>>> > >
>>> > >
>>> > > On Sat, Jan 11, 2020 at 7:03 PM Roger Hui <
>>> > > [email protected]>
>>> > > wrote:
>>> > >
>>> > > >    0j1000 ": 1r17
>>> > > >
>>> > > > 0.058823529411764705882352941176470588235294117647058823529411764
>>> > > > 70
>>> > > > 58823529411764705882352941176470588235294117647058823529411764705
>>> > > > 88
>>> > > > 23529411764705882352941176470588235294117647058823529411764705882
>>> > > > 35
>>> > > > 2941176470588235294117647058823529411764705882352941176...
>>> > > >
>>> > > >    _100 ]\ 0j1000 ": 1r17
>>> > > >
>>> > > > 0.058823529411764705882352941176470588235294117647058823529411764
>>> > > > 70
>>> > > > 588235294117647058823529411764705
>>> > > >
>>> > > > 88235294117647058823529411764705882352941176470588235294117647058
>>> > > > 82
>>> > > > 352941176470588235294117647058823
>>> > > >
>>> > > > 52941176470588235294117647058823529411764705882352941176470588235
>>> > > > 29
>>> > > > 411764705882352941176470588235294
>>> > > >
>>> > > > 11764705882352941176470588235294117647058823529411764705882352941
>>> > > > 17
>>> > > > 647058823529411764705882352941176
>>> > > >
>>> > > > 47058823529411764705882352941176470588235294117647058823529411764
>>> > > > 70
>>> > > > 588235294117647058823529411764705
>>> > > >
>>> > > > 88235294117647058823529411764705882352941176470588235294117647058
>>> > > > 82
>>> > > > 352941176470588235294117647058823
>>> > > >
>>> > > > 52941176470588235294117647058823529411764705882352941176470588235
>>> > > > 29
>>> > > > 411764705882352941176470588235294
>>> > > >
>>> > > > 11764705882352941176470588235294117647058823529411764705882352941
>>> > > > 17
>>> > > > 647058823529411764705882352941176
>>> > > >
>>> > > > 47058823529411764705882352941176470588235294117647058823529411764
>>> > > > 70
>>> > > > 588235294117647058823529411764705
>>> > > >
>>> > > > 88235294117647058823529411764705882352941176470588235294117647058
>>> > > > 82
>>> > > > 352941176470588235294117647058823
>>> > > > 53
>>> > > >
>>> > > >    _16 ]\ 3}. 0j1000 ": 1r17
>>> > > > 5882352941176470
>>> > > > 5882352941176470
>>> > > > 5882352941176470
>>> > > > 5882352941176470
>>> > > > 5882352941176470
>>> > > > 5882352941176470
>>> > > > 5882352941176470
>>> > > > 5882352941176470
>>> > > > 5882352941176470
>>> > > > 5882352941176470
>>> > > > 5882352941176470
>>> > > > 5882352941176470
>>> > > > 5882352941176470
>>> > > > 5882352941176470
>>> > > > 5882352941176470
>>> > > > 5882352941176470
>>> > > > 5882352941176470
>>> > > > 5882352941176470
>>> > > > 5882352941176470
>>> > > > 5882352941176470
>>> > > > 5882352941176470
>>> > > > 5882352941176470
>>> > > > 5882352941176470
>>> > > > 5882352941176470
>>> > > > 5882352941176470
>>> > > > 5882352941176470
>>> > > > 5882352941176470
>>> > > > 5882352941176470
>>> > > > 5882352941176470
>>> > > > 5882352941176470
>>> > > > 5882352941176470
>>> > > > 5882352941176470
>>> > > > 5882352941176470
>>> > > > 5882352941176470
>>> > > > 5882352941176470
>>> > > > 5882352941176470
>>> > > > 5882352941176470
>>> > > > 5882352941176470
>>> > > > 5882352941176470
>>> > > > 5882352941176470
>>> > > > 5882352941176470
>>> > > > 5882352941176470
>>> > > > 5882352941176470
>>> > > > 5882352941176470
>>> > > > 5882352941176470
>>> > > > 5882352941176470
>>> > > > 5882352941176470
>>> > > > 5882352941176470
>>> > > > 5882352941176470
>>> > > > 5882352941176470
>>> > > > 5882352941176470
>>> > > > 5882352941176470
>>> > > > 5882352941176470
>>> > > > 5882352941176470
>>> > > > 5882352941176470
>>> > > > 5882352941176470
>>> > > > 5882352941176470
>>> > > > 5882352941176470
>>> > > > 5882352941176470
>>> > > > 5882352941176470
>>> > > > 5882352941176470
>>> > > > 5882352941176470
>>> > > > 5882353
>>> > > >
>>> > > >
>>> > > > On Sat, Jan 11, 2020 at 4:31 PM Skip Cave <
>>> > > > [email protected]>
>>> > > > wrote:
>>> > > >
>>> > > > > How can I use J get the decimal expansion of the rational
>>> > > > > number
>>> > > > > 1r17 to
>>> > > > > 100 digits? 1000 digits?
>>> > > > >
>>> > > > > Skip
>>> > > > >
>>> > > > >
>>> > > > > Skip Cave
>>> > > > > Cave Consulting LLC
>>> > > > > ---------------------------------------------------------------
>>> > > > > -------
>>> > > > > For information about J forums see
>>> > > > > http://www.jsoftware.com/forums.htm
>>> > > > >
>>> > > > -----------------------------------------------------------------
>>> > > > -----
>>> > > > For information about J forums see
>>> > > > http://www.jsoftware.com/forums.htm
>>> > > >
>>> > > -------------------------------------------------------------------
>>> > > ---
>>> > > For information about J forums see
>>> > > http://www.jsoftware.com/forums.htm
>>> >
>>> > -------------------------------------------------------------------
>>> > ---
>>> > For information about J forums see
>>> > http://www.jsoftware.com/forums.htm
>>>
>>> ----------------------------------------------------------------------
>>> For information about J forums see http://www.jsoftware.com/forums.htm
>>>
>>
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to