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.

Previous Showing 11-17 of 17 results.

A072061 [t], 1+[t], [2t], 2+[2t], [3t], 3+[3t], ..., where t=tau = (1+sqrt(5))/2 and []=floor.

Original entry on oeis.org

1, 2, 3, 5, 4, 7, 6, 10, 8, 13, 9, 15, 11, 18, 12, 20, 14, 23, 16, 26, 17, 28, 19, 31, 21, 34, 22, 36, 24, 39, 25, 41, 27, 44, 29, 47, 30, 49, 32, 52, 33, 54, 35, 57, 37, 60, 38, 62, 40, 65, 42, 68, 43, 70, 45, 73, 46, 75, 48, 78, 50, 81, 51, 83, 53, 86, 55, 89, 56, 91, 58, 94
Offset: 1

Views

Author

Clark Kimberling, Jun 11 2002, Aug 17 2007

Keywords

Comments

The same sequence can be defined as follows: "a(1) = 1 and, for n>1, a(n) = a(n-1) + n/2 if n is even, otherwise a(n) = smallest positive integer which has not yet appeared in the sequence." This was originally a separate entry in the database, contributed by John W. Layman, Jul 08 2004. Antti Karttunen noticed on Jul 10 2004 that the two entries appeared to be identical. This was finally proved by Clark Kimberling, Aug 22 2007.
A permutation of the positive integers. Bisections are the lower and upper Wythoff sequences.
The consecutive pairs (1,2), (3,5), (4,7), (6,10), ... are the much-studied Wythoff pairs, arising in connection with Wythoff's game.
Conjecture: For even n, the ratio a(n)/a(n-1) is asymptotic to (1 + sqrt(5))/2 as n becomes large. (At n=3000, the ratio is 1.61804697, compared to the exact value 1.61803399.) - John W. Layman, Jul 08 2004
A more general conjecture may be stated as follows: Define {a(n)} by a(1)=1 and, for n>1, a(n) = a(n-1)+floor(kn) if n is even, else a(n)=smallest positive integer which has not yet appeared in the sequence, where k is a positive real number. Then a(2n)/a(2n-1) is asymptotic to k+sqrt(k^2+1) for large n. - John W. Layman, Jul 08 2004

References

  • David Wells, The Penguin Dictionary of Curious and Interesting Numbers. Penguin Books, NY, 1986, Revised edition 1987. See p. 40.

Crossrefs

Programs

  • Magma
    [n*(1+(-1)^n)/4+Floor((2*n+1-(-1)^n)*(1+Sqrt(5))/8) : n in [1..100]]; // Wesley Ivan Hurt, Apr 10 2015
    
  • Maple
    A072061:=n->n*(1+(-1)^n)/4+floor((2*n+1-(-1)^n)*(1+sqrt(5))/8): seq(A072061(n), n=1..100); # Wesley Ivan Hurt, Apr 10 2015
  • Mathematica
    Table[n*(1 + (-1)^n)/4 + Floor[(2 n + 1 - (-1)^n) (1 + Sqrt[5])/8], {n, 100}] (* Wesley Ivan Hurt, Apr 10 2015 *)
  • PARI
    lista(nn) = {v = []; for (n=1, nn, v = concat(v, nt = floor(n*(1+sqrt(5))/2)); v = concat(v, n+nt);); v;} \\ Michel Marcus, Apr 14 2015

Formula

a(n) = n*(1+(-1)^n)/4+floor((2*n+1-(-1)^n)*(1+sqrt(5))/8). - Wesley Ivan Hurt, Apr 10 2015

Extensions

Edited by N. J. A. Sloane, Jul 26 2008

A363708 Lexicographically earliest sequence of positive integers such that the n-th pair of consecutive equal values are separated by a(n) terms, with pairs numbered according to the position of the first term in the pair.

Original entry on oeis.org

1, 2, 1, 3, 2, 3, 4, 5, 2, 4, 6, 5, 7, 2, 5, 4, 8, 7, 9, 10, 2, 4, 10, 11, 8, 12, 2, 10, 13, 14, 15, 13, 11, 12, 14, 16, 2, 17, 10, 2, 18, 15, 12, 13, 19, 20, 21, 14, 17, 22, 23, 17, 10, 24, 2, 13, 12, 15, 20, 12, 25, 21, 17, 26, 14, 27, 28, 22, 29, 30, 31, 32
Offset: 1

Views

Author

Neal Gersh Tolunsky, Jun 16 2023

Keywords

Comments

Calculating terms may require backtracking, since pair numbers are not fixed until enough later terms either do or don't pair with earlier terms.

Examples

			The first pair (1,2,1) encloses 1 term because a(1)=1.
The second pair (2,1,3,2) encloses 2 terms because a(2)=2.
The third pair (3,2,3) encloses 1 term because a(3)=1.
The fourth pair (2,3,4,5,2) encloses 3 terms because a(4)=3.
In constructing the sequence, we must consider whether a number forms a pair with some earlier term, and if so, whether this leads to a contradiction. If every existing term leads to a contradiction, then the smallest number not yet in the sequence is used, as in a(7)=4.
a(7)=4 because if a(7)=1, we get (1,2,1,3,2,3,1). This would have the third pair in the sequence enclose 3 terms even though a(3)=1, which is satisfied by the pair (3,2,3).
If a(7)=2: (1,2,1,3,2,3,2) would have the fourth pair (2,3,2) enclose 1 term, which is impossible because a(4)=3 means the fourth pair encloses 3 terms.
If a(7)=3: (1,2,1,3,2,3,3) would have the pair (3,3) enclosing 0 terms, yet 0 is never a term.
a(7)=4 without contradiction since 4 has not yet appeared in the sequence.
From _Kevin Ryde_, Jun 27 2023: (Start)
Backtracking can be illustrated at a(20) != 8. The following candidates are the actual a(1..19) followed by prospective 8 for a(20),
    n  = ... 14 15 16 17 18 19 20
  a(n) =  ... 2, 5, 4, 8, 7, 9, 8  <-- attempt a(20)=8
This is consistent if all of 2,5,4 pair with later terms so the 8's are pair number 14, gap a(14)=2.
But it turns out each possible value at a(21) makes such pair number 14 impossible, so no later terms can let this start work, and so must go back and change something.
(Logic could show in advance that 2,5 cannot both pair, but other impossible combinations might be more complex.)
(End)
		

Crossrefs

Extensions

More terms from Pontus von Brömssen, Jun 29 2023

A368050 Main diagonal of the array where row n=0 lists the natural numbers and each new row n=1,2,... is found by taking the number n in the previous row, and "leaping" it over the next n terms to its right, keeping the other numbers fixed (see example).

Original entry on oeis.org

1, 1, 2, 5, 6, 4, 5, 10, 11, 12, 8, 15, 16, 17, 11, 20, 21, 22, 14, 15, 26, 27, 17, 18, 31, 32, 33, 21, 36, 37, 38, 24, 41, 42, 43, 27, 28, 47, 48, 30, 31, 52, 53, 33, 34, 57, 58, 59, 37, 62, 63, 64, 40, 41, 68, 69, 43, 44, 73, 74, 46, 47, 78, 79, 80, 50, 83
Offset: 1

Views

Author

Wesley Ivan Hurt, Dec 09 2023

Keywords

Examples

			The array begins:
  1,  2,  3,  4,  5,  6,  7,  8,  9,  10,  11,  12,  13,  ...
  2,  1,  3,  4,  5,  6,  7,  8,  9,  10,  11,  12,  13,  ...
  1,  3,  2,  4,  5,  6,  7,  8,  9,  10,  11,  12,  13,  ...
  1,  2,  4,  5,  3,  6,  7,  8,  9,  10,  11,  12,  13,  ...
  1,  2,  5,  3,  6,  7,  4,  8,  9,  10,  11,  12,  13,  ...
  1,  2,  3,  6,  7,  4,  8,  5,  9,  10,  11,  12,  13,  ...
  1,  2,  3,  7,  4,  8,  5,  9, 10,   6,  11,  12,  13,  ...
  1,  2,  3,  4,  8,  5,  9, 10,  6,  11,   7,  12,  13,  ...
  1,  2,  3,  4,  5,  9, 10,  6, 11,   7,  12,  13,   8,  ...
  1,  2,  3,  4,  5, 10,  6, 11,  7,  12,  13,   8,  14,  ...
  1,  2,  3,  4,  5,  6, 11,  7, 12,  13,   8,  14,  15,  ...
  1,  2,  3,  4,  5,  6,  7, 12, 13,   8,  14,  15,   9,  ...
  1,  2,  3,  4,  5,  6,  7, 13,  8,  14,  15,   9,  16,  ...
  ...
		

Crossrefs

Other parts of the array: A379739 (subdiagonal) and A367634 (descending antidiagonals).

Programs

  • Python
    from itertools import count
    def A368050_generator():
        x = [1]
        for n in count(1):
            yield x[n-1]
            i = x.index(n)
            if len(x) <= i+n: x.extend(range(len(x)+1,i+n+2))
            x[i:i+n] = x[i+1:i+n+1]
            x[i+n] = n # Pontus von Brömssen, Jan 15 2025

Formula

If a(n) >= n, then a(n) = floor((2*g-2)n + 1/2), where g = (1+sqrt(5))/2 is the golden ratio. If a(n) < n, then a(n) = floor((4-2*g)*n). There is a 6-state automaton (in the "links" section) that takes the Zeckendorf representation of n and accepts if and only if a(n) >= n. - Jeffrey Shallit, Jan 14 2025

Extensions

a(42)-a(67) from Pontus von Brömssen, Jan 15 2025

A380278 Lexicographically earliest infinite sequence of positive integers such that consecutive occurrences of k are separated by exactly k terms and each subsequence enclosed by consecutive equal values is distinct.

Original entry on oeis.org

1, 2, 1, 3, 1, 4, 1, 3, 5, 6, 4, 3, 7, 8, 5, 3, 6, 9, 10, 3, 5, 11, 8, 3, 12, 13, 5, 3, 14, 10, 15, 3, 5, 11, 16, 3, 17, 12, 5, 3, 10, 18, 19, 3, 5, 11, 15, 3, 20, 21, 5, 3, 22, 23, 17, 3, 5, 11, 24, 3, 18, 25, 5, 3, 26, 27, 28, 3, 5, 11, 29, 3, 17, 30, 5, 3, 31
Offset: 1

Views

Author

Neal Gersh Tolunsky, Jan 18 2025

Keywords

Comments

Does each value occur finitely many times?
Since the length of a subsequence is given by its enclosing values, the sequence remains the same whether we include those endpoints or not when checking the uniqueness of subsequences.

Examples

			a(9) = 5: a(9) cannot be 1 because this would create the subsequence a(7..9) = 1,3,1 enclosing [3], which would repeat a(3..5) = 1,3,1 enclosing [3] again. a(9) cannot be 2 because this would not enclose 2 terms with the previous occurrence of 2. For the same reason, 3 and 4 do not work. a(9) can be the first occurrence of 5 without restriction. So a(9) = 5.
		

Crossrefs

Cf. A026272.

A143825 This sequence displays every positive integer exactly three times; there is one number between the first and second 1's and one number between the second and third 1's; two numbers between the first and second 2's and two numbers between the second and third 2's; ... n numbers between the first and second n's and n numbers between the second and third n's.

Original entry on oeis.org

1, 3, 1, 4, 1, 3, 5, 6, 4, 3, 8, 10, 5, 4, 6, 7, 9, 11, 5, 8, 13, 6, 10, 7, 2, 12, 9, 2, 8, 11, 2, 7, 14, 10, 13, 16, 9, 17, 12, 18, 15, 11, 20, 21, 22, 24, 19, 14, 13, 25, 23, 12, 16, 26, 27, 17, 15, 30, 18, 31, 28, 32, 14, 20, 34, 21, 19, 22, 33, 16, 24, 36, 15, 17, 23, 25, 35, 18, 37
Offset: 1

Views

Author

Eric Angelini, Sep 02 2008

Keywords

Comments

The sequence displaying every positive integer exactly twice is A026272. Construction method: we always fill the next empty "hole" with the smallest available integer. There is no proof that this sequence could go on forever. Terms computed by Gilles Sadowski.

A117407 a(n) = j if n is T(j), else a(n) = k if n is U(k), where T is a Beatty sequence based on (sqrt(5)+5)/2 (A054770) and U is its complement (A063732).

Original entry on oeis.org

1, 2, 1, 3, 4, 5, 2, 6, 7, 3, 8, 9, 10, 4, 11, 12, 13, 5, 14, 15, 6, 16, 17, 18, 7, 19, 20, 8, 21, 22, 23, 9, 24, 25, 26, 10, 27, 28, 11, 29, 30, 31, 12, 32, 33, 34, 13, 35, 36, 14, 37, 38, 39, 15, 40, 41, 16, 42, 43, 44, 17, 45, 46, 47, 18, 48, 49, 19, 50, 51, 52, 20, 53, 54, 21, 55
Offset: 0

Views

Author

Casey Mongoven, Mar 13 2006

Keywords

Comments

Every positive integer occurs exactly twice. Taking a Lucas number (A000032) of terms L(n) starting at a(0), the last two terms are a pair of Fibonacci numbers (A000045). If n is even, then the last two terms are F(n+1) followed by F(n-1), if n is odd they are F(n-1) followed by F(n+1), where F is the Fibonacci sequence. For example, the first L(4) = 7 terms of this sequence are (1,2,1,3,4,5,2) and the last members are 5 and 2 which are equal to F(5) and F(3). Note also that L(n) = F(n-1) + F(n+1).

Examples

			a(9) = 3 because 9 = T(3).
		

Crossrefs

A338804 A sequence containing each nonnegative integer exactly twice, such that for all k, k numbers appear in the sequence between the first and second appearances of k.

Original entry on oeis.org

0, 0, 3, 1, 2, 1, 3, 2, 9, 10, 11, 12, 4, 5, 6, 7, 8, 4, 9, 5, 10, 6, 11, 7, 12, 8, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 13, 27, 14, 28, 15, 29, 16, 30, 17, 31, 18, 32, 19, 33, 20, 34, 21, 35, 22, 36, 23, 37, 24, 38, 25, 39, 26
Offset: 1

Views

Author

Elliott Line, Nov 10 2020

Keywords

Comments

The sequence is constructed so that after the initial two 0's the next three pairs form a self-contained block beginning with 3, the subsequent nine pairs form a self-contained block beginning with 9, the following twenty-seven pairs form a block beginning with 27, etc. (powers of 3: A000244).
There are numerous sequences that satisfy the given criteria, so to fully define the continuation of this sequence I will add the following extra constraints. After the 0th block 0,0 the n-th block is found as follows: The block can be split into two halves such that one occurrence of each number appears in each half. The first half of the n-th block begins with 3^n then increases by consecutive integers until the maximum for that block: (3^(n+1) - 3)/2, before abruptly dropping to (3^n - 1)/2 and increasing by consecutive integers until (3^n - 1) is reached. The second half of the n-th block is then defined by the original constraints.

Examples

			From the first and second appearances of 5 the sequence is 5, 6, 7, 8, 4, 9, 5 and as such has five numbers between the two 5's.
		

Crossrefs

Previous Showing 11-17 of 17 results.