OEIS_offset: OEIS sequence offset from 'xml2' data.

View source: R/OEIS_offset.R

OEIS_offsetR Documentation

OEIS sequence offset from xml2 data.

Description

This line usually gives the subscript of the first term in the sequence. If the sequence gives the decimal expansion of a constant, the offset is the number of digits before the decimal point. In the OEIS web internal format, there is a second offset, which says which term (counting from the left, and starting with 1), first exceeds 1 in absolute value. This is set to 1 if all the terms are 0 or +-1

Usage

OEIS_offset(x)

Arguments

x

Can be one of the following:

  • A character string with sequence ID.

  • A OEIS_internal S3 class object, with sequence internal format.

  • A S3 classes object OEIS_xml and xml_document, with sequence content from OEIS web.

  • An object of OEIS_sequence class, that contains all sequence related data.

Value

A character vector with the OEIS sequence offsets.

Note

In the internal format for a sequence the offset line (the contains two numbers. The first is the offset as just defined. The second gives the position of first entry greater than or equal to 2 in magnitude in the sequence (or 1 if no such entry exists), starting counting at 1. The second offset is used to determine the position of the sequence in the lexicographic order in the database.

References

Explanation of the Different Lines

What does the "offset" mean?

See Also

* OEIS_internal_format

* OEIS_description

* OEIS_xml

* OEIS_sequence

Examples

## Not run: 
id <- "A000056"
internal_format <- OEIS_internal_format(id)
OEIS_offset(internal_format)

## End(Not run)

EnriquePH/OEIS.R documentation built on March 15, 2023, 8:01 a.m.