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

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 *)

A287555 Positions of 3 in A053839.

Original entry on oeis.org

4, 7, 10, 13, 19, 22, 25, 32, 34, 37, 44, 47, 49, 56, 59, 62, 67, 70, 73, 80, 82, 85, 92, 95, 97, 104, 107, 110, 116, 119, 122, 125, 130, 133, 140, 143, 145, 152, 155, 158, 164, 167, 170, 173, 179, 182, 185, 192, 193, 200, 203, 206, 212, 215, 218, 221, 227
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 0, 1, 2, 3, 1, 2, 3, 0, 2, 3, 0, 1, 3, 0, 1, 2, 1, 2, 3, 0, with
0 in positions given by A287552,
1 in positions given by A287553,
2 in positions given by A287554,
3 in positions given by A287555.

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 *)

A273149 a(n) = A053839(n)+1.

Original entry on oeis.org

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

Views

Author

William K. Grannis, May 16 2016

Keywords

Comments

A four-way fair share sequence. This is similar to the Thue-Morse Sequence. The Thue-Morse Sequence is the fairest way to split objects amongst two groups. If we call the groups A and B, most people split ABABABABABABABABABABABAB.......
This is unfair for B, because out of the best 2, A gets the best. Out of the second best 2, a gets the best. The Thue-Morse Sequence solves this:
ABBABAABBAABABBABAABABBAABBABAAB... The easiest way to generate the Thue-Morse Sequence is starting with a 1. Every 1 becomes 12. Every 2 becomes 21. Thus the sequence is obtained by recursion.
The present sequence is the same, but for splitting objects amongst 4 groups. Start with a 1. Every 1 becomes 1,2,3,4. Every 2 becomes 2,3,4,1. Every 3 becomes 3,4,1,2. Every 4 becomes 4,1,2,3.

Crossrefs

A053838 a(n) = (sum of digits of n written in base 3) modulo 3.

Original entry on oeis.org

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

Views

Author

Henry Bottomley, Mar 28 2000

Keywords

Comments

Start with 0, repeatedly apply the morphism 0->012, 1->120, 2->201. This is a ternary version of the Thue-Morse sequence A010060. See Brlek (1989). - N. J. A. Sloane, Jul 10 2012
A090193 is generated by the same mapping starting with 1. A090239 is generated by the same mapping starting with 2. - Andrey Zabolotskiy, May 04 2016

Crossrefs

Equals A026600(n+1) - 1.

Programs

  • Maple
    A053838 := proc(n)
        add(d,d=convert(n,base,3)) ;
        modp(%,3) ;
    end proc:
    seq(A053838(n),n=0..100) ; # R. J. Mathar, Nov 04 2017
  • Mathematica
    Nest[ Flatten[ # /. {0 -> {0, 1, 2}, 1 -> {1, 2, 0}, 2 -> {2, 0, 1}}] &, {0}, 7] (* Robert G. Wilson v, Mar 08 2005 *)
  • PARI
    a(n) = vecsum(digits(n, 3)) % 3; \\ Michel Marcus, May 04 2016
    
  • Python
    from sympy.ntheory import digits
    def A053838(n): return sum(digits(n,3)[1:])%3 # Chai Wah Wu, Feb 28 2025

Formula

a(n) = A010872(A053735(n)) =(n+a(floor[n/3])) mod 3. So one can construct sequence by starting with 0 and mapping 0->012, 1->120 and 2->201 (e.g. 0, 012, 012120201, 012120201120201012201012120, ...) and looking at n-th digit of a term with sufficient digits.
a(n) = A004128(n) mod 3. [Gary W. Adamson, Aug 24 2008]

A053837 Sum of digits of n modulo 10.

Original entry on oeis.org

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

Views

Author

Henry Bottomley, Mar 28 2000

Keywords

Examples

			a(59)=4 because 5+9 = 14 = 4 mod 10.
		

Crossrefs

Programs

Formula

a(n) = A010879(A007953(n)) = (n+a(floor[n/10])) mod 10. So can construct sequence by starting with 0 and mapping 0->0123456789, 1->1234567890, 2->2345678901 etc. (e.g. 0, 0123456789, 0123456789123456789023456789013456789012456..., etc.) and looking at n-th digit of a term with sufficient digits.

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 *)

A079498 Numbers whose sum of digits in base b gives 0 (mod b), for b = 3.

Original entry on oeis.org

0, 5, 7, 11, 13, 15, 19, 21, 26, 29, 31, 33, 37, 39, 44, 45, 50, 52, 55, 57, 62, 63, 68, 70, 74, 76, 78, 83, 85, 87, 91, 93, 98, 99, 104, 106, 109, 111, 116, 117, 122, 124, 128, 130, 132, 135, 140, 142, 146, 148, 150, 154, 156, 161, 163, 165, 170, 171, 176, 178, 182, 184
Offset: 1

Views

Author

Carlos Alves, Jan 21 2003

Keywords

Comments

In base 2 this gives the "Evil Numbers" (cf. A001969). One may conjecture that in base b the asymptotic slope will be b and asymptotic density 1/b for each result (mod b). Cases b=31 or b=61 gave considerable number of primes on the sequence.
Proof of this conjecture: in general, the sequence d with terms d(n) = sum of digits of n written in base b (mod b) is a fixed point of the generalized Thue-Morse morphism 0->01..b-1, 1->12..0, etc. See A053839 for the case b=4. It follows directly from this that all symbols have asymptotic density 1/b, and therefore that the positional sequences all have asymptotic slope b. - Michel Dekking, Apr 18 2019
Positions of 0's in A053838. Cf. A026601.

Examples

			83 is a term since 83 = (1,0,0,0,2)_3 and 1 + 0 + 0 + 0 + 2 = 3 == 0 (mod 3).
		

Crossrefs

Cf. A001969. See A053840 for base b=5. See A141803 for an array with all b.

Programs

  • Mathematica
    Ev = Function[{b, x}, vx = IntegerDigits[x, b]; Mod[Apply[Plus, vx], b]]; Seq = Function[{b, n}, Flatten[Position[Table[Ev[b, k], {k, 0, n}], 0]] - 1]; sb = Seq[3, 1000]

Extensions

a(1) = 0 inserted and offset corrected by Amiram Eldar, Jan 05 2020
Showing 1-9 of 9 results.