NAME
Math::NumSeq::PolignacObstinate  odd integers not prime+2^k
SYNOPSIS
use Math::NumSeq::PolignacObstinate;
my $seq = Math::NumSeq::PolignacObstinate>new;
my ($i, $value) = $seq>next;
DESCRIPTION
This sequence is integers which cannot be represented as prime+2^k for an integer k. These are counterexamples to a conjecture by Prince de Polignac that every odd integer occurs as prime+2^k (and are called "obstinate" numbers by Andy Edwards).
1, 127, 149, 251, 331, 337, ...
For example 149 is obstinate because it cannot be written as prime+2^k. Working backwards, it can be seen that none of 1491, 1492, 1494, 1498, ... 149128 are primes.
A theorem by Erdos gives infinitely many such obstinate integers (in an arithmetic progression).
The value 3 is not in the sequence because it can be written prime+2^k, for prime=2 and k=0.
FUNCTIONS
See "FUNCTIONS" in Math::NumSeq for behaviour common to all sequence classes.
$seq = Math::NumSeq::PolignacObstinate>new ()

Create and return a new sequence object.
$bool = $seq>pred($value)

Return true if
$value
is obstinate, ie. that there's no$k >= 0
for which$value  2**$k
is a prime.This check requires prime testing up to
$value
and in the current code a hard limit of 2**32 is placed on the$value
to be checked, in the interests of not going into a nearinfinite loop.
SEE ALSO
Math::NumSeq, Math::NumSeq::Primes
Clifford Pickover, "The Grand Internet Obstinate Number Search"
LICENSE
Copyright 2010, 2011, 2012, 2013 Kevin Ryde
MathNumSeq is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version.
MathNumSeq is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with MathNumSeq. If not, see <http://www.gnu.org/licenses/>.