searching for +/-1 sequences

Hugo Pfoertner all at abouthugo.de
Mon Mar 27 22:29:55 CEST 2006


"Eric W. Weisstein" wrote:
> 
> Perhaps a dumb question, but how do I search OEIS for sequences containing
> a given sequence of +1 and -1s?  If I use superseeker, it matches every
> sequence in which the *absolute value* of the terms is 1.  If I try to do
> a word search on OEIS including minus signs (e.g., "-1,-1") I get no hits.
> If I just search for 1,1,1,1,1,..., I get a maximum of 30 hits, so I have
> no guarantee that just because I don't *see* my sequence in the 30
> returned, mine isn't #31.
> 
> Concrete example: is the following sequence in OEIS or not (it arises from
> Gauss's generalization of Wilson's theorem)?
> 
> -1, -1, -1, -1, -1, -1, 1, -1, -1, -1, 1, -1, -1, 1, 1, -1, -1, -1, 1, 1,
> -1, -1, 1, -1, -1, -1, 1, -1, 1, -1, 1, 1, -1, 1, 1, -1, -1, 1, 1, -1, 1,
> -1, 1, 1, -1, -1, 1, -1, -1, 1, 1, -1, -1, 1, 1, 1, -1, -1, 1, -1, -1, 1,
> 1, 1, 1, -1, 1, 1, 1, -1, 1, -1, -1, 1, 1, 1, 1, -1, 1, -1, -1, -1, 1, 1,
> -1, 1, 1, -1, 1, 1, 1, 1, -1, 1, 1, -1, -1, 1, 1
> 
> If it is, how do I actually find that out besides downloading the entire
> database and searching it myself?  I checked but didn't see this in the
> FAQ.
> 
> Cheers,
> -Eric

I see no other chance than to use the "local full sequence search mode"
on the ~=100MB (another 100x event to celebrate!) concateneted OEIS
file, which is my favorite mode for long Trans-Atlantic flights. One of
the advantages having GByte memory even in a laptop is to enter the
search string "-1,-1,-1,-1,-1,-1,1,-1,-1,-1,1," and find within a
second:

%V A103131
0,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,1,1,-1,-1,-1,1,1,-1,-1,1,-1,-1,-1,1,-1,1,-1,1,
%W A103131
1,-1,1,1,-1,-1,1,1,-1,1,-1,1,1,-1,-1,1,-1,-1,1,1,-1,-1,1,1,1,-1,-1,1,-1,-1,1,1,1,1,-1,
%X A103131
1,1,1,-1,1,-1,-1,1,1,1,1,-1,1,-1,-1,-1,1,1,-1,1,1,-1,1,1,1,1,-1,1,1,-1,-1,1,1,-1,1
%N A103131 Minimal residue of A001783(n) (mod n).
%H A103131 Eric Weisstein's World of Mathematics, <a
href="http://mathworld.wolfram.com/Wilsonstheorem.html">Wilson's
theorem</a>
%Y A103131 Cf. A001783.
%Y A103131 Adjacent sequences: A103128 A103129 A103130 this_sequence
A103132 A103133 A103134
%Y A103131 Sequence in context: A011630 A011631 A070238 this_sequence
A057427 A057428 A062157
%K A103131 sign
%O A103131 1,1
%A A103131 E. W. Weisstein (eric(AT)weisstein.com), Jan 23, 2005

Hugo Pfoertner





More information about the SeqFan mailing list