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.

A090571 Duplicate of A088452.

Original entry on oeis.org

1, 1, 1, 3, 2, 6, 5, 1, 3, 10, 7, 9, 1, 2, 6, 5, 17, 18, 11, 13, 15, 10, 2, 1, 11, 10, 7, 9, 17, 30
Offset: 1

Views

Author

Keywords

A088442 A linear version of the Josephus problem.

Original entry on oeis.org

1, 3, 1, 3, 9, 11, 9, 11, 1, 3, 1, 3, 9, 11, 9, 11, 33, 35, 33, 35, 41, 43, 41, 43, 33, 35, 33, 35, 41, 43, 41, 43, 1, 3, 1, 3, 9, 11, 9, 11, 1, 3, 1, 3, 9, 11, 9, 11, 33, 35, 33, 35, 41, 43, 41, 43, 33, 35, 33, 35, 41, 43, 41, 43, 129, 131, 129, 131, 137, 139, 137, 139, 129, 131
Offset: 0

Views

Author

N. J. A. Sloane, Nov 09 2003

Keywords

Comments

Or a(n) is in A145812 such that (2*n + 3 - a(n))/2 is in A145812 as well. Note also that a(n) + 2*A090569(n+1) = 2*n + 3. - Vladimir Shevelev, Oct 20 2008

Examples

			If n=4, 2n+1 = 9 = 1 + 0*2 + 0*2^2 + 1*2^3, so a(4) = 1 + 0*2 + 1*2^3 = 9.
		

Crossrefs

Programs

Formula

To get a(n), write 2n+1 as Sum b_j 2^j, then a(n) = 1 + Sum_{j odd} b_j 2^j.
Equals A004514(n) + 1. - Chris Groer (cgroer(AT)math.uga.edu), Nov 10 2003
a(n) = 2*A063694(n) + 1. - G. C. Greubel, Dec 05 2022

Extensions

More terms from Emeric Deutsch, May 27 2004

A090569 The survivor w(n,2) in a modified Josephus problem, with a step of 2.

Original entry on oeis.org

1, 1, 3, 3, 1, 1, 3, 3, 9, 9, 11, 11, 9, 9, 11, 11, 1, 1, 3, 3, 1, 1, 3, 3, 9, 9, 11, 11, 9, 9, 11, 11, 33, 33, 35, 35, 33, 33, 35, 35, 41, 41, 43, 43, 41, 41, 43, 43, 33, 33, 35, 35, 33, 33, 35, 35, 41, 41, 43, 43, 41, 41, 43, 43, 1, 1, 3, 3, 1, 1, 3, 3, 9, 9, 11, 11, 9, 9, 11, 11, 1, 1
Offset: 1

Views

Author

John W. Layman, Dec 02 2003

Keywords

Comments

Arrange n persons {1,2,...,n} consecutively on a line rather than around in a circle. Beginning at the left end of the line, we remove every q-th person until we reach the end of the line. At this point we immediately reverse directions, taking care not to "double count" the person at the end of the line and continue to eliminate every q-th person, but now moving right to left. We continue removing people in this back-and-forth manner until there remains a lone survivor w(n,q).
Or a(n) is in A145812 such that 2n+1-2a(n) is in A145812 as well. Note also that 2a(n)+A088442(n-1)=2n+1. - Vladimir Shevelev, Oct 20 2008

Examples

			a(2)=11, since people are eliminated in the order 2, 4, 6, 8, 10, 12, 9, 5, 1, 7, 3, leaving 11 as the survivor.
		

Crossrefs

Programs

  • Python
    def A090569(n): return (n-1&((1<<(m:=(n-1).bit_length())+(m&1^1))-1)//3)+1 # Chai Wah Wu, Jan 30 2023

Formula

w(n, 2) = 1 + Sum_{odd j=1..k} b(j)*(2^j), where Sum_{j=0..k} b(j)*(2^j) is the binary expansion of either n or n-1, whichever is odd.
a(n) = A063695(n-1) + 1.

A088443 A linear version of the Josephus problem: a(n) = the function w_3(n).

Original entry on oeis.org

1, 2, 1, 4, 1, 1, 7, 8, 8, 1, 2, 1, 2, 5, 14, 14, 17, 17, 17, 17, 14, 2, 1, 4, 1, 1, 2, 4, 4, 5, 11, 32, 31, 34, 31, 31, 37, 38, 38, 38, 41, 37, 38, 37, 38, 31, 31, 1, 4, 5, 1, 7, 8, 8, 1, 2, 1, 2, 5, 4, 1, 8, 8, 8, 8, 11, 11, 20, 23, 25, 71, 71, 68, 70, 68, 76, 74, 68, 68, 68, 70, 82, 83, 82
Offset: 1

Views

Author

N. J. A. Sloane, Nov 09 2003

Keywords

Comments

The survivor w(n,3) in a modified Josephus problem, with a step of 3.
See A090569 or the reference for the definition of w(n,q).

Crossrefs

Formula

A recurrence is given in the reference.

Extensions

Terms computed by Chris Groer (cgroer(AT)math.uga.edu)
More terms from John W. Layman, Feb 05 2004
Showing 1-4 of 4 results.