(49G & 38G & Prime) OEIS A111138: No Short Description +- HP Forums (https://www.hpmuseum.org/forum) +-- Forum: HP Software Libraries (/forum-10.html) +--- Forum: General Software Library (/forum-13.html) +--- Thread: (49G & 38G & Prime) OEIS A111138: No Short Description (/thread-9514.html) |
(49G & 38G & Prime) OEIS A111138: No Short Description - Gerald H - 11-17-2017 04:35 AM For natural number input N the programme below returns the Nth element of the series https://oeis.org/A111138 described as "For a subgroup H of order p^n (p an odd prime) of the subgroup generated by all commutators [x_j,x_i] in the relatively free group F of class three and exponent p, freely generated by x_1, x_2,..., x_k, (k sufficiently large) the minimum size of the subgroup of [H,F] of F_3 is p^{kn - a(n)}. The sequence arises when finding a purely numerical sufficient condition for the capability of p-groups of class two and exponent p, where p is an odd prime." Whatever you make of the description, the programme below is fairly simple but slow. Could everyone please try to find a faster programme &/or a better algorithm? The sub-programme ID ISQRT is here http://www.hpmuseum.org/forum/thread-3837.html?highlight=square+root Size: 179.5 CkSum: # 36635d Code: :: RE: (49G) OEIS A111138: No Short Description - Arno K - 11-18-2017 09:04 AM I made an algorithm by myself, my apologies if it is similar to yours (I hope not as you don't seem to use a root), my capabilities in reading sysrpl are limited, the program is for the prime and a MAKELIST(A111138(x),x,1,64) provides exactly the same list as in OEIS, it is quite fast and the algorithm is visible (one of the reasons for which I put my 50g into a drawer). Code: #cas RE: (49G) OEIS A111138: No Short Description - Gerald H - 11-18-2017 09:52 AM Congratulations, Arno K, a very nice programme for which you should certainly not apologize. Here a programme for the 38G. The complications with the IFTE structures are due to the COMB function in the 38G returning an error for COMB(a,b) if a<b, whereas the Prime returns 0. A111138P Code: Ans►N: RE: (49G) OEIS A111138: No Short Description - Gerald H - 11-18-2017 10:40 AM On the 49G the 38G programme works nicely as: Code: « DUPDUP 2. * √ 0. Fortunately, from the 49G on, for a<b COMB(a,b) returns 0 rather than an error. 42S & 48G return error. RE: (49G) OEIS A111138: No Short Description - Gerald H - 11-18-2017 11:13 AM Here a SysRPL version of the programme above. ID SQRT0 finds the closest integer square root & is available here http://www.hpmuseum.org/forum/thread-8992.html?highlight=square+root PTR 2EF19 is internal COMB, same address since 1.19-6. Size: 77. CkSum: # 6728h Code: :: RE: (49G) OEIS A111138: No Short Description - Gerald H - 11-18-2017 11:28 AM And here a programme to insert symbolics in the Sequence App of the 38G to produce the series: Code: RECURSE(U,IFTE(U3(N)>1,COMB(U3(N),2),0)+IFTE(U2(N)>2,COMB(U2(N),3),0),0,0)►U1(N): RE: (49G & 38G & Prime) OEIS A111138: No Short Description - Gerald H - 11-19-2017 03:25 AM Another programme for the 38G using the COMB0 programme available here http://www.hpmuseum.org/forum/thread-9530.html Code: Ans►N: RE: (49G & 38G & Prime) OEIS A111138: No Short Description - John Keith - 07-05-2019 08:57 AM My apologies for bringing up an old thread, but I was looking at the OEIS page and i was struck by the last comment: "Partial sums of A002262." This inspired the following program which returns a list of the first T(n) terms, where T(n) is the nth triangular number. It is reasonably fast: an input of 45 returns the first 1035 terms in about 4.14 seconds on my HP 50. The program requires the ListExt and GoferLists libraries. It could be rewritten without them but the program would be longer and slower. Code:
|