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

A053839 a(n) = (sum of digits of n written in base 4) modulo 4.

Original entry on oeis.org

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

Views

Author

Henry Bottomley, Mar 28 2000

Keywords

Comments

a(n) is the third row of the array in A141803. - Andrey Zabolotskiy, May 16 2016
This is the fixed point of the morphism 0->0123, 1->1230, 2->2301, 3->3012 starting with 0. Let t be the (nonperiodic) sequence of positions of 0, and likewise, u for 1, v for 2, and w for 3; then t(n)/n -> 4, u(n)/n -> 4, v(n)/n -> 4, w(n)/n -> 4, and t(n) + u(n) + v(n) + w(n) = 16*n - 6 for n >= 1. - Clark Kimberling, May 31 2017

Examples

			First three iterations of the morphism 0->0123, 1->1230, 2->2301, 3->3012:
  0123
  0123123023013012
  0123123023013012123023013012012323013012012312303012012312302301
		

Crossrefs

Programs

  • Maple
    seq(convert(convert(n,base,4),`+`) mod 4, n=0..100); # Robert Israel, May 18 2016
  • Mathematica
    Mod[Total@ IntegerDigits[#, 4], 4] & /@ Range[0, 120] (* Michael De Vlieger, May 17 2016 *)
    s = Nest[Flatten[# /. {0 -> {0, 1, 2, 3}, 1 -> {1, 2, 3, 0}, 2 -> {2, 3, 0, 1}, 3 -> {3, 0, 1, 2}}] &, {0}, 9];   (* - Clark Kimberling, May 31 2017 *)
  • PARI
    a(n) = vecsum(digits(n,4)) % 4; \\ Michel Marcus, May 16 2016
    
  • PARI
    a(n) = sumdigits(n, 4) % 4; \\ Michel Marcus, Jul 04 2018

Formula

a(n) = A010873(A053737(n)). - Andrey Zabolotskiy, May 18 2016
G.f. G(x) satisfies x^81*G(x) - (x^72+x^75+x^78+x^81)*G(x^4) + (x^48+x^60+x^63-x^64+x^72+x^75-x^76+x^78-x^79-x^88-x^91-x^94)*G(x^16) + (-1+x^16-x^48-x^60-x^63+2*x^64+x^76+x^79-x^80+x^112+x^124+x^127-x^128-x^140-x^143)*G(x^64) + (1-x^16-x^64+x^80-x^256+x^272+x^320-x^336)*G(x^256) = 0. - Robert Israel, May 18 2016

A287556 Start with 0 and repeatedly substitute 0->0132, 1->1320, 2->3201, 3->2013.

Original entry on oeis.org

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

Views

Author

Clark Kimberling, May 31 2017

Keywords

Comments

This is the fixed point of the morphism 0->0132, 1->1320, 2->3201, 3->2013 starting with 0. Let t be the (nonperiodic) sequence of positions of 0, and likewise, u for 1, v for 2, and w for 3; then t(n)/n -> 4, u(n)/n -> 4, v(n)/n -> 4, w(n)/n -> 4. Also, t(n) + u(n) + v(n) + w(n) = 16*n - 6 for n >= 1.
In the following guide to related sequences, column 1 indexes fixed points on {0,1,2,3}, and column 2 indicates position sequences of 0, 1, 2, 3. Those sequences therefore comprise a 4-way splitting of the positive integers.
Fixed points of morphisms: Position sequences:
A053839: 0->0123, 1->1230, 2->2301, 3->3012 A287552-A287555
A287556: 0->0132, 1->1320, 2->3201, 3->2013 A287557-A287560
A287561: 0->0213, 1->2130, 2->1302, 3->3021 A287562-A287565
A287566: 0->0231, 1->2310, 2->3102, 3->1023 A287567-A287570
A287571: 0->0312, 1->3120, 2->1203, 3->2031 A287572-A287575
A287576: 0->0321, 1->3210, 2->2103, 3->1032 A287577-A287580

Examples

			First three iterations of the morphism:
0132
0132132020133201
0132132020133201132020133201013232010132132020132013320101321320
		

Crossrefs

Programs

  • Mathematica
    s = Nest[Flatten[# /. {0 -> {0, 1, 3, 2}, 1 -> {1, 3, 2, 0}, 2 -> {3, 2, 0, 1}, 3 -> {2, 0, 1, 3}}] &, {0}, 9]; (* A287556 *)
    Flatten[Position[s, 0]]; (* A287557 *)
    Flatten[Position[s, 1]]; (* A287558 *)
    Flatten[Position[s, 2]]; (* A287559 *)
    Flatten[Position[s, 3]]; (* A287560 *)

A287552 Positions of 0 in A053839.

Original entry on oeis.org

1, 8, 11, 14, 20, 23, 26, 29, 35, 38, 41, 48, 50, 53, 60, 63, 68, 71, 74, 77, 83, 86, 89, 96, 98, 101, 108, 111, 113, 120, 123, 126, 131, 134, 137, 144, 146, 149, 156, 159, 161, 168, 171, 174, 180, 183, 186, 189, 194, 197, 204, 207, 209, 216, 219, 222, 228
Offset: 1

Views

Author

Clark Kimberling, May 31 2017

Keywords

Comments

a(n) - a(n-1) is in {1,2,3,4,5,6,7} for n >= 1; also, 4n - a(n) is in {0,1,2,3} for n >= 1. The first 20 numbers 4n - a(n) are 3, 0, 1, 2, 0, 1, 2, 3, 1, 2, 3, 0, 2, 3, 0, 1, 0, 1, 2, 3, with
0 in positions given by A287553,
1 in positions given by A287554,
2 in positions given by A287555,
3 in positions given by A287552.

Crossrefs

Programs

  • Mathematica
    s = Nest[Flatten[# /. {0 -> {0, 1, 2, 3}, 1 -> {1, 2, 3, 0}, 2 -> {2, 3, 0, 1}, 3 -> {3, 0, 1, 2}}] &, {0}, 9];  (* A053839 *)
    Flatten[Position[s, 0]]; (* A287552 *)
    Flatten[Position[s, 1]]; (* A287553 *)
    Flatten[Position[s, 2]]; (* A287554 *)
    Flatten[Position[s, 3]]; (* A287555 *)

A287553 Positions of 1 in A053839.

Original entry on oeis.org

2, 5, 12, 15, 17, 24, 27, 30, 36, 39, 42, 45, 51, 54, 57, 64, 65, 72, 75, 78, 84, 87, 90, 93, 99, 102, 105, 112, 114, 117, 124, 127, 132, 135, 138, 141, 147, 150, 153, 160, 162, 165, 172, 175, 177, 184, 187, 190, 195, 198, 201, 208, 210, 213, 220, 223, 225
Offset: 1

Views

Author

Clark Kimberling, May 31 2017

Keywords

Comments

a(n) - a(n-1) is in {1,2,3,4,5,6,7} for n >= 1; also, 4n - a(n) is in {0,1,2,3} for n >= 1. The first 20 numbers 4n - a(n) are 2, 3, 0, 1, 3, 0, 1, 2, 0, 1, 2, 3, 1, 2, 3, 0, 3, 0, 1, 2, with
0 in positions given by A287554,
1 in positions given by A287555,
2 in positions given by A287552,
3 in positions given by A287553.

Crossrefs

Programs

  • Mathematica
    s = Nest[Flatten[# /. {0 -> {0, 1, 2, 3}, 1 -> {1, 2, 3, 0}, 2 -> {2, 3, 0, 1}, 3 -> {3, 0, 1, 2}}] &, {0}, 9];         (* A053839 *)
    Flatten[Position[s, 0]]; (* A287552 *)
    Flatten[Position[s, 1]]; (* A287553 *)
    Flatten[Position[s, 2]]; (* A287554 *)
    Flatten[Position[s, 3]]; (* A287555 *)

A287554 Positions of 2 in A053839.

Original entry on oeis.org

3, 6, 9, 16, 18, 21, 28, 31, 33, 40, 43, 46, 52, 55, 58, 61, 66, 69, 76, 79, 81, 88, 91, 94, 100, 103, 106, 109, 115, 118, 121, 128, 129, 136, 139, 142, 148, 151, 154, 157, 163, 166, 169, 176, 178, 181, 188, 191, 196, 199, 202, 205, 211, 214, 217, 224, 226
Offset: 1

Views

Author

Clark Kimberling, May 31 2017

Keywords

Comments

a(n) - a(n-1) is in {1,2,3,4,5,6,7} for n >= 1; also, 4n - a(n) is in {0,1,2,3} for n >= 1. The first 20 numbers 4n - a(n) are 1, 2, 3, 0, 2, 3, 0, 1, 3, 0, 1, 2, 0, 1, 2, 3, 2, 3, 0, 1, with
0 in positions given by A287555,
1 in positions given by A287552,
2 in positions given by A287553,
3 in positions given by A287554.

Crossrefs

Programs

  • Mathematica
    s = Nest[Flatten[# /. {0 -> {0, 1, 2, 3}, 1 -> {1, 2, 3, 0}, 2 -> {2, 3, 0, 1}, 3 -> {3, 0, 1, 2}}] &, {0}, 9];  (* A053839 *)
    Flatten[Position[s, 0]]; (* A287552 *)
    Flatten[Position[s, 1]]; (* A287553 *)
    Flatten[Position[s, 2]]; (* A287554 *)
    Flatten[Position[s, 3]]; (* A287555 *)
Showing 1-5 of 5 results.