Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Take in the module OEIS the keyword 'dead' of sequences into account. #17330

Closed
PeterLuschny opened this issue Nov 12, 2014 · 18 comments
Closed

Comments

@PeterLuschny
Copy link

OEIS functions should simply ignore sequences with the
keyword 'dead'. At least they should not attempt to return
terms of these sequences.

For example the sequence A000017 https://oeis.org/A000017
is 'dead', what means it has errors in the data and was
replaced by another version. It is policy of the OEIS to
keep such sequences so they can be found in the case they
are referenced in the literature.

As it is now oeis(17).first_terms(12) throws the TypeError:
You found a sign inconsistency, please contact OEIS

CC: @mo271

Component: misc

Keywords: OEIS

Author: Moritz Firsching

Branch/Commit: d416ecc

Reviewer: Vincent Delecroix

Issue created by migration from https://trac.sagemath.org/ticket/17330

@mo271
Copy link
Contributor

mo271 commented Mar 22, 2016

Commit: 8ea4b1a

@mo271
Copy link
Contributor

mo271 commented Mar 22, 2016

Branch: u/moritz/ticket/17330

@mo271
Copy link
Contributor

mo271 commented Mar 22, 2016

comment:1

Here is how this could be fixed (see git branch).

When doctesting this, I noticed the another bug:

**********************************************************************
File "src/sage/databases/oeis.py", line 845, in sage.databases.oeis.OEISSequence.keywords
Failed example:
    f.keywords()                          # optional -- internet
Expected:
    ('core', 'nonn', 'nice', 'easy', 'hear')
Got:
    ('core', 'nonn', 'nice', 'easy', 'hear', 'changed')
**********************************************************************

This is due to the fact that the keyword 'changed' is temporarily added, so this would go away after a while. I propose to change that example to a sequence that is not altered as often as the Fibonacci numbers (see commit)


New commits:

8ea4b1afirst try to fix 17330

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Mar 22, 2016

Changed commit from 8ea4b1a to 10c15fc

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Mar 22, 2016

Branch pushed to git repo; I updated commit sha1. New commits:

10c15fcsecond try to fix 17330

@mo271 mo271 modified the milestones: sage-6.4, sage-7.2 Mar 22, 2016
@videlec
Copy link
Contributor

videlec commented Mar 23, 2016

comment:5

You should put your full name in the "Authors" field.

@mo271
Copy link
Contributor

mo271 commented Mar 23, 2016

Author: Moritz Firsching

@mo271
Copy link
Contributor

mo271 commented Mar 23, 2016

comment:6

done

@videlec
Copy link
Contributor

videlec commented Mar 23, 2016

comment:7

The patch provided does not do what is in the description. Namely the dead sequences are not ignored!

I would add an explicit error message like

sage: oeis(17)
Traceback (most recent call last):
...
ValueError: this sequence is dead "A000017: Erroneous version of A032522."

Possibly, you could add an option to get it even if it is dead

sage: oeis(17, force=True)
A000017: Erroneous version of A032522.

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Mar 23, 2016

Branch pushed to git repo; I updated commit sha1. New commits:

d416eccadding a warning

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Mar 23, 2016

Changed commit from 10c15fc to d416ecc

@videlec
Copy link
Contributor

videlec commented Mar 23, 2016

comment:9

Better!

@videlec
Copy link
Contributor

videlec commented Mar 23, 2016

Reviewer: Vincent Delecroix

@mo271
Copy link
Contributor

mo271 commented Mar 23, 2016

Changed reviewer from Vincent Delecroix to none

@mo271
Copy link
Contributor

mo271 commented Mar 23, 2016

comment:10

Perhaps throwing an error is too much? I just pushed a version where you have a warning..

@videlec
Copy link
Contributor

videlec commented Mar 23, 2016

Reviewer: Vincent Delecroix

@videlec
Copy link
Contributor

videlec commented Mar 23, 2016

comment:11

yeap. this is fine. (I rewrote my name as a reviewer)

@vbraun
Copy link
Member

vbraun commented Mar 26, 2016

Changed branch from u/moritz/ticket/17330 to d416ecc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants