# [seqfan] on fox hunting

Douglas McNeil mcneil at hku.hk
Fri Aug 20 05:08:53 CEST 2010

```Jeremy Gardiner wrote:

> Thinking about novel ways to spot patterns in sequences, I tried mapping
> a(n) mod 27 (ignoring zero) 1->a, 2->b, ..., 26->z and searching for
> interesting substrings.

This suggested yet another method for finding questionable sequences
in the OEIS: look for ones with almost-but-not-quite periodic
residues.  (Everything seems to suggest that to me this week.  Whoever
said "maybe we should do another duplicate search" started the whole
thing..  Don't worry; I'm sure the feeling will pass.)

To make life easy let's start with residue sequences that are constant
but-for-one-term.  Unfortunately there are many false positives, but
-- even more unfortunately? -- there are also lots of detections.
Some characteristic examples, adventures in typos:

A165758
http://oeis.org/classic/?q=id%3AA165758
# a(n)=(12-7*6^n)/5.
original: [1, -6, -48, -300, -1812, -10884, -65316, -391908, -2351460,
-14108772, -84652644, -507915876, -3047495268, -18284971620,
-109709829732, -658258978404, -3949553870436, -23697323223628,
-142183939335780, -853103636014692]
mod 7 : [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1]
weird: index 17 value -23697323223628 = 2 mod 7

The real value is -23697323222628.  Too many similar digits, probably.

A145976
http://oeis.org/classic/?q=id%3AA145976
# Expansion of 1/(1-x(1-7x)).
original: [1, 1, -6, -13, 29, 120, -83, -923, -342, 6119, 8513,
-34320, -93911, 146329, 803706, -220597, -5846539, -4302360, 36623413,
66739933, -189623958, -6566883489, 670564217, 5268188640, 574239121,
-36303081359, -40322755206, 213798814307]
mod 7 : [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 2, 1, 1, 1, 1, 1, 1]
weird: index 21 value -6566883489 = 2 mod 7

actually -656803489; duplication of a 6.

Some pop up at the end of sequences:

A112532
http://oeis.org/classic/?q=id%3AA112532
# First differences of [0, A047970].
original: [1, 1, 3, 9, 29, 101, 379, 1525, 6549, 29889, 144419,
736241, 3947725, 22201549, 130624587, 802180701, 5131183301,
34121977865, 235486915507, 1683925343929, 12458499203901,
95237603403381, 751291094637083, 6108883628141180]
mod 2 : [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0]
weird: index 23 value 6108883628141180 = 0 mod 2

where he may have hit 0 instead of 9: 6108883628141189.  (Don't know
if the original sequence is right, of course.)

Recursions:

A154999
http://oeis.org/classic/?q=id%3AA154999
# a(n)=7*a(n-1)+42*a(n-2), n>2 ; a(0)=1, a(1)=1, a(2)=13 .
original: [1, 1, 13, 133, 1477, 15925, 173509, 1883413, 20471269,
2224022229, 2416608901, 26257155925, 285297665317, 3099884206069,
33681691385797, 365966976355477, 3976399872691813, 43205412115772725,
469446679463465221]
mod 12 : [1, 1, 1, 1, 1, 1, 1, 1, 1, 9, 1, 1, 1, 1, 1, 1, 1, 1, 1]
weird: index 9 value 2224022229 = 9 mod 12

(222402229)

It even picked up another comma problem:

A098780
http://oeis.org/classic/?q=id%3AA098780
# First n numbers in binary representation concatenated in reverse order.
original: [1, 5, 29, 157, 1437, 13725, 128413, 1176989, 20051357,
355595677, 6261175709, 109340390813, 1896046785949, 32682372363677,
560447953696157, 95676472084371, 49, 315812421869630877,
10692105963331253661]
mod 4 : [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1]
weird: index 15 value 95676472084371 = 3 mod 4

Generating functions aren't immune:

A094911
http://oeis.org/classic/?q=id%3AA094911
# E.g.f.: exp(7x)/(1-7x)^(1/7).
original: [1, 8, 71, 778, 12125, 284012, 9241891, 378595022,
18409947641, 1029837400400, 64998958518719, 4565303338264082,
353016345110857429, 29793105387299603252, 2724646021507044539675,
268374407984059193374678]
mod 7 : [1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 1, 1, 1]
weird: index 9 value 1029837400400 = 4 mod 7

(should be 1029827400400)

And so on:

A030522
http://oeis.org/classic/?q=id%3AA030522
# Product of first n palindromic primes minus 1.
original: [1, 5, 29, 209, 2309, 233309, 30563611, 4615105109,
835334024909, 159548798757809, 49938774011194529,
17628387225951669089, 6575388435279972570569,
2518373770712229494528309]
mod 4 : [1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1]
weird: index 6 value 30563611 = 3 mod 4

30563609: not a typo, exactly, the author probably was computing them
term by term and typed +1 instead of -1.

Finally, and kind of frighteningly, even simple sequences with working
Maple programs (!) can have problems in the middle of them:

A166743
http://oeis.org/classic/?q=id%3AA166743
# a(n) = (2^p-p^2-1)/6 where p = prime(n).
original: [1, 13, 321, 1337, 21797, 87321, 1398013, 89478345,
357913781, 22906492017, 366503875645, 1466015503393, 23456248058853,
1501199875789698, 96076792050570001, 384307168202281705,
24595658764946068073]
mod 4 : [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1]
weird: index 13 value 1501199875789698 = 2 mod 4

which should be 1501199875789697.

And so on.  Some of these can be caught by formula/g.f. eval tricks,
but not others.  I figure my (rather major!) cull has about 75
detectable errors of this kind in it, extrapolating from the ones I've
found so far, where "detectable" means I throw out anything that can't
be coded up in less than a minute.

Even if running a full superseeker-style study on every candidate
sequence is too much, I think we could at least have a button on the
wiki that produces a short report on various quick-to-compute
properties of the sequence, including the most suspicious ones.  (And
yes, "we could" translates as "I'm willing to contribute to").  Minor
errors are simply too easy to make.

Doug

--
Department of Earth Sciences
University of Hong Kong

```