Fwd: Sequence generating idea

Maximilian Hasler maximilian.hasler at gmail.com
Mon Mar 31 14:53:35 CEST 2008


Dear Max, dear Seqfans,

only following Max's mail I noticed the copy to SeqFans of my reply
had been rejected
since I sent it with a "From" address not on the list, and the server
does not use
the "Reply-To" address to send the error message...
Here I send it again.
Maximilian

---------- Forwarded message ----------
From: Maximilian Hasler <Maximilian.Hasler at martinique.univ-ag.fr>
Date: Sat, Mar 29, 2008 at 12:37 AM
Subject: Re: Sequence generating idea
To: David Wilson <davidwwilson at comcast.net>
Cc: Sequence Fans <seqfan at ext.jussieu.fr>


>  Let S be a set of integers.  Let S+n = {S+n : n in S}

 this is not very clear. the two occurrences of S+n are not the same ?

 { S+n : n in S } would be a set of sets,
 moreover, n is "bound" outside .
 do you mean : S+n = { s+n, s in S } ? (std. definition)

 >  n = 0;
 (not needed, comes below in "for...")


 >  T = empty set;
 >  a = empty sequence;
 >  for (n = 0 to inf by 1) {

 >   if ( T intersect S+n = empty set ) {

 this is equivalent to :
 n not in T-S where T-S = { t-s ; t in T, s in S }


 >   T = T union S+n;
 >   Append n to a;
 >   }
 >  }

 >  What is a if S = primes? squares? cubes? powers of 2? any other ideas?

 at the 1st step (n=0), T:=S.
 Then the condition is : n=1 not in S-S
 i.e. 1 cannot be written as difference of 2 elements.
 for the primes this is not the case (1=3-2), so T is not changed ;
 same for 2^k (1 = 2^1 - 2^0).
 for powers (x^2 , x^3 or x^k...) it depends if you include the power of 0,
 then 1 = 1^k - 0^k and T is not changed either.
 Else, T := S u S+1, now contains also 1 and more generally 1+S-S and S-S-1.

 at the next step, n=2 not in S - S ?
 In this case, elements of S+2 are added.
 For primes, 2 is the difference of any twin primes, S+2 is not added
 3=5-2, 4=11-7, 5=7-2, 6=11-5 so S+3,4,5,6,7 are not added
 7 is not the difference of any primes (since 2+7 is not prime and any
 difference of odd primes is even) so S+7 (= { primes+7} ) is added
 The new set contains so many even integers that I conjecture that all
 other integers n>7 can be written as difference of two elements.
 In other words:
 for S=primes, a = {0,7}.
 for S=squares, a={0,2} if 0^2 is considered as square, a={0,1,2} else.
 for S=cubes, the a-sequence seems to be infinite and not in OEIS
 * including 0: a=0,2,4,6,15,17,20,35,38,40,49,51,53,55,85,87,89... (?)
 * including 1: a=0,1,2,3,4,5,6,14,15,16,17,18,45,46,47,48,49,50... (?)
 for S=powers of 2,
 a=0,5,10,23,43,52,77,88,97... again seems infinite and not in OEIS

 PARI:
 DW(S /* given as vector */) = { local( T=Set(S), d=vector(#S,i,1),
 a=[print1(0",")] );
 for( n=1,999,
  setintersect( T, Set( S+=d )) & next;
  T=setunion( T, S ); a=concat(a,n); print1(n","))}

 gp> DW(vector(500,i,prime(i)));
 0,7,
 gp> DW(vector(500,i,i^2));
 0,1,2,
 gp> DW(vector(500,i,(i-1)^2));
 0,2,
 gp> DW(vector(500,i,(i-1)^3))
 0,2,4,6,15,17,20,35,38,40,49,51,53,55,85,87,89,120,135,188,194,197,200,280,282,284,323,329,361,372,374,376,419,423,
  *** setintersect: user interrupt after 2,453 ms.
 gp> DW(vector(500,i,(i)^3))
 0,1,2,3,4,5,6,14,15,16,17,18,45,46,47,48,49,50,88,89,90,159,160,161,182,227,228,244,248,249,269,
  *** setintersect: user interrupt after 1,766 ms.
 gp> DW(vector(500,i,2^(i-1)))
 0,5,10,23,43,52,77,88,97,110,123,146,156,165,175,198,211,
  *** for: user interrupt after 1,390 ms.

 Maximilian
 PS: the printed lists above may not be complete up to all given
 elements, but probably the first 20 elements or so at least are ok.



Dear SeqFans,

With Internet Explorer 5.1 for Mac, you can "subscribe" to any Web page.
When you subscribe to a page, IE monitors the page and notifies you when the
page is updated.

Subscribing to OEIS pages should be a useful way to monitor them for
changes. However, when I subscribe to the page of a sequence, IE notifies me
every day that it has changed, even when it has (apparently) not changed.

Can anyone explain this and/or suggest a fix?

Thanks,
Jonathan





js> From seqfan-owner at ext.jussieu.fr  Mon Mar 31 16:01:00 2008
js> Date: Mon, 31 Mar 2008 10:02:57 -0500
js> Subject: "Subscribing" to an OEIS page
js> From: Jonathan Sondow <jsondow at alumni.princeton.edu>
js> To: SeqFans <seqfan at ext.jussieu.fr>
js> 
js> Dear SeqFans,
js> 
js> With Internet Explorer 5.1 for Mac, you can "subscribe" to any Web page.
js> When you subscribe to a page, IE monitors the page and notifies you when the
js> page is updated.
js> 
js> Subscribing to OEIS pages should be a useful way to monitor them for
js> changes. However, when I subscribe to the page of a sequence, IE notifies me
js> every day that it has changed, even when it has (apparently) not changed.
js> 
js> Can anyone explain this and/or suggest a fix?
js> 
js> Thanks,
js> Jonathan

If this subscription is to an URL of the format
http://research.att.com/~njas/sequences/Axxxxxx
then this web page contains a bottom line similar to
"..Last modified March 31 ... EDT ..... Contains xxxxx sequences".
If IE compares web pages on a simple textual basis, the web page indeed
changes about once a day when it is re-written some-when at 3 a.m. EDT.
In that sense, IE is expected to say that it changed.

RJM





More information about the SeqFan mailing list