[seqfan] Re: A055387
Tom Duff
eigenvectors at gmail.com
Wed Jan 18 17:11:07 CET 2023
In cases like this, where it's pretty clear that the data is wrong (because
there's no coherent description that makes the data right), I believe the
standard way to deal with it is not to delete the sequence or change the
data (because maybe in the past someone wrote or did something that refers
to it), but to add the keyword "dead" and a reference to another sequence
that corrects the data. The OEIS is an archive, and the first principle of
archives is permanence.
On Wed, Jan 18, 2023 at 6:13 AM Allan Wechsler <acwacw at gmail.com> wrote:
> In situations like this, OEIS tradition is to respect the primacy of the
> data. That is, in a situation where we know that either the description or
> the data is wrong (because the description does not correctly describe the
> data), editors tend to correct the description rather than the data.
>
> This leads us to wonder what description could give rise to the data in
> A055387. I think that the given description works *except *for the fact
> that primes consisting of all the same digit (like 2, 3, 5, 7, and 11) get
> a free pass. That is, if a prime can be permuted into a different prime, we
> include it; and if it cannot be permuted at all we also include it.
>
> The verbiage about 0 seems almost unnecessary to me. All it means is that
> one is allowed to permute 0s to the most-significant end. That's what I
> would have assumed even if nothing had been said about it.
>
> On Tue, Jan 17, 2023 at 9:56 PM Sean A. Irvine <sairvin at gmail.com> wrote:
>
> > But isn't that exactly what A225035 is ?
> >
> > On Wed, 18 Jan 2023 at 15:38, Arthur O'Dwyer <arthur.j.odwyer at gmail.com>
> > wrote:
> >
> > > On Tue, Jan 17, 2023 at 5:16 PM <israel at math.ubc.ca> wrote:
> > >
> > > > A055387 is "Prime numbers such that some permutation (possibly
> omitting
> > > > zeros) of digits is a prime." Well, the identity permutation of the
> > > digits
> > > > of a prime is always a prime, so maybe it means nontrivial
> permutation.
> > > > But
> > > > no: the Data starts with 2, 3, 5, 7, 11, which have no nontrivial
> > > > permutations of the digits. Should we perhaps remove those terms?
> > > >
> > >
> > > Yes. (I agree with your reasoning.) And suggest adding the word
> "other":
> > > "some *other* permutation of their digits (possibly omitting leading
> > > zeroes) is a prime."
> > >
> > >
> > > > Also, is it any zeros that can be omitted, or leading zeros?
> > >
> > >
> > > It is permitted to permute "101" into "011" and then drop the leading
> > zero.
> > > We know this because "101" is in the sequence, and the only
> permutations
> > of
> > > those digits that exist are "101" (identity permutation), "110" (not
> > > prime), and "011".
> > > I don't know what it would mean to "drop *non*-leading zeroes" from a
> > > digit-string that *is already a free permutation* of the input string!
> > Just
> > > permute the digits a little more to get the zero to the front, and then
> > > drop it.
> > >
> > > Alternatively, one could imagine *adding* a leading zero before
> permuting
> > > the digits of "(0)11" to produce "101"; under that interpretation "11"
> > > should remain in the sequence. But that logic is both (1) ugly and (2)
> > > insufficient to explain why the OP put "2, 3, 5, 7" in the sequence
> also.
> > >
> > >
> > > Here's a small Python program that could be added to the entry. It
> > > generates the expected output:
> > >
> > > [13, 17, 31, 37, 71, 73, 79, 97, 101, 103, 107, 109, 113, 127, 131,
> 137,
> > > 139, 149, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 239, 241,
> > 251,
> > > 271, 277, 281, 283, 293, 307, 311, 313, 317, 331, 337, 347, 349, 359,
> > 367,
> > > 373, 379, 389, 397].
> > >
> > > def is_a055387(x):
> > >
> > > if sympy.isprime(x):
> > >
> > > for perm in itertools.permutations(str(x)):
> > >
> > > p = int(''.join(perm))
> > >
> > > if (p != x) and sympy.isprime(p):
> > >
> > > return True
> > >
> > > return False
> > >
> > >
> > > print([x for x in range(400) if is_a055387(x)])
> > >
> > > --
> > > Seqfan Mailing list - http://list.seqfan.eu/
> > >
> >
> > --
> > Seqfan Mailing list - http://list.seqfan.eu/
> >
>
> --
> Seqfan Mailing list - http://list.seqfan.eu/
>
More information about the SeqFan
mailing list