This site is supported by donations to The OEIS Foundation.
Talk:OEIS format for decimal representation of constants
Contents
About the current convention and suggested changes
(The origin of the following text is a copy of a message posted to the seqfan list on Dec 13 2010 by M. F. Hasler, with subsequently added comments and discussion in various places.)
Maybe the launch of the new OEIS is an occasion to renew the discussion about offsets for "cons" sequences (giving the decimal expansion of constants).
I find the current convention rather confusing, e.g. for γ = 0.577...., one has a(0)=5, a(-1)=7, ... cf. http://oeis.org/A001620
- I do not think this interpretation of a(-1)=7 is correct. The b-file uses a(1)=7, and all other b-files of constants are probably also using increasing indices. So the only change proposed below is to change all offsets and/or indices, not the orientation of the indexing.
- The current indexing is obviously based on Fortran-style notation and the generic rule of "append 10 to the power of the offset." People with some sense of history of notation will find the current style very clear. User:R. J. Mathar, 13 Dec 2010
- It's not my interpretation, see e.g. http://oeis.org/A001620/list : For every "cons" sequence, the indices are decreasing (which creates even more confusion when this kw is added to some which aren't "fundamentally" constants, as, e.g., http://oeis.org/A000012/list = 1,1,1,1...). If the contributors don't use that in their b-file, that's just showing how much this convention is confusing. Many other comments below confirm how much this is confusing, even to regular users of the OEIS. — M. F. Hasler 13:29, 27 January 2012 (UTC)
If a change can be considered, my suggestion would be to have increasing indices such that
- constant = sum_{n=offset...oo} a(n) *10^(-n),
mainly to have indices which are increasing on one hand, and which make some sense, on the other hand. (As a side effect, this would imply the simple formula a(n) = constant * 10^n mod 10.
For Euler's constant this would yield a(1) = 5, a(2) = 7, ... (and optionnally a(0) = 0).
The offset would then give the number of (unwritten) "leading zeros", a negative offset would correspond to constants >= 10.
I am aware that this would be a major change, especially if there are many xref's to a given number. (But I think there are very few instances where the n-th term of the sequence is refereed to explicitely.) To make the transition, a possible choice might also be to duplicate, if necessary in a special case (although I don't know/am not sure whether this is a good idea). — M. F. Hasler 22:58, 12 December 2010 (UTC)
- I think that it would be a good idea to check the offsets of cons sequences in any case, as I think they're inconsistent at the moment. I would prefer the convention
- which seems more intuitive to me. This would give Pi an offset of 0 and gamma an offset of -1.
- Your convention does have the advantage of increasing indeces, though.
- Charles R Greathouse IV 23:26, 12 December 2010 (UTC)
- Also -- if there are any changes the b-files would all need to be updated. I'm not sure why we use b-files at all for constants (rather than a simple decimal listing), but we do. A good check would be to see if the example line matches what is computed as the new sequence with offset. Charles R Greathouse IV 06:38, 13 December 2010 (UTC)
- I added two more examples. It clarifies what the current convention is (assuming it is followed consistently throughout the OEIS...) I would have preferred if the offset was the exponent of 10 in the scientific representation of the constant, e.g.
- offset = -3 for
- offset = 2 for
This way, the sequence would start at the first nonzero digit of any constant. Unfortunately, that would mean modifying many sequences (removing the two leading zeros in A003673 and changing the offset to -3)...
— Daniel Forgues 02:54, 15 December 2010 (UTC)
- I added one more example. I corrected the formula for offset (to conform to the 5 examples from the OEIS,) I think I got it right, finally. What would have been neat if the offset was the exponent of 10 in the scientific representation of the constant is that the number of terms in the sequence would be equal to the number of significant digits and the offset would be the order of magnitude of the constant. — Daniel Forgues 04:11, 16 December 2010 (UTC)
- I just saw A143531 which doesn't conform to the conventions here. What do you think? Charles R Greathouse IV 06:42, 3 February 2011 (UTC)
It seems wrong. The current offset convention is very confusing. It would have been so much better if the offset was the exponent of 10 (exponent of b) in the base 10 (base b) scientific notation, e.g.
A003676 Decimal expansion of Planck constant (joule sec) (Planck constant h = 6.62606896(33) * 10^(-34) Joule second.)
would have offset -34 (exponent of 10 in scientific notation) instead of -33 (0.662606896 * 10^(-33).
A003678 Decimal expansion of speed of light (meters/second). (Since 1983 the speed of light has been defined to be exactly 2.99792458 * 10^(8) m/s.)
would have offset +8 (exponent of 10 in scientific notation) instead of +9 (0.299792458 * 10^(+9).)
— Daniel Forgues 07:16, 3 February 2011 (UTC)
b-files
I noticed that A093409, and probably most constants with b-files, doesn't follow the convention described here or used by the list and constant formatters. Thoughts?
Charles R Greathouse IV 07:37, 3 February 2011 (UTC)
- 0.11000099996913... has offset 0 (0.11000099996913... * 10^0, which is the current convention, thus is correct) — Daniel Forgues 07:46, 3 February 2011 (UTC)
- Look again. A093409/list has offsets 0, -1, -2, ..., while the b-file has offsets 0, 1, 2, .... Charles R Greathouse IV 14:30, 3 February 2011 (UTC)
- In the OEIS, the offset refers to the initial index of a sequence (0 in this case), it doesn't say whether the next indices are decreasing or increasing. — Daniel Forgues 23:21, 3 February 2011 (UTC)
- This is exactly why the convention for kw:cons is confusing: In this case (and only this case, I think) we do have decreasing indices, see the /list link. But the b-files don't (never? rarely?) respect them, which amounts to putting absolute values of the indices, when all are negative. — M. F. Hasler 13:37, 27 January 2012 (UTC)
- I'm pretty sure if you used decreasing indices the submission form would reject the b-file. Yay for the little inconsistencies. But it seems right that they decrease, when you consider cons sequences entered with offset 0 but starting with a 0: if they were submitted instead with offset -1 and without the 0, this keeps the values of a(n) the same for everything except the deleted a(0). Charles R Greathouse IV 14:16, 27 January 2012 (UTC)
Offset
Copy of email from N. J. A. Sloane:
Charles, The file http://oeis.org/eishelp2.html has the info. See under offset. To get to this page, click "Format" at foot of any OEIS page. Here is the convention for "cons" sequences 16.789 has offset 2 1.67 has offset 1 .678 offset 0 .0678 offset -1 .00678 offset -2 Hope this is clear! Best regards Neil
— Daniel Forgues 02:41, 6 February 2011 (UTC)
Main formula wrong ?!
I think the first formula on the content page, giving C in terms of a[k], is wrong -- it seems to me that it does not take into account the decreasing indices of keyword:cons sequences (cf. e.g. https://oeis.org/A000012/list or https://oeis.org/A005600/list ...). Another proof of how confusing the current convention is...! For so many reasons, we need increasing indices, and thus the convention . — M. F. Hasler 00:28, 12 March 2012 (UTC)
Changing the convention for the offsets of the sequences representing constants
Is it possible to change the convention? How many sequences representing constants are we talking about? As argued eloquently above by several authors, I agree that having the offset be for the most-significant non-zero term representing a positive constant , having the indices increase rather than decrease from the original offset, and having make more sense. (Replace "10" with the appropriate base for constants expressed in other bases.) Lee A. Newberg (talk) 08:24, 13 April 2018 (EDT)
- Would it ease the transition to use a distinct keyword — for example, "cnst" instead of "cons" — to indicate those constants that have offsets under the new convention? We could change "cons" to "cnst" each time we update the offset for a sequence to the new convention. The OEIS help pages could list both keywords, explain the difference, and explain that "cons" is deprecated for new sequences. Lee A. Newberg (talk) 09:12, 13 April 2018 (EDT)