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

David Wilson davidwwilson at comcast.net
Sun Aug 18 19:53:23 CEST 2013


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.
It requires arbitrary precision arithmetic, CRT and prime factorizations of
10^k+1.
Pf's of 10^k+1 can be found at (for instance)
http://gmplib.org/~tege/fac10p.txt.

for (k = 1 to whatever) // Until we don't have a pf for 10^k+1.
{
	t = 10^k+1;
	for (each divisor x of t) // Divisors computed from pf of 10^k+1.
	{
		y = t/x;
		if (gcd(x, y) != 1) continue; // Skip this x.

		Obtain smallest z >= 0 with x | z, y | z+1;  // Use CRT
		for (; ; z += t)
		{
			p = z*(z+1)/t;
			q = p - z;
			if (q >= t) break; // Break inner loop, we are done
with this x.

			if (q >= 0) output p*t+q; // We have a solution
			
			q = p + z + 1;
			if (q < t) output p*t+q; // We have another solution
		}
	}
}

> -----Original Message-----
> From: SeqFan [mailto:seqfan-bounces at list.seqfan.eu] On Behalf Of Hans
> Havermann
> Sent: Saturday, August 10, 2013 6:00 AM
> To: Sequence Fanatics Discussion list
> Subject: [seqfan] Re: Can more of these terms be found?
> 
> I have proposed A228103, based on (but expanded slightly from) what has
> been discussed in this thread:
> 
> Base-ten concatenations of p1 & p2 [p1'p2] equal to (p2-p1)^2.
> 
> 10'0
> 12'1
> 6'084
> 100'00
> 102'01
> 82'369
> 132'496
> 1000'000
> 1002'001
> 1162'084
> 120'1216
> 1656'369
> 1860'496
> 10000'0000
> 10002'0001
> 12312'1216
> 3306'21489
> 100000'00000
> 100002'00001
> 139672'21489
> 113322'449956
> 1000000'000000
> 1000002'000001
> 1786590'449956
> 743802'3471076
> 10000000'0000000
> 10000002'0000001
> 16198350'3471076
> 366292'019505049
> 5536332'29065744
> 674650'026648676
> 9553960'107298321
> 100000000'00000000
> 100000002'00000001
> 14611762'135490884
> 152595156'29065744
> 19605006'159622884
> 27553312'193545216
> 56530882'294293121
> 83263152'371816704
> 94674556'402366864
> 111333222'444999556
> .
> 
> I assume that the pairing up of p2 values will continue.
> 
> _______________________________________________
> 
> Seqfan Mailing list - http://list.seqfan.eu/




More information about the SeqFan mailing list