[seqfan] Re: Can more of these terms be found?

Hans Havermann gladhobo at teksavvy.com
Tue Aug 20 14:45:10 CEST 2013


David Wilson: "I believe the following algorithm (modulo errors) should efficiently generate solutions to A228103. For each k, it generates all solutions for which q has k digits..."

Thank you, David, for this. Previously in this thread I had opined that "if I take T.D. Noe's Mathematica formula for A006886 and change h = 10^k-1 to h = 10^k+1, I can generate many of the terms in my b-file. There are additional terms and missing ones as well, so that alteration is just a first step."

I had gone back to this formulation and noticed that the additional terms were proxies for the (non-powers-of-ten) missing ones. This allowed me to cheat my way into enumerating solutions using T.D. Noe's Mathematica code as a starting point:

I added powers-of-ten separately. (Both Kaprekar numbers < http://oeis.org/A006886 > and Giovanni Resta's sub-Kaprekars < http://oeis.org/A118936 > artificially (and unnecessarily) exclude powers-of-ten, so the true Kaprekar numbers are < http://oeis.org/A045913 >.) I discarded the incorrect proxies and generated their correct counterparts as follows: Excluding powers-of-ten and powers-of-ten-plus-one, each solution generates another one by prepending it with 100.. where the number of zeros needs to be determined. This is the "pairing up" which I had previously noticed. (I'm contemplating doing a list of solutions by pairs.)

I feel it important to mention that in my code (and I assume in David's as well) k-digit solutions are not (I think) strictly determined by the divisors of 10^k+1. Some are generated by the divisors of 10^(k+m)+1, for smallish m. As a result, any list up to and including some large k should be trimmed to allow for missing entries in the latter part of the list.

Up to k=128 (it is currently possible to go up to k=288) I generated 155599 terms which I trimmed to 150645 terms, effectively taking me back to k=120. I have the list < http://chesswanks.com/seq/a228103sqrt.txt > but be aware that it is 15 MB. Quite a few infinite-solution "families" can be picked out just by inspection. The squares (at 30 MB), showing the split with an apostrophe, are here: < http://chesswanks.com/seq/a228103.txt >. I'd be grateful of course if anyone implementing David's code (or their own) can point out errors.

Counting the number of solutions for n-digit squares (from n = 1 to n = 240) I have: 0, 0, 2, 1, 3, 1, 6, 0, 4, 0, 3, 1, 4, 0, 6, 1, 9, 12, 25, 0, 9, 5, 11, 2, 8, 2, 11, 10, 36, 49, 92, 9, 21, 6, 12, 3, 7, 3, 10, 9, 40, 35, 81, 9, 19, 13, 22, 4, 13, 9, 23, 12, 37, 32, 79, 7, 15, 9, 32, 43, 82, 6, 15, 34, 42, 108, 175, 3, 16, 16, 33, 25, 46, 7, 18, 22, 112, 196, 342, 6, 12, 6, 31, 47, 94, 29, 101, 284, 905, 1226, 2531, 5, 30, 39, 123, 149, 322, 14, 34, 69, 144, 78, 165, 0, 10, 11, 25, 48, 164, 157, 332, 17, 36, 22, 47, 14, 25, 7, 26, 19, 49, 13, 49, 143, 450, 625, 1275, 9, 25, 30, 95, 80, 158, 5, 41, 89, 277, 430, 1061, 613, 1270, 2, 11, 13, 38, 22, 90, 191, 492, 667, 1345, 164, 481, 620, 1295, 44, 98, 56, 162, 296, 766, 623, 1270, 9, 36, 53, 140, 92, 213, 77, 166, 25, 59, 73, 160, 18, 57, 137, 460, 628, 1284, 24, 43, 24, 60, 83, 163, 10, 31, 33, 96, 88, 168, 49, 136, 225, 908, 1244, 2554, 101, 230, 150, 518, 670, 1459, 554, 1649, 4537, 14315, 19813, 40531, 18, 63, 48, 143, 100, 258, 290, 913, 1310, 2772, 336, 751, 140, 349, 146, 471, 654, 1365, 182, 527, 1101, 3723, 4964, 10180, 11, 88, 89, 217, 121.

There are no solutions for n = 1, 2, 8, 10, 14, 20, 104. The maximum number of solutions in this range was for n = 211 with 40531.




More information about the SeqFan mailing list