cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-4 of 4 results.

A367289 Inverse permutation to A367288.

Original entry on oeis.org

0, 1, 3, 5, 7, 2, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 4, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 55, 57, 59, 61, 63, 65, 67, 69, 71, 6, 73, 75, 77, 79, 81, 83, 85, 87, 89, 91, 93, 95, 97, 99, 101, 103, 105, 107, 109, 111, 8, 113, 115, 117, 119
Offset: 0

Views

Author

Rémy Sigrist, Nov 12 2023

Keywords

Examples

			A367288(77) = 42, hence A367288(42) = 77.
		

Crossrefs

Cf. A367288.

Programs

  • PARI
    See Links section.

A367290 Lexicographically earliest sequence of distinct positive integers such that for any n > 0, a(n) and a(n+1) are congruent modulo the n-th prime number, and the least value not yet in the sequence appears as soon as possible.

Original entry on oeis.org

1, 5, 2, 17, 3, 69, 4, 310, 6, 558, 7, 193, 8, 869, 9, 2077, 10, 1780, 11, 3562, 12, 961, 13, 6155, 14, 2439, 15, 8255, 16, 6120, 18, 12464, 19, 9472, 20, 11195, 21, 4260, 22, 24070, 23, 16133, 24, 18360, 25, 19528, 26, 27456, 27, 25905, 28, 46395, 29, 6054
Offset: 1

Views

Author

Rémy Sigrist, Nov 12 2023

Keywords

Comments

To build the sequence:
- we start with a(1) = 1, and repeatedly:
- let a(n) be the last known term and v the least value not yet in the sequence,
- if a(n) and v are congruent modulo the n-th prime number then a(n+1) = v,
- otherwise a(n+2) = v and a(n+1) is chosen as small as possible in such a way as to satisfy the required congruences (this is always possible as two consecutive prime numbers are coprime).
This sequence is a variant of A364054, and, by design, is guaranteed to be a permutation of the positive integers (with inverse A367291).

Examples

			The first terms are:
  n   a(n)   a(n) mod prime(n)  a(n+1) mod prime(n)
  --  -----  -----------------  -------------------
   1      1                  1                    1
   2      5                  2                    2
   3      2                  2                    2
   4     17                  3                    3
   5      3                  3                    3
   6     69                  4                    4
   7      4                  4                    4
   8    310                  6                    6
   9      6                  6                    6
  10    558                  7                    7
  11      7                  7                    7
  12    193                  8                    8
  13      8                  8                    8
		

Crossrefs

Cf. A364054, A367288, A367291 (inverse).

Programs

  • PARI
    See Links section.

A371214 Lexicographically earliest sequence of distinct nonnegative integers such that for any n > 0, a(n-1) + a(n) is a multiple of n, and the least value not yet in the sequence appears as soon as possible.

Original entry on oeis.org

0, 1, 7, 2, 22, 3, 45, 4, 76, 5, 115, 6, 18, 8, 216, 9, 279, 10, 350, 11, 429, 12, 516, 13, 611, 14, 714, 15, 825, 16, 944, 17, 47, 19, 1205, 20, 1348, 21, 55, 23, 1657, 24, 1824, 25, 1999, 26, 2182, 27, 2373, 28, 2572, 29, 2779, 30, 2994, 31, 3217, 32, 3448
Offset: 0

Views

Author

Rémy Sigrist, Mar 15 2024

Keywords

Comments

To build the sequence:
- we start with a(0) = 0, and repeatedly:
- let a(n) be the last known term and v the least value not yet in the sequence,
- if a(n) + v is a multiple of n+1 then a(n+1) = v,
- otherwise a(n+2) = v and a(n+1) is chosen as small as possible in such a way as to satisfy the required congruences (this is always possible as n+1 and n+2 are coprime).
The construction is similar to that of A367288.
This sequence is a variant of A099506 and, by design, is guaranteed to be a permutation of the nonnegative integers (with inverse A371215).

Examples

			The first terms are:
  n   a(n)  (a(n-1) + a(n))/n
  --  ----  -----------------
   0     0  N/A
   1     1                  1
   2     7                  4
   3     2                  3
   4    22                  6
   5     3                  5
   6    45                  8
   7     4                  7
   8    76                 10
   9     5                  9
  10   115                 12
  11     6                 11
  12    18                  2
		

Crossrefs

Cf. A099506, A367288, A371215 (inverse).

Programs

  • PARI
    See Links section.

A371220 Lexicographically earliest sequence of distinct positive integers such that for any n > 0, a(1) + ... + a(n) is a multiple of n, and the least value not yet in the sequence appears as soon as possible.

Original entry on oeis.org

1, 3, 2, 10, 4, 52, 5, 43, 6, 54, 7, 65, 8, 76, 9, 103, 11, 99, 12, 110, 13, 121, 14, 132, 15, 143, 16, 154, 17, 165, 18, 176, 19, 187, 20, 198, 21, 209, 22, 220, 23, 231, 24, 242, 25, 253, 26, 264, 27, 275, 28, 286, 29, 297, 30, 308, 31, 319, 32, 330, 33, 341
Offset: 1

Views

Author

Rémy Sigrist, Mar 15 2024

Keywords

Comments

To build the sequence:
- we start with a(1) = 1,
- once we have n terms, let v be the least value not yet in the sequence,
- if a(1) + ... a(n) + v is a multiple of n+1, then a(n+1) = v,
- otherwise a(n+2) = v and a(n+1) is chosen as small as possible so as to meet the required conditions (this is always possible as n+1 and n+2 are coprime).
The construction is similar to that of A367288.
This sequence is a variant of A019444 and, by design, is guaranteed to be a permutation of the nonnegative integers (with inverse A371221).

Examples

			The first terms, alongside the average of the first terms, are:
  n   a(n)  (a(1)+...+a(n))/n
  --  ----  -----------------
   1     1                  1
   2     3                  2
   3     2                  2
   4    10                  4
   5     4                  4
   6    52                 12
   7     5                 11
   8    43                 15
   9     6                 14
  10    54                 18
  11     7                 17
  12    65                 21
		

Crossrefs

Cf. A019444, A367288, A371221 (inverse).

Programs

  • PARI
    See Links section.
Showing 1-4 of 4 results.