[seqfan] not all prime

Douglas McNeil mcneil at hku.hk
Tue Aug 17 07:13:25 CEST 2010


So one of the (almost) duplicate sequences, one which had a 3381 where
there should have been a 4481, got me to wondering: how many sequences
are supposed to be all primes but accidentally include composites
because of typos or bugs?  Simplest way to find them was to scan for
sequences which are mostly prime and check the exceptions.  Found a
few problems, even after tossing away anything difficult to interpret:
at least 37 sequences have nonprimes where there should be primes, and
another 8 seem suspicious to me but I'm not entirely sure I understand
the definitions.  Say I'm only half right or so, that makes ~40.

Some are just carelessness:

161423 Primes in A161420.
[3, 5, 7, 11, 19, 31, 39, 59, 79, 127]
[(6, 39, False)]

104149 Largest prime < n^3.
[7, 23, 61, 121, 211, 337, 509, 727, 997]
[(3, 121, False)]

Some are due to misplaced commas:

158473 Primes whose digit sum contains one or more digits of the same prime.
[2, 3, 5, 7, 19, 109, 127, 137, 139, 149, 157, 163, 167, 173, 179,
181, 191, 193, 197
, 199, 271, 281, 2, 83, 307, 317, 337, 347, 367, 373, 379, 397, 419,
461, 463, 467, 4
91, 541, 557, 571, 613, 617, 619, 6, 31, 641, 643, 647, 661, 673, 691,
719, 733, 739,
 743, 751]
[(43, 6, False)]

Some are truncation errors from entering really long numbers:

104119 Primes of the form 6^n + 23.
[29, 59, 239, 1319, 46679, 60466199, 101559956668439,
170581728179578208279, 29324206
7884135544935936513642647623193965101079,
3950367887263302342052194671146614399477534
61347507325027807810991640951880679]
[(9, 395036788726330234205219467114661439947753461347507325027807810991640951880679,
False)]

and some I can't understand at all unless the sequence was being
computed by hand.

Anyway, I'll add these to my pile of pending corrections for after the
Wiki descends.  Bulk processing of sequences can be really useful,
especially for low-traffic sequences..  If should-be-prime (or
multiplicative, or additive, or whatever) sequences are tagged with
the right Category on the Wiki then we can automate the verification
in a much easier way, and dump failures to a "problem sequences" log
for human intervention.  I can already check many formulae and
generating functions (some errors there in my pending file), and
though I haven't coded this yet it'd be nice to verify all of the
intersequence relationships to look for both errors and missing terms
that are known from another seq.


Doug

-- 
Department of Earth Sciences
University of Hong Kong




More information about the SeqFan mailing list