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.

Previous Showing 11-20 of 24 results. Next

A354384 Difference sequence of A356133.

Original entry on oeis.org

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

Views

Author

Clark Kimberling, Aug 04 2022

Keywords

Crossrefs

Cf. A026430, A356133, A091855 (positions of 2), A036554 (positions of 3), A091855 (positions of 4).

Programs

  • Mathematica
    u = Accumulate[1 + ThueMorse /@ Range[0, 200]]  (* A026430 *)
    v = Complement[Range[Max[u]], u];  (* A356133 *)
    Differences[v] (* A354384 *)

Formula

a(n) = A007413(n) + 1.
a(n) = A036580(n) + 2.

A026430 a(n) is the sum of first n terms of A001285 (Thue-Morse sequence).

Original entry on oeis.org

0, 1, 3, 5, 6, 8, 9, 10, 12, 14, 15, 16, 18, 19, 21, 23, 24, 26, 27, 28, 30, 31, 33, 35, 36, 37, 39, 41, 42, 44, 45, 46, 48, 50, 51, 52, 54, 55, 57, 59, 60, 61, 63, 65, 66, 68, 69, 70, 72, 73, 75, 77, 78, 80, 81, 82, 84, 86, 87, 88, 90, 91, 93
Offset: 0

Views

Author

Keywords

Crossrefs

Cf. A001285, A356133 (complement).
Cf. A115384.

Programs

  • Haskell
    a026430 n = a026430_list !! n
    a026430_list = scanl (+) 0 a001285_list -- Reinhard Zumkeller, Jun 28 2013
    
  • Mathematica
    A001285 = Table[ Mod[ Sum[ Mod[ Binomial[n, k], 2], {k, 0, n}], 3], {n, 0, 61}]; Accumulate[A001285] (* Jean-François Alcover, Sep 25 2012 *)
    Join[{0}, Accumulate[1 + ThueMorse /@ Range[0, 100]]] (* Jean-François Alcover, Sep 18 2019, from version 10.2 *)
  • PARI
    first(n)=my(v=vector(n)); v[1]=1; for(k=2,n,v[k]=if(k%2,v[k\2+1]-v[k\2])+k\2*3); concat(0,v) \\ Charles R Greathouse IV, May 09 2016
    
  • Python
    from itertools import accumulate, islice
    def A026430_gen(): # generator of terms
        yield from (0,1)
        blist, s = [1], 1
        while True:
            c = [3-d for d in blist]
            blist += c
            yield from (s+d for d in accumulate(c))
            s += sum(c)
    A026430_list = list(islice(A026430_gen(),30)) # Chai Wah Wu, Feb 22 2023
    
  • Python
    def A026430(n): return n+(n-1>>1)+(n-1&1|(n.bit_count()&1^1)) # Chai Wah Wu, Mar 01 2023

Formula

a(0)=0, a(1)=1, a(2n) = 3n, a(2n+1) = -a(n) + a(n+1) + 3n. - Ralf Stephan, Oct 08 2003
G.f.: x*(3/(1 - x)^2 - Product_{k>=1} (1 - x^(2^k)))/2. - Ilya Gutkovskiy, Apr 03 2019

A360393 Complement of A360392.

Original entry on oeis.org

1, 2, 4, 6, 9, 13, 15, 19, 22, 24, 27, 31, 34, 36, 40, 42, 45, 49, 51, 55, 58, 60, 64, 66, 69, 73, 76, 78, 81, 85, 87, 91, 94, 96, 99, 103, 106, 108, 112, 114, 117, 121, 124, 126, 129, 133, 135, 139, 142, 144, 148, 150, 153, 157, 159, 163, 166, 168, 171, 175
Offset: 1

Views

Author

Clark Kimberling, Feb 05 2023

Keywords

Crossrefs

Programs

  • Mathematica
    v = 2 + Accumulate[1 + ThueMorse /@ Range[0, 200]]; (* A360392 *)
    Complement[Range[Max[v]], v]    (* A360393 *)
  • PARI
    a(n) = if(n < 3, [1, 2][n], 3*n - 5 - hammingweight(n-3)%2) \\ Winston de Greef, Mar 27 2023
  • Python
    from itertools import islice
    def A360393_gen(): # generator of terms
        yield from (1,2)
        blist, s = [1], 3
        while True:
            c = [3-d for d in blist]
            blist += c
            for d in c:
                yield from range(s+1,s:=s+d)
    A360393_list = list(islice(A360393_gen(),30)) # Chai Wah Wu, Feb 22 2023
    

Formula

A360393(n) = A356133(n-2) + 2 for n>=3

A360394 Intersection of A026430 and A360392.

Original entry on oeis.org

3, 5, 8, 10, 12, 14, 16, 18, 21, 23, 26, 28, 30, 33, 35, 37, 39, 41, 44, 46, 48, 50, 52, 54, 57, 59, 61, 63, 65, 68, 70, 72, 75, 77, 80, 82, 84, 86, 88, 90, 93, 95, 98, 100, 102, 105, 107, 109, 111, 113, 116, 118, 120, 123, 125, 128, 130, 132, 134, 136, 138
Offset: 1

Views

Author

Clark Kimberling, Feb 05 2023

Keywords

Comments

This is the first of four sequences that partition the positive integers. Starting with a general overview, suppose that u = (u(n)) and v = (v(n)) are increasing sequences of positive integers. Let u' and v' be their complements, and assume that the following four sequences are infinite:
(1) u ^ v = intersection of u and v (in increasing order);
(2) u ^ v';
(3) u' ^ v;
(4) u' ^ v'.
Every positive integer is in exactly one of the four sequences. The limiting densities of these four sequences are 4/9, 2/9, 2/9, and 1/9, respectively (and likewise for A360402-A360405).
For A360394, u, v, u', v', are sequences obtained from the Thue-Morse sequence, A026430, as follows:
u = A026530 = (1,3,5,6,8,9,10, 12, ... ) = partial sums of A026430
u' = A356133 = (2,4,7,11,13,17, 20, ... ) = complement of u
v = u + 1 = A285954, except its initial 1
v' = complement of v.

Examples

			(1)  u ^ v = (3, 5, 8, 10, 12, 14, 16, 18, 21, 23, 26, 28, 30, 33, ...) =  A360394
(2)  u ^ v' = (1, 6, 9, 15, 19, 24, 27, 31, 36, 42, 45, 51, 55, 60, ...) =  A360395
(3)  u' ^ v = (7, 11, 17, 20, 25, 29, 32, 38, 43, 47, 53, 56, 62, ...) = A360396
(4)  u' ^ v' = (2, 4, 13, 22, 34, 40, 49, 58, 64, 76, 85, 94, 106, ...) = A360397
		

Crossrefs

Programs

  • Mathematica
    z = 400;
    u = Accumulate[1 + ThueMorse /@ Range[0, z]];   (* A026430 *)
    u1 = Complement[Range[Max[u]], u];  (* A356133 *)
    v = u + 2 ; (* A360392 *)
    v1 = Complement[Range[Max[v]], v];  (* A360393 *)
    Intersection[u, v]     (* A360394 *)
    Intersection[u, v1]    (* A360395 *)
    Intersection[u1, v]    (* A360396 *)
    Intersection[u1, v1]   (* A360397 *)

A359277 Intersection of A026430 and (1 + A285953).

Original entry on oeis.org

6, 9, 10, 15, 16, 19, 24, 27, 28, 31, 36, 37, 42, 45, 46, 51, 52, 55, 60, 61, 66, 69, 70, 73, 78, 81, 82, 87, 88, 91, 96, 99, 100, 103, 108, 109, 114, 117, 118, 121, 126, 129, 130, 135, 136, 139, 144, 145, 150, 153, 154, 159, 160, 163, 168, 171, 172, 175
Offset: 1

Views

Author

Clark Kimberling, Jan 26 2023

Keywords

Comments

This is the first of three sequences that partition the positive integers. Taking u = A026430 and v = 1 + A285953 (which is A285953 except for its initial 1), the three sequences are (1) u ^ v = intersection of u and v (in increasing order); (2) u ^ v'; and (3) u' ^ v. The limiting density of each of these is 1/3.

Examples

			(1)  u ^ v = (6, 9, 10, 15, 16, 19, 24, 27, 28, 31, 36, 37, ...) =    A359277
(2)  u ^ v' = (1, 3, 5, 8, 12, 14, 18, 21, 23, 26, 30, 33, 35, ...) =  A285953, except for the initial 1
(3)  u' ^ v = (2, 4, 7, 11, 13, 17, 20, 22, 25, 29, 32, 34, 38, ...) = A356133
		

Crossrefs

Cf. A026530, A285954, A356133, A359352 to A360139) (results of compositions instead of intersections).

Programs

  • Mathematica
    z = 200;
    u = Accumulate[1 + ThueMorse /@ Range[0, z]]   (* A026430 *)
    u1 = Complement[Range[Max[u]], u]  (* A356133 *)
    v = u + 1
    v1 = Complement[Range[Max[v]], v]
    Intersection[u, v]    (* A359277 *)
    Intersection[u, v1]   (* A285953 *)
    Intersection[u1, v]   (* A356133 *)

A359352 a(n) = A026430(1 + A026430(n)).

Original entry on oeis.org

3, 6, 9, 10, 14, 15, 16, 19, 23, 24, 26, 28, 30, 33, 36, 37, 41, 42, 44, 46, 48, 51, 54, 55, 57, 60, 63, 65, 68, 69, 70, 73, 77, 78, 80, 82, 84, 87, 90, 91, 93, 96, 99, 100, 103, 105, 107, 109, 111, 114, 117, 118, 121, 123, 125, 128, 130, 132, 134, 136, 138
Offset: 1

Views

Author

Clark Kimberling, Jan 26 2023

Keywords

Comments

This is the first of four sequences that partition the positive integers. Suppose that u = (u(n)) and v = (v(n)) are increasing sequences of positive integers. Let u' and v' be their (increasing) complements, and consider these four sequences:
(1) u o v, defined by (u o v)(n) = u(v(n));
(2) u o v';
(3) u' o v;
(4) v' o u'.
Every positive integer is in exactly one of the four sequences. Their limiting densities are 4/9, 2/9, 2/9, 1/9, respectively.

Examples

			(1) u o v = (3, 6, 9, 10, 14, 15, 16, 19, 23, 24, 26, 28, 30, 33, 36, 37, 41, ...) = A359352
(2) u o v' = (1, 5, 8, 12, 18, 21, 27, 31, 35, 39, 45, 50, 52, 59, 61, 66, 72, ...) = A359353
(3) u' o v = (4, 11, 17, 20, 25, 29, 32, 38, 43, 47, 49, 56, 58, 64, 71, 74, ...) = A360134
(4) u' o v' = (2, 7, 13, 22, 34, 40, 53, 62, 67, 76, 89, 97, 104, 115, 122, ...) = A360135
		

Crossrefs

Cf. A026530, A359352, A285953, A285954, A359277 (intersections instead of results of composition), A359353-A360139.

Programs

  • Mathematica
    z = 2000; zz = 100;
    u = Accumulate[1 + ThueMorse /@ Range[0, 600]]; (* A026430 *)
    u1 = Complement[Range[Max[u]], u];  (* A356133 *)
    v = u + 1;  (* A285954 *)
    v1 = Complement[Range[Max[v]], v]; (* A285953 *)
    Table[u[[v[[n]]]], {n, 1, zz}]     (* A359352 *)
    Table[u[[v1[[n]]]], {n, 1, zz}]    (* A359353 *)
    Table[u1[[v[[n]]]], {n, 1, zz}]    (* A360134 *)
    Table[u1[[v1[[n]]]], {n, 1, zz}]   (* A360135 *)
  • Python
    def A359352(n): return (m:=n+1+(n-1>>1)+(n-1&1|(n.bit_count()&1^1)))+(m-1>>1)+(m-1&1|(m.bit_count()&1^1)) # Chai Wah Wu, Mar 01 2023

A360398 a(n) = A026430(1 + A360392(n)).

Original entry on oeis.org

5, 8, 10, 12, 15, 16, 18, 21, 24, 26, 27, 30, 31, 35, 37, 39, 42, 44, 45, 48, 50, 52, 55, 57, 59, 61, 65, 66, 69, 70, 72, 75, 78, 80, 81, 84, 86, 88, 91, 93, 95, 98, 100, 102, 105, 107, 108, 111, 113, 116, 118, 120, 123, 125, 126, 129, 132, 134, 135, 138
Offset: 1

Views

Author

Clark Kimberling, Feb 10 2023

Keywords

Comments

This is the first of four sequences that partition the positive integers. Suppose that u = (u(n)) and v = (v(n)) are increasing sequences of positive integers. Let u' and v' be their (increasing) complements, and consider these four sequences:
(1) u o v, defined by (u o v)(n) = u(v(n));
(2) u o v';
(3) u' o v;
(4) v' o u'.
Every positive integer is in exactly one of the four sequences. Their limiting densities are 4/9, 2/9, 2/9, 1/9 (and likewise for A360394-A360397 and A360402-A360405).

Examples

			(1)  u o v = (5, 8, 10, 12, 15, 16, 18, 21, 24, 26, 27, 30, 31, 35, 37, 39, ...) = A360398
(2)  u o v' = (1, 3, 6, 9, 14, 19, 23, 28, 33, 36, 41, 46, 51, 54, 60, 63, 68, ...) = A360399
(3)  u' o v = (7, 13, 20, 22, 29, 32, 34, 40, 47, 49, 53, 58, 62, 67, 74, 76, ...) = A360400
(4)  u' o v' = (2, 4, 11, 17, 25, 38, 43, 56, 64, 71, 79, 92, 101, 106, 119, ...) = A360401
		

Crossrefs

Cf. A026530, A356133, A360392, A360393, A360399, A286355, A286356, A360394 (intersections instead of results of composition), A360402-A360405.

Programs

  • Mathematica
    z = 2000;
    u = Accumulate[1 + ThueMorse /@ Range[0, 600]]; (* A026430 *)
    u1 = Complement[Range[Max[u]], u];  (* A356133 *)
    v = u + 2;  (* A360392 *)
    v1 = Complement[Range[Max[v]], v];    (* A360393 *)
    zz = 100;
    Table[u[[v[[n]]]], {n, 1, zz}]    (* A360398 *)
    Table[u[[v1[[n]]]], {n, 1, zz}]   (* A360399 *)
    Table[u1[[v[[n]]]], {n, 1, zz}]   (* A360400 *)
    Table[u1[[v1[[n]]]], {n, 1, zz}]  (* A360401 *)

A360402 a(n) = A360392(A026430(n)).

Original entry on oeis.org

3, 7, 10, 11, 14, 16, 17, 20, 23, 25, 26, 29, 30, 33, 37, 38, 41, 43, 44, 47, 48, 52, 54, 56, 57, 61, 63, 65, 68, 70, 71, 74, 77, 79, 80, 83, 84, 88, 90, 92, 93, 97, 100, 101, 104, 105, 107, 110, 111, 115, 118, 119, 122, 123, 125, 128, 131, 132, 134, 137
Offset: 1

Views

Author

Clark Kimberling, Mar 11 2023

Keywords

Comments

This is the first of four sequences that partition the positive integers. Suppose that u = (u(n)) and v = (v(n)) are increasing sequences of positive integers. Let u' and v' be their (increasing) complements, and consider these four sequences:
(1) v o u, defined by (v o u)(n) = v(u(n));
(2) v' o u;
(3) v o u';
(4) v' o u.
Every positive integer is in exactly one of the four sequences. Their limiting densities are 4/9, 2/9, 2/9, 1/9, respectively (and likewise for A360394-A360401).

Examples

			(1)  v o u = (3, 7, 10, 11, 14, 16, 17, 20, 23, 25, 26, 29, 30, 33, 37, ...) = A360402
(2)  v' o u = (1, 4, 9, 13, 19, 22, 24, 31, 36, 40, 42, 49, 51, 58, 64, ...) = A360403
(3)  v o u' = (5, 8, 12, 18, 21, 28, 32, 35, 39, 46, 50, 53, 59, 62, 67, ...) = A360404
(4)  v' o u' = (2, 6, 15, 27, 34, 45, 55, 60, 69, 81, 91, 96, 108, 114, ...) = A360405
		

Crossrefs

Cf. A026530, A360392, A360393, A360394-A3546352 (intersections instead of results of compositions), A360398-A360401 (results of reversed compositions), A360403, A360404, A360405.

Programs

  • Mathematica
    z = 2000; zz = 100;
    u = Accumulate[1 + ThueMorse /@ Range[0, 600]]; (* A026430 *)
    u1 = Complement[Range[Max[u]], u];  (* A356133 *)
    v = u + 2;  (* A360392 *)
    v1 = Complement[Range[Max[v]], v];  (* A360393 *)
    Table[v[[u[[n]]]], {n, 1, zz}]    (* A360402 *)
    Table[v1[[u[[n]]]], {n, 1, zz}]   (* A360403 *)
    Table[v[[u1[[n]]]], {n, 1, zz}]   (* A360404 *)
    Table[v1[[u1[[n]]]], {n, 1, zz}]  (* A360405 *)
  • Python
    def A360392(n): return n+2+(n-1>>1)+(n-1&1|(n.bit_count()&1^1))
    def A026430(n): return n+(n-1>>1)+(n-1&1|(n.bit_count()&1^1))
    def A360402(n): return A360392(A026430(n)) # Winston de Greef, Mar 24 2023

A360136 a(n) = 1 + A026430(A026430(n)).

Original entry on oeis.org

2, 6, 9, 10, 13, 15, 16, 19, 22, 24, 25, 28, 29, 32, 36, 37, 40, 42, 43, 46, 47, 51, 53, 55, 56, 60, 62, 64, 67, 69, 70, 73, 76, 78, 79, 82, 83, 87, 89, 91, 92, 96, 99, 100, 103, 104, 106, 109, 110, 114, 117, 118, 121, 122, 124, 127, 130, 131, 133, 136, 137
Offset: 1

Views

Author

Clark Kimberling, Feb 03 2023

Keywords

Comments

This is the first of four sequences that partition the positive integers. Suppose that u = (u(n)) and v = (v(n)) are increasing sequences of positive integers. Let u' and v' be their (increasing) complements, and consider these four sequences:
(1) v o u, defined by (v o u)(n) = v(u(n));
(2) v' o u;
(3) v o u';
(4) v' o u.
Every positive integer is in exactly one of the four sequences. Their limiting densities are 4/9, 2/9, 2/9, 1/9, respectively.

Examples

			(1)  v o u = (2, 6, 9, 10, 13, 15, 16, 19, 22, 24, 25, 28, 29, 32, 36, ...) = A360136
(2)  v' o u = (1, 5, 12, 14, 21, 23, 26, 33, 39, 41, 44, 50, 54, 59, 65, ...) = A360137
(3)  v o u' = (4, 7, 11, 17, 20, 27, 31, 34, 38, 45, 49, 52, 58, 61, 66, ...) = A360138
(4)  v' o u' = (3, 8, 18, 30, 35, 48, 57, 63, 72, 84, 93, 98, 111, 116, ...) = A360139
		

Crossrefs

Cf. A026530, A359352, A285953, A359277 (intersections instead of results of composition), A359352-A360135, A360137-A360139.

Programs

  • Mathematica
    z = 2000; zz = 100;
    u = Accumulate[1 + ThueMorse /@ Range[0, 600]]; (* A026430 *)
    u1 = Complement[Range[Max[u]], u];  (* A356133 *)
    v = u + 1;  (* A285954 *)
    v1 = Complement[Range[Max[v]], v];   (* A285953 *)
    Table[v[[u[[n]]]], {n, 1, zz}]       (* A360136 *)
    Table[v1[[u[[n]]]], {n, 1, zz}]      (* A360137 *)
    Table[v[[u1[[n]]]], {n, 1, zz}]      (* A360138 *)
    Table[v1[[u1[[n]]]], {n, 1, zz}]     (* A360139 *)
  • Python
    def A360136(n): return 1+(m:=n+(n-1>>1)+(n-1&1|(n.bit_count()&1^1)))+(m-1>>1)+(m-1&1|(m.bit_count()&1^1)) # Chai Wah Wu, Mar 01 2023

A359353 a(n) = A026430(A285953(n+1)).

Original entry on oeis.org

1, 5, 8, 12, 18, 21, 27, 31, 35, 39, 45, 50, 52, 59, 61, 66, 72, 75, 81, 86, 88, 95, 98, 102, 108, 113, 116, 120, 126, 129, 135, 139, 143, 147, 153, 158, 160, 167, 170, 174, 180, 185, 188, 192, 198, 201, 207, 212, 214, 221, 224, 228, 234, 237, 243, 248, 250
Offset: 1

Views

Author

Clark Kimberling, Jan 30 2023

Keywords

Comments

This is the second of four sequences that partition the positive integers. Suppose that u = (u(n)) and v = (v(n)) are increasing sequences of positive integers. Let u' and v' be their (increasing) complements, and consider these four sequences:
(1) u o v, defined by (u o v)(n) = u(v(n));
(2) u o v';
(3) u' o v;
(4) v' o u'.
Every positive integer is in exactly one of the four sequences. Their limiting densities are 4/9, 2/9, 2/9, 1/9, respectively.

Examples

			(1) u o v = (3, 6, 9, 10, 14, 15, 16, 19, 23, 24, 26, 28, 30, 33, 36, 37, 41, ...) = A359352
(2) u o v' = (1, 5, 8, 12, 18, 21, 27, 31, 35, 39, 45, 50, 52, 59, 61, 66, 72, ...) = A359353
(3) u' o v = (4, 11, 17, 20, 25, 29, 32, 38, 43, 47, 49, 56, 58, 64, 71, 74, ...) = A360134
(4) u' o v' = (2, 7, 13, 22, 34, 40, 53, 62, 67, 76, 89, 97, 104, 115, 122, ...) = A360135
		

Crossrefs

Cf. A026530, A359352, A285953, A285954, A359277 (intersections instead of results of composition), A359352, A360134-A360139.

Programs

  • Mathematica
    z = 2000; zz = 100;
    u = Accumulate[1 + ThueMorse /@ Range[0, 600]]; (* A026430 *)
    u1 = Complement[Range[Max[u]], u];  (* A356133 *)
    v = u + 1;  (* A285954 *)
    v1 = Complement[Range[Max[v]], v];  (* A285953 *)
    Table[u[[v[[n]]]], {n, 1, zz}]      (* A359352 *)
    Table[u[[v1[[n]]]], {n, 1, zz}]     (* A359353 *)
    Table[u1[[v[[n]]]], {n, 1, zz}]     (* A360134 *)
    Table[u1[[v1[[n]]]], {n, 1, zz}]    (* A360135 *)
Previous Showing 11-20 of 24 results. Next