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

A307024 Lexicographically earliest sequence of different terms starting with a(1) = 1 and a(2) = 2 such that two consecutive terms of opposite parity are followed by their sum; else (same parity), by the smallest term not yet in the sequence.

Original entry on oeis.org

1, 2, 3, 5, 4, 9, 13, 6, 19, 25, 7, 8, 15, 23, 10, 33, 43, 11, 12, 24, 14, 16, 17, 34, 51, 85, 18, 103, 121, 20, 141, 161, 21, 22, 44, 26, 27, 53, 28, 81, 109, 29, 30, 59, 89, 31, 32, 63, 95, 35, 36, 71, 107, 37, 38, 75, 113, 39, 40, 79, 119, 41, 42, 83, 125, 45, 46, 91, 137, 47, 48, 96, 49, 145, 50, 195, 245, 52, 297, 349, 54, 403
Offset: 1

Views

Author

Eric Angelini and Jean-Marc Falcoz, Mar 20 2019

Keywords

Comments

This sequence is a permutation of the positive integers.

Examples

			The sequence starts with 1,2,3,5,4,9,13,6,19,25,7,... and we see that:
a(1) = 1 and a(2) = 2 being of opposite parity are followed by their sum (3);
a(2) = 2 and a(3) = 3 being of opposite parity are followed by their sum (5);
a(3) = 3 and a(4) = 5 being of the same parity are followed by the smallest term not yet in the sequence (4);
a(4) = 5 and a(5) = 4 being of opposite parity are followed by their sum (9);
a(5) = 4 and a(6) = 9 being of opposite parity are followed by their sum (13);
a(6) = 9 and a(7) = 13 being of the same parity are followed by the smallest term not yet in the sequence (6);
etc.
		

Crossrefs

This sequence is based on the same idea developed in A307023, but with no duplicate term: a(20) = 24 here but a(20) = 23 there.

A333301 a(1) = 1, a(2) = 2. For n>2, if a(n-1) is odd, a(n) = a(n-1) + a(n-2), and otherwise a(n) is the smallest missing number.

Original entry on oeis.org

1, 2, 3, 5, 8, 4, 6, 7, 13, 20, 9, 29, 38, 10, 11, 21, 32, 12, 14, 15, 29, 44, 16, 17, 33, 50, 18, 19, 37, 56, 22, 23, 45, 68, 24, 25, 49, 74, 26, 27, 53, 80, 28, 30, 31, 61, 92, 34, 35, 69, 104, 36, 39, 75, 114, 40, 41, 81, 122, 42, 43, 85, 128, 46, 47, 93, 140, 48, 51, 99, 150, 52, 54, 55, 109, 164
Offset: 1

Views

Author

Andrew Slattery, Jun 08 2020

Keywords

Comments

How many times does each number appear?

Examples

			a(10) is even, so a(11) is the least number yet to appear, which is 9.
		

Crossrefs

Showing 1-2 of 2 results.