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

A099545 Odd part of n, modulo 4.

Original entry on oeis.org

1, 1, 3, 1, 1, 3, 3, 1, 1, 1, 3, 3, 1, 3, 3, 1, 1, 1, 3, 1, 1, 3, 3, 3, 1, 1, 3, 3, 1, 3, 3, 1, 1, 1, 3, 1, 1, 3, 3, 1, 1, 1, 3, 3, 1, 3, 3, 3, 1, 1, 3, 1, 1, 3, 3, 3, 1, 1, 3, 3, 1, 3, 3, 1, 1, 1, 3, 1, 1, 3, 3, 1, 1, 1, 3, 3, 1, 3, 3, 1, 1, 1, 3, 1, 1, 3, 3, 3, 1, 1, 3, 3, 1, 3, 3, 3, 1, 1, 3, 1, 1, 3
Offset: 1

Views

Author

Ralf Stephan, Oct 23 2004

Keywords

Comments

The terms of this sequence are the even-indexed terms of A112658. - Alexandre Wajnberg, Jan 02 2006
Fractal sequence: odd terms are 1, 3, 1, 3,...; the even terms are the sequence itself: a(n)=a(2n)=a(4n)=a(8n)=a(16n)=... - Alexandre Wajnberg, Jan 02 2006
From Micah D. Tillman, Jan 29 2021: (Start)
Has the same structure as the regular paper-folding (dragon curve) sequence (A014577, A014709). We can interpret a(n) as the number of 90-degree rotations to make in a single direction at the n-th "turn" in the dragon curve. After all, making three 90-degree rotations to the left (turning a total of 270 degrees) is equivalent to making one 90-degree rotation to the right, and vice versa.
We can likewise produce the dragon curve by interpreting A000265(n), the whole odd part of n, as the number of 90-degree rotations to make in a single direction at the n-th "turn" in the curve. (End)

Examples

			a(100) = 1: the odd part of 100 is 100/4 = 25, and 25 mod 4 = 1.
		

Crossrefs

Programs

  • Mathematica
    Array[Mod[#/(2^IntegerExponent[#, 2]), 4] &, 105] (* Michael De Vlieger, Feb 24 2021 *)
  • PARI
    a(n)=bitand(n/(2^valuation(n,2)), 3); /* Joerg Arndt, Jul 18 2012 */
    
  • Python
    def A099545(n): return n>>(~n&n-1).bit_length()&3 # Chai Wah Wu, Feb 26 2025

Formula

a(n) = 2 * A038189(n) + 1.
(a(n)-1)/2 = A014707(n). - Alexandre Wajnberg, Jan 02 2006
a(n) = A010873(A000265(n)).
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = 2. - Amiram Eldar, Aug 29 2024

A099544 Odd part of n modulo 3.

Original entry on oeis.org

1, 1, 0, 1, 2, 0, 1, 1, 0, 2, 2, 0, 1, 1, 0, 1, 2, 0, 1, 2, 0, 2, 2, 0, 1, 1, 0, 1, 2, 0, 1, 1, 0, 2, 2, 0, 1, 1, 0, 2, 2, 0, 1, 2, 0, 2, 2, 0, 1, 1, 0, 1, 2, 0, 1, 1, 0, 2, 2, 0, 1, 1, 0, 1, 2, 0, 1, 2, 0, 2, 2, 0, 1, 1, 0, 1, 2, 0, 1, 2, 0, 2, 2, 0, 1, 1, 0, 2, 2, 0, 1, 2, 0, 2, 2, 0, 1, 1, 0, 1, 2, 0
Offset: 1

Views

Author

Ralf Stephan, Oct 23 2004

Keywords

Comments

0 if multiple of 3, 1 if of the form 2^j*(3*k+1) with 3*k+1 odd, 2 otherwise.

Crossrefs

Programs

  • Mathematica
    a[n_] := Mod[n / 2^IntegerExponent[n, 2], 3]; Array[a, 100] (* Amiram Eldar, Aug 29 2024 *)
  • PARI
    a(n) = (n>>valuation(n,2))%3 \\ Charles R Greathouse IV, May 14 2014

Formula

a(n) = A010872(A000265(n)).
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = 1. - Amiram Eldar, Aug 29 2024

A099546 Odd part of n modulo 5.

Original entry on oeis.org

1, 1, 3, 1, 0, 3, 2, 1, 4, 0, 1, 3, 3, 2, 0, 1, 2, 4, 4, 0, 1, 1, 3, 3, 0, 3, 2, 2, 4, 0, 1, 1, 3, 2, 0, 4, 2, 4, 4, 0, 1, 1, 3, 1, 0, 3, 2, 3, 4, 0, 1, 3, 3, 2, 0, 2, 2, 4, 4, 0, 1, 1, 3, 1, 0, 3, 2, 2, 4, 0, 1, 4, 3, 2, 0, 4, 2, 4, 4, 0, 1, 1, 3, 1, 0, 3, 2, 1, 4, 0, 1, 3, 3, 2, 0, 3, 2, 4, 4, 0, 1, 1
Offset: 1

Views

Author

Ralf Stephan, Oct 23 2004

Keywords

Crossrefs

Programs

  • Mathematica
    a[n_] := Mod[n / 2^IntegerExponent[n, 2], 5]; Array[a, 100] (* Amiram Eldar, Aug 29 2024 *)
  • PARI
    a(n) = (n>>valuation(n, 2))%5 \\Charles R Greathouse IV, May 14 2014

Formula

a(n) = A010874(A000265(n)).
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = 2. - Amiram Eldar, Aug 29 2024

A099547 Odd part of n modulo 6.

Original entry on oeis.org

1, 1, 3, 1, 5, 3, 1, 1, 3, 5, 5, 3, 1, 1, 3, 1, 5, 3, 1, 5, 3, 5, 5, 3, 1, 1, 3, 1, 5, 3, 1, 1, 3, 5, 5, 3, 1, 1, 3, 5, 5, 3, 1, 5, 3, 5, 5, 3, 1, 1, 3, 1, 5, 3, 1, 1, 3, 5, 5, 3, 1, 1, 3, 1, 5, 3, 1, 5, 3, 5, 5, 3, 1, 1, 3, 1, 5, 3, 1, 5, 3, 5, 5, 3, 1, 1, 3, 5, 5, 3, 1, 5, 3, 5, 5, 3, 1, 1, 3, 1, 5, 3
Offset: 1

Views

Author

Ralf Stephan, Oct 23 2004

Keywords

Crossrefs

Programs

  • Mathematica
    a[n_] := Mod[n / 2^IntegerExponent[n, 2], 6]; Array[a, 100] (* Amiram Eldar, Aug 29 2024 *)
  • PARI
    a(n) = (n>>valuation(n, 2))%6 \\Charles R Greathouse IV, May 14 2014

Formula

a(n) = A010875(A000265(n)).
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = 3. - Amiram Eldar, Aug 29 2024

A099548 Odd part of n modulo 7.

Original entry on oeis.org

1, 1, 3, 1, 5, 3, 0, 1, 2, 5, 4, 3, 6, 0, 1, 1, 3, 2, 5, 5, 0, 4, 2, 3, 4, 6, 6, 0, 1, 1, 3, 1, 5, 3, 0, 2, 2, 5, 4, 5, 6, 0, 1, 4, 3, 2, 5, 3, 0, 4, 2, 6, 4, 6, 6, 0, 1, 1, 3, 1, 5, 3, 0, 1, 2, 5, 4, 3, 6, 0, 1, 2, 3, 2, 5, 5, 0, 4, 2, 5, 4, 6, 6, 0, 1, 1, 3, 4, 5, 3, 0, 2, 2, 5, 4, 3, 6, 0, 1, 4, 3, 2
Offset: 1

Views

Author

Ralf Stephan, Oct 23 2004

Keywords

Crossrefs

Programs

  • Mathematica
    a[n_] := Mod[n / 2^IntegerExponent[n, 2], 7]; Array[a, 100] (* Amiram Eldar, Aug 29 2024 *)
  • PARI
    a(n) = (n>>valuation(n, 2))%7 \\Charles R Greathouse IV, May 14 2014

Formula

a(n) = A010876(A000265(n)).
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = 3. - Amiram Eldar, Aug 29 2024

A099549 Odd part of n modulo 8.

Original entry on oeis.org

1, 1, 3, 1, 5, 3, 7, 1, 1, 5, 3, 3, 5, 7, 7, 1, 1, 1, 3, 5, 5, 3, 7, 3, 1, 5, 3, 7, 5, 7, 7, 1, 1, 1, 3, 1, 5, 3, 7, 5, 1, 5, 3, 3, 5, 7, 7, 3, 1, 1, 3, 5, 5, 3, 7, 7, 1, 5, 3, 7, 5, 7, 7, 1, 1, 1, 3, 1, 5, 3, 7, 1, 1, 5, 3, 3, 5, 7, 7, 5, 1, 1, 3, 5, 5, 3, 7, 3, 1, 5, 3, 7, 5, 7, 7, 3, 1, 1, 3, 1, 5, 3
Offset: 1

Views

Author

Ralf Stephan, Oct 23 2004

Keywords

Crossrefs

Programs

  • Mathematica
    a[n_] := Mod[n / 2^IntegerExponent[n, 2], 8]; Array[a, 100] (* Amiram Eldar, Aug 29 2024 *)
  • PARI
    a(n) = (n>>valuation(n, 2))%8 \\Charles R Greathouse IV, May 14 2014

Formula

a(n) = A010877(A000265(n)).
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = 4. - Amiram Eldar, Aug 29 2024

A099550 Odd part of n modulo 9.

Original entry on oeis.org

1, 1, 3, 1, 5, 3, 7, 1, 0, 5, 2, 3, 4, 7, 6, 1, 8, 0, 1, 5, 3, 2, 5, 3, 7, 4, 0, 7, 2, 6, 4, 1, 6, 8, 8, 0, 1, 1, 3, 5, 5, 3, 7, 2, 0, 5, 2, 3, 4, 7, 6, 4, 8, 0, 1, 7, 3, 2, 5, 6, 7, 4, 0, 1, 2, 6, 4, 8, 6, 8, 8, 0, 1, 1, 3, 1, 5, 3, 7, 5, 0, 5, 2, 3, 4, 7, 6, 2, 8, 0, 1, 5, 3, 2, 5, 3, 7, 4, 0, 7, 2, 6
Offset: 1

Views

Author

Ralf Stephan, Oct 23 2004

Keywords

Crossrefs

Programs

  • Mathematica
    a[n_] := Mod[n / 2^IntegerExponent[n, 2], 9]; Array[a, 100] (* Amiram Eldar, Aug 29 2024 *)
  • PARI
    a(n) = (n>>valuation(n, 2))%9 \\Charles R Greathouse IV, May 14 2014

Formula

a(n) = A010878(A000265(n)).
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = 4. - Amiram Eldar, Aug 29 2024

A242313 Numbers belonging to a geometric sequence whose ratio is 2 and whose first term ends in 1.

Original entry on oeis.org

1, 2, 4, 8, 11, 16, 21, 22, 31, 32, 41, 42, 44, 51, 61, 62, 64, 71, 81, 82, 84, 88, 91, 101, 102, 111, 121, 122, 124, 128, 131, 141, 142, 151, 161, 162, 164, 168, 171, 176, 181, 182, 191, 201, 202, 204, 211, 221, 222, 231, 241, 242, 244, 248, 251, 256, 261
Offset: 1

Views

Author

J. Lowell, May 10 2014

Keywords

Comments

Numbers such that A099551(n) = 1.
Numbers of the form 2^m * (10n + 1). - Charles R Greathouse IV, May 14 2014

Examples

			176 is in the sequence because it belongs to 11, 22, 44, 88, 176, with first term 11.
96, which belongs to 3, 6, 12, 24, 48, 96 with first term 3, is not a term.
		

Crossrefs

Cf. A099551.

Programs

  • PARI
    isok(n) = ((n/2^valuation(n, 2)) % 10) == 1; \\ Michel Marcus, May 14 2014

Formula

a(n) = 5n + O(log n). - Charles R Greathouse IV, May 14 2014

Extensions

More terms from Michel Marcus, May 14 2014
Showing 1-8 of 8 results.