Opened 2 years ago

Closed 2 years ago

#28627 closed enhancement (fixed)

Lazy OEIS sequences

Reported by: tmonteil Owned by:
Priority: major Milestone: sage-9.0
Component: combinatorics Keywords:
Cc: chapoton, moritz, vdelecroix, slabbe Merged in:
Authors: Thierry Monteil Reviewers: Sébastien Labbé
Report Upstream: N/A Work issues:
Branch: ecd06dd (Commits, GitHub, GitLab) Commit: ecd06dd657ce0f97145af394fb2724565751f0fc
Dependencies: Stopgaps:

Status badges


We make the OEISSequences be (uniquely) defined as long as their ID (A-number) is known, and connect to the internet as late as possible.

Change History (9)

comment:1 Changed 2 years ago by tmonteil

  • Branch set to u/tmonteil/lazy_oeis_sequences

comment:2 Changed 2 years ago by tmonteil

  • Commit set to 446af9801c51e8b9d20cd5176bad6d9d494e57ce
  • Status changed from new to needs_review

New commits:

13bc675#28627 : lazy creation of OEIS sequences based only on their A-number
203f63e#28627 : different imaginary sequences must have different A-numbers
0ce1c0b#28627 : dedicated handling of dead sequences
afa2833#28627 : replace obsolete warning with a note
446af98#28627 : examples are intended for humans

comment:3 Changed 2 years ago by tmonteil

I tried to cut the changes into meaningful commits, however the block

+        TESTS::
+        sage: s = oeis._imaginary_sequence(ident='A004238')
+        sage: s
+        A004238: The characteristic sequence of 42 plus one, starting from 38.
+        sage: s.online_update()                         # optional -- internet
+        sage: s                                         # optional -- internet
+        A004238: a(n) = 100*log(n) rounded to nearest integer.

should appear in the second commit, not the first, since at this stage ident parameter is not defined for imaginary sequences.

You should test the whole branch, the commits are made to ease human review.

comment:4 Changed 2 years ago by tmonteil

  • Status changed from needs_review to needs_work

Patchbot complains about doctest coverage regression.

comment:5 Changed 2 years ago by git

  • Commit changed from 446af9801c51e8b9d20cd5176bad6d9d494e57ce to ecd06dd657ce0f97145af394fb2724565751f0fc

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

ecd06dd#28627 : fix coverage regression

comment:6 Changed 2 years ago by tmonteil

  • Status changed from needs_work to needs_review

comment:7 Changed 2 years ago by tmonteil

  • Cc chapoton moritz vdelecroix slabbe added

If some of the people who already handled oeis code could have a look, it will allow to move forward.

comment:8 Changed 2 years ago by slabbe

  • Reviewers set to Sébastien Labbé
  • Status changed from needs_review to positive_review

Works for me. All tests passed related to oeis.

comment:9 Changed 2 years ago by vbraun

  • Branch changed from u/tmonteil/lazy_oeis_sequences to ecd06dd657ce0f97145af394fb2724565751f0fc
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.