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.

A092412 Fixed point of the morphism 0->11, 1->12, 2->13, 3->10, starting from a(1) = 1.

Original entry on oeis.org

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

Views

Author

Philippe Deléham, Mar 22 2004

Keywords

Crossrefs

Cf. A001511, A033485, A035263, A346070 (same with values 3,0,1,2).

Programs

  • Mathematica
    Nest[ Function[ l, {Flatten[(l /. {0 -> {1, 1}, 1 -> {1, 2}, 2 -> {1, 3}, 3 -> {1, 0}})] }], {0}, 7] (* Robert G. Wilson v, Mar 04 2005 *)
    SubstitutionSystem[{0 -> {1, 1}, 1 -> {1, 2}, 2 -> {1, 3}, 3 -> {1, 0}}, {1}, 7] // Last (* Jean-François Alcover, Sep 20 2019 *)
    Mod[IntegerExponent[Range[100], 2] + 1, 4] (* Paolo Xausa, Feb 25 2025 *)
  • PARI
    a(n)=(1 + valuation(n, 2)) %4; \\ Andrew Howroyd, Aug 06 2018
    
  • Python
    def A092412(n): return (n&-n).bit_length()&3 # Chai Wah Wu, Jul 13 2022

Formula

a(n) = A001511(n) mod 4.
a(2n+1) = 1; a(2n) = a(n) + 1 mod 4.
a(n) == A035263(n) (mod 2); a(n) == A033485(n) (mod 2).
Multiplicative with a(2^e) = (1 + e) mod 4, a(p^e) = 1 for odd prime p. - Andrew Howroyd, Aug 06 2018
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = 22/15. - Amiram Eldar, Nov 29 2022
Dirichlet g.f.: zeta(s)*(3*2^s+2^(2*s+1)+2^(3*s))/(1+2^s+4^s+8^s). - Amiram Eldar, Jan 04 2023