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-3 of 3 results.

A022424 Solution a( ) of the complementary equation a(n) = b(n-1) + b(n-2), where a(0) = 1, a(1) = 2; see Comments.

Original entry on oeis.org

1, 2, 7, 9, 11, 14, 18, 22, 25, 28, 31, 33, 36, 39, 41, 44, 47, 50, 53, 56, 59, 62, 66, 69, 72, 75, 78, 82, 85, 88, 91, 94, 97, 100, 103, 106, 109, 112, 115, 118, 121, 124, 127, 129, 132, 135, 138, 141, 144, 147, 150, 153, 156, 159, 161, 164, 167, 170
Offset: 0

Views

Author

Keywords

Comments

From the Bode-Harborth-Kimberling link:
a(n) = b(n-1) + b(n-2) for n > 2;
b(0) = least positive integer not in {a(0),a(1)};
b(n) = least positive integer not in {a(0),...,a(n),b(0),...,b(n-1)} for n > 1.
Note that (b(n)) is strictly increasing and is the complement of (a(n)).
***
In the following guide to solutions a( ) and b( ) of a(n) = b(n-1) + b(n-2), an asterisk (*) indicates that a( ) differs from the indicated A-sequence in one or two initial terms:
(a(n)) (b(n)) a(0) a(1)
***
Guide to solutions a( ) and b( ) of a(n) = b(n-1) + b(n-2) + b(n-3) for various initial values:
(a(n)) (b(n)) a(0) a(1) a(2)
***
Guide to other complementary equations:
A022427-A022440: a(n) = b(n-1) + b(n-3)
A299531-A299532: a(n) = 2*b(n-1) + b(n-2), a(0) = 1, a(1) = 2
A296220, A299534: a(n) = b(n-1) + 2*b(n-2), a(0) = 1, a(1) = 2
A022437, A299536: a(n) = b(n-1) + b(n-3), a(0) = 1, a(1) = 2, a(2) = 3
A022437, A299538: a(n) = b(n-1) + b(n-3), a(0) = 2, a(1) = 3, a(2) = 4
A022438-A299540: a(n) = b(n-1) + b(n-3), a(0) = 2, a(1) = 3, a(2) = 5
A299541-A299542: a(n) = b(n-1) + b(n-3), a(0) = 2, a(1) = 4, a(2) = 6
A299543-A299544: a(n) = 2*b(n-1) + b(n-2) - b(n-3), a(0) = 1, a(1) = 2, a(2) = 3
A299545-A299546: a(n) = b(n-1) + 2*b(n-2) - b(n-3), a(0) = 1, a(1) = 2, a(2) = 3
A299547: a(n) = b(n-1) + b(n-2) + ... + b(0), a(0) = 1, a(1) = 2, a(2) = 3

Crossrefs

Cf. A055563 (complement), A022425, A299407, A299486-A299494.
Another pair is given in A324142, A324143.

Programs

  • Mathematica
    Fold[Append[#1, Plus @@ Complement[Range[Max@#1 + 3], #1][[{#2, #2 + 1}]]] &, {1, 2}, Range[56]] (* Ivan Neretin, Mar 28 2017 *)

Extensions

Edited by Clark Kimberling, Feb 16 2018

A055562 a(n) = least number greater than a(n-1) not the sum of an earlier pair of consecutive terms, a(0) = 2.

Original entry on oeis.org

2, 3, 4, 6, 8, 9, 11, 12, 13, 15, 16, 18, 19, 21, 22, 24, 26, 27, 29, 30, 32, 33, 35, 36, 38, 39, 41, 42, 44, 45, 47, 48, 49, 51, 52, 54, 55, 57, 58, 60, 61, 63, 64, 66, 67, 69, 70, 72, 73, 75, 76, 78, 79, 81, 82, 84, 85, 87, 88, 90, 91, 93, 94, 96, 98, 99, 101, 102, 104, 105
Offset: 0

Views

Author

Henry Bottomley, May 26 2000

Keywords

Examples

			a(2) = 4 because a(1) = 3 and 4 <> a(0)+a(1);
a(3) = 6 because a(2) = 4 and 5 = a(0)+a(1) but 6 <> a(0)+a(1) and 6 <> a(1)+a(2).
		

Crossrefs

Complement of A022441. See A001651 for a(0) = 1 and A055563 for a(0) = 3

Formula

a(n) = A022441(n) - a(n-1) for n > 0.
a(2n) = 3n + 1 + (floor(log_2 n) mod 2), n >= 1; a(2n+1) = 3n+3, n >= 0. - Jeffrey Shallit, Jun 08 2000
a(n) = A210770(2*n+2). - Reinhard Zumkeller, Mar 25 2012

A210770 a(1) = 1, a(2) = 2; for n > 1, a(2*n+2) = smallest number not yet seen, a(2*n+1) = a(2*n) + a(2*n+2).

Original entry on oeis.org

1, 2, 5, 3, 7, 4, 10, 6, 14, 8, 17, 9, 20, 11, 23, 12, 25, 13, 28, 15, 31, 16, 34, 18, 37, 19, 40, 21, 43, 22, 46, 24, 50, 26, 53, 27, 56, 29, 59, 30, 62, 32, 65, 33, 68, 35, 71, 36, 74, 38, 77, 39, 80, 41, 83, 42, 86, 44, 89, 45, 92, 47, 95, 48, 97, 49, 100
Offset: 1

Views

Author

Reinhard Zumkeller, Mar 25 2012

Keywords

Comments

Permutation of natural numbers with inverse A210771.
From Jeffrey Shallit, Jun 18 2021: (Start)
This sequence is "2-sychronized"; there is a 23-state finite automaton that recognizes the base-2 representations of n and a(n), in parallel.
It obeys the identities
a(4n+3) = a(2n+1) - a(4n) + 2 a(4n+2)
a(8n) = 2a(4n)
a(8n+1) = a(2n+1) + 3a(4n)
a(8n+2) = a(2n+1) + 2 a(4n) - a(4n+1) + a(4n+2)
a(8n+4) = a(2n+1) + a(4n+2)
a(8n+5) = 3a(2n+1) - a(4n) +2a(4n+2)
a(8n+6) = 2a(2n+1) - a(4n) + a(4n+2). (End)

Crossrefs

Cf. A064736.

Programs

  • Haskell
    import Data.List (delete)
    a210770 n = a210770_list !! (n-1)
    a210770_list = 1 : 2 : f 1 2 [3..] where
       f u v (w:ws) = u' : w : f u' w (delete u' ws) where u' = v + w
    
  • Python
    def aupton(terms):
        alst, seen = [1, 2], {1, 2}
        for n in range(2, terms, 2):
            anp1 = alst[-1] + 1
            while anp1 in seen: anp1 += 1
            an = alst[n-1] + anp1
            alst, seen = alst + [an, anp1], seen | {an, anp1}
        return alst[:terms]
    print(aupton(67)) # Michael S. Branicky, Jun 18 2021

Formula

a(2*n-1) = A022441(n-1); a(2*n) = A055562(n-1).

Extensions

Definition corrected by Jeffrey Shallit, Jun 18 2021
Showing 1-3 of 3 results.