[seqfan] Re: Resurrect A090566?

David Wilson davidwwilson at comcast.net
Sun Nov 22 20:31:10 CET 2015


RWG:

Indeed, I did not correctly transcribe my algorithm. Try this one:

x = a(n);
d = number of digits in x;
p = (10^d + 1)*x = x concatenated with x.
q = (floor(sqrt(p)) + 1)^2 = smallest square > p;
If (q < (10^d)(x + 1))
	a(n+1) = q mod (10^d) = last d digits of q.
else
	p = (10^d)*(10x+1) = x concatenated with 10^d;
	q =  (floor(sqrt(p)) + 1)^2 = smallest square > p;
	a(n+1) = q mod (10^(d+1)) = last d+1 digits of q.

> -----Original Message-----
> From: Robert G. Wilson v [mailto:rgwv at rgwv.com]
> Sent: Sunday, November 22, 2015 1:28 PM
> To: David Wilson
> Subject: RE: [seqfan] Re: Resurrect A090566?
> 
> Dear David,
> 
> 	Thank you for the reply. We are very close, but I cannot implement
> your algorithm successfully.
> 
> Example: a(2) = 6; p = 66; q = 81 and the number of digits is even so a(3) = 1?
> 
> Sincerely yours, Bob.
>
> [cascade elided]




More information about the SeqFan mailing list