Opened 7 years ago
Closed 5 years ago
#17330 closed defect (fixed)
Take in the module OEIS the keyword 'dead' of sequences into account.
Reported by:  pluschny  Owned by:  

Priority:  major  Milestone:  sage7.2 
Component:  misc  Keywords:  OEIS 
Cc:  moritz  Merged in:  
Authors:  Moritz Firsching  Reviewers:  Vincent Delecroix 
Report Upstream:  N/A  Work issues:  
Branch:  d416ecc (Commits, GitHub, GitLab)  Commit:  d416ecc5b115a8b1f00b0290fe0ecf8325b72bc2 
Dependencies:  Stopgaps: 
Description
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
Change History (12)
comment:1 Changed 5 years ago by
 Branch set to u/moritz/ticket/17330
 Cc moritz added
 Commit set to 8ea4b1a1c8c29d8221e9a5d486ccc1f2c433271d
comment:2 Changed 5 years ago by
 Status changed from new to needs_review
comment:3 Changed 5 years ago by
 Commit changed from 8ea4b1a1c8c29d8221e9a5d486ccc1f2c433271d to 10c15fcd72e4dfe044e8bdc6112e00c160eb6faa
Branch pushed to git repo; I updated commit sha1. New commits:
10c15fc  second try to fix 17330

comment:4 Changed 5 years ago by
 Milestone changed from sage6.4 to sage7.2
comment:5 Changed 5 years ago by
You should put your full name in the "Authors" field.
comment:7 Changed 5 years ago by
 Status changed from needs_review to needs_info
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.
comment:8 Changed 5 years ago by
 Commit changed from 10c15fcd72e4dfe044e8bdc6112e00c160eb6faa to d416ecc5b115a8b1f00b0290fe0ecf8325b72bc2
Branch pushed to git repo; I updated commit sha1. New commits:
d416ecc  adding a warning

comment:9 Changed 5 years ago by
 Reviewers set to Vincent Delecroix
 Status changed from needs_info to positive_review
Better!
comment:10 Changed 5 years ago by
 Reviewers Vincent Delecroix deleted
Perhaps throwing an error is too much? I just pushed a version where you have a warning..
comment:11 Changed 5 years ago by
 Reviewers set to Vincent Delecroix
yeap. this is fine. (I rewrote my name as a reviewer)
comment:12 Changed 5 years ago by
 Branch changed from u/moritz/ticket/17330 to d416ecc5b115a8b1f00b0290fe0ecf8325b72bc2
 Resolution set to fixed
 Status changed from positive_review to closed
Here is how this could be fixed (see git branch).
When doctesting this, I noticed the another bug:
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:
first try to fix 17330