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 51-60 of 214 results. Next

A292203 Primes as they appear in A003188.

Original entry on oeis.org

3, 2, 7, 5, 13, 11, 31, 29, 23, 19, 17, 53, 61, 59, 41, 43, 47, 37, 97, 103, 101, 109, 107, 127, 113, 83, 89, 73, 79, 71, 67, 193, 199, 197, 223, 211, 241, 251, 233, 239, 229, 227, 163, 167, 173, 191, 181, 179, 151, 149, 157, 137, 139, 131, 389, 397, 409, 401, 433, 439
Offset: 1

Views

Author

Robert G. Wilson v, Sep 11 2017

Keywords

Comments

a(n) is the m-th prime where m takes the values 2, 1, 4, 3, 6, 5, 11, 10, 9, 8, 7, 18, 15, 16, 17, 12, ... .

Crossrefs

Programs

  • Mathematica
    f[n_] := BitXor[n, Floor[n/2]]; Select[Array[f, 300], PrimeQ]

A307693 Rectangular quotient array, R, of A003188 read by descending antidiagonals; see Comments.

Original entry on oeis.org

1, 3, 1, 2, 3, 1, 6, 2, 2, 1, 7, 6, 4, 3, 1, 5, 7, 5, 2, 3, 1, 4, 5, 3, 6, 2, 2, 1, 12, 4, 8, 7, 5, 4, 2, 1, 13, 12, 9, 5, 6, 5, 4, 3, 1, 15, 13, 10, 4, 4, 3, 3, 2, 3, 1, 14, 15, 7, 12, 10, 8, 7, 6, 2, 3, 1, 10, 14, 6, 13, 11, 9, 9, 7, 6, 2, 2, 1, 11, 10, 16
Offset: 1

Views

Author

Clark Kimberling, Oct 26 2019

Keywords

Comments

Suppose that P = (p(m)) is a permutation of the positive integers, such as A038722. For each n >= 1, let q(n,k) be the k-th index m such that n divides p(m), and let r(n) = p(q(n,k))/n. Let R be the array having (r(n)) as row n. We call R the quotient array of P. Every row of R is a permutation of the positive integers.
In the present case that P = A003188, every row occurs infinitely many times. Specifically, if p is a prime (A000040), then for every multiple m*p of p, the rows numbered m*p are identical. See A327314 for the array that results by deleting duplicate rows from R.

Examples

			A003188 = (1, 3, 2, 6, 7, 5, 4, 12, 13, 15, 14, 10, 11, 9, 8, 24, 25, 27, 26, 30, 31, 29, 28, 20, ...)
Row 1 of R is just A003188. To get row 2 of R, skip the odds in A003188 and divide the evens by 2; row 2 equals row 1. Generally, to get row n, divide A003188 by n and then delete the non-integers.
________________
Northwest corner of R:
  1   3   2   6   7   5    4   12   13   15
  1   3   2   6   7   5    4   12   13   15
  1   2   4   5   3   8    9   10    7    6
  1   3   2   6   7   5    4   12   13   15
  1   3   2   5   6   4   10   11   12    8
  1   2   4   5   3   8    9   10    7    6
		

Crossrefs

Programs

  • Mathematica
    s = Table[BitXor[n, Floor[n/2]], {n, 300}]  (* A003188 *)
    g[n_] := Flatten[Position[Mod[s, n], 0]];
    u[n_] := s[[g[n]]]/n;
    TableForm[Table[Take[u[n], 10], {n, 1, 20}]]  (* A307693 array *)
    v[n_, k_] := u[n][[k]]
    Table[v[n - k + 1, k], {n, 14}, {k, n, 1, -1}] // Flatten (* A307693 sequence *)

A322018 a(n) = A006068(A129760(A003188(n))).

Original entry on oeis.org

0, 0, 3, 0, 7, 4, 7, 0, 15, 8, 11, 8, 15, 12, 15, 0, 31, 16, 19, 16, 23, 20, 23, 16, 31, 24, 27, 24, 31, 28, 31, 0, 63, 32, 35, 32, 39, 36, 39, 32, 47, 40, 43, 40, 47, 44, 47, 32, 63, 48, 51, 48, 55, 52, 55, 48, 63, 56, 59, 56, 63, 60, 63, 0, 127, 64, 67, 64, 71, 68, 71, 64, 79, 72, 75, 72, 79, 76, 79, 64, 95, 80, 83, 80, 87, 84, 87, 80
Offset: 0

Views

Author

Antti Karttunen, Nov 27 2018

Keywords

Comments

For all n, A207901(a(n)) divides A207901(n), and similarly for A302033.

Crossrefs

Programs

Formula

a(n) = A006068(A129760(A003188(n))).

A323895 Dirichlet inverse of binary Gray code, A003188.

Original entry on oeis.org

1, -3, -2, 3, -7, 7, -4, -3, -9, 27, -14, -10, -11, 15, 20, 3, -25, 35, -26, -45, -15, 55, -28, 13, 28, 43, 22, -24, -19, -91, -16, -3, 7, 99, 6, -58, -55, 103, -8, 63, -61, 55, -62, -94, 71, 111, -56, -16, -25, -148, 58, -73, -47, -107, 152, 33, 67, 75, -38, 196, -35, 63, 148, 3, 57, -53, -98, -171, 9, -59, -100, 78, -109, 219, -208, -178, 5, 13
Offset: 1

Views

Author

Antti Karttunen, Feb 08 2019

Keywords

Crossrefs

Programs

  • PARI
    up_to = 16384;
    DirInverseCorrect(v) = { my(u=vector(#v)); u[1] = (1/v[1]); for(n=2, #v, u[n] = (-u[1]*sumdiv(n, d, if(dA003188(n) = bitxor(n, n>>1);
    v323895 = DirInverseCorrect(vector(up_to,n,A003188(n)));
    A323895(n) = v323895[n];

A363710 a(n) is the number of pairs of nonnegative integers (x, y) such that x + y = n and A003188(x) AND A003188(y) = 0 (where AND denotes the bitwise AND operator).

Original entry on oeis.org

1, 2, 2, 2, 4, 4, 2, 2, 4, 8, 6, 4, 6, 4, 2, 2, 4, 8, 10, 8, 12, 12, 6, 4, 6, 12, 8, 4, 6, 4, 2, 2, 4, 8, 10, 8, 16, 20, 10, 8, 12, 24, 20, 12, 16, 12, 6, 4, 6, 12, 16, 12, 16, 16, 8, 4, 6, 12, 8, 4, 6, 4, 2, 2, 4, 8, 10, 8, 16, 20, 10, 8, 16, 32, 28, 20, 28
Offset: 0

Views

Author

Rémy Sigrist, Jun 17 2023

Keywords

Comments

Equivalently, a(n) is the number of k >= 0 such that A332497(k) + A332498(k) = n.
The set of pairs of nonnegative integers (x, y) such that A003188(x) AND A003188(y) = 0 is related to the T-square fractal (see illustration in Links section).

Examples

			For n = 8:
- we have:
  k  A332497(8-k)  A332497(k)  A332497(8-k) AND A332497(k)
  -  ------------  ----------  ---------------------------
  0            12           0                            0
  1             4           1                            0
  2             5           3                            1
  3             7           2                            2
  4             6           6                            6
  5             2           7                            2
  6             3           5                            1
  7             1           4                            0
  8             0          12                            0
- so a(8) = 4.
		

Crossrefs

Programs

  • Magma
    A131218:= func< n,k | BitwiseAnd(BitwiseXor(n, ShiftRight(n, 1)), BitwiseXor(k, ShiftRight(k, 1))) eq 0 select 1 else 0 >;
    A363710:= func< n | (&+[A131218(n-k,k): k in [0..n]]) >;
    [A363710(n): n in [0..100]]; // G. C. Greubel, Sep 06 2025
    
  • Mathematica
    A131218[n_, k_]:= Boole[BitAnd[BitXor[n, BitShiftRight[n, 1]], BitXor[k, BitShiftRight[k, 1]]] ==0];
    A363710[n_]:= A363710[n]= Sum[A131218[n-k,k], {k,0,n}];
    Table[A363710[n], {n,0,100}] (* G. C. Greubel, Sep 06 2025 *)
  • PARI
    a(n) = 2*sum(k=0, n\2, bitand(bitxor(n-k, (n-k)\2), bitxor(k, k\2))==0) - (n==0)
    
  • Python
    A363710=lambda n: sum(map(lambda k: not (k^k>>1)&(n-k^n-k>>1),range(n+1>>1)))<<1 if n else 1 # Natalia L. Skirrow, Jun 22 2023
    
  • SageMath
    def A363710(n): return sum(int( ((n-k)^^((n-k)>>1)) & (k^^(k>>1)) ==0) for k in range(n+1))
    print([A363710(n) for n in range(101)]) # G. C. Greubel, Sep 06 2025

Formula

a(n) = 2 iff n belongs to A075427.

A099891 XOR difference triangle of A003188 (Gray code numbers), read by rows.

Original entry on oeis.org

0, 1, 1, 3, 2, 3, 2, 1, 3, 0, 6, 4, 5, 6, 6, 7, 1, 5, 0, 6, 0, 5, 2, 3, 6, 6, 0, 0, 4, 1, 3, 0, 6, 0, 0, 0, 12, 8, 9, 10, 10, 12, 12, 12, 12, 13, 1, 9, 0, 10, 0, 12, 0, 12, 0, 15, 2, 3, 10, 10, 0, 0, 12, 12, 0, 0, 14, 1, 3, 0, 10, 0, 0, 0, 12, 0, 0, 0, 10, 4, 5, 6, 6, 12, 12, 12, 12, 0, 0, 0, 0, 11, 1
Offset: 0

Views

Author

Paul D. Hanna, Oct 29 2004

Keywords

Comments

Main diagonal is A099892, the XOR BINOMIAL transform of A003188. See A099884 for the definitions of the XOR BINOMIAL transform and the XOR difference triangle.

Examples

			Rows begin:
[0],
[1,1],
[3,2,3],
[2,1,3,0],
[6,4,5,6,6],
[7,1,5,0,6,0],
[5,2,3,6,6,0,0],
[4,1,3,0,6,0,0,0],
[12,8,9,10,10,12,12,12,12],
...
where A003188 fills the leftmost column.
		

Crossrefs

Cf. A047999, A003188 (column k=0), A006519 (column k=1), A099892 (diagonal n=k).
Other triangles: A099884, A099889, A099893.

Programs

  • PARI
    {T(n,k)=local(B);B=0;for(i=0,k,B=bitxor(B,binomial(k,i)%2*(bitxor((n-i),(n-i)\2))));B}

Formula

T(n, k) = SumXOR_{i=0..k} (C(k, i)mod 2)*(A003188(n-i)), where SumXOR is the analog of summation under the binary XOR operation and C(k, i)mod 2 = A047999(k, i). T(2^n, 2^n) = 3*2^(n-1) for n>0, with T(1, 1)=1 and T(k, k)=0 elsewhere.
T(n,1) = A006519(n), the lowest 1-bit of n (see formula by Franklin T. Adams-Watters in A003188). - Kevin Ryde, Jul 02 2020

A192483 G.f.: A(x) = Sum_{n>=0} x^n * A(x)^A003188(n) where A003188(n) = n XOR floor(n/2).

Original entry on oeis.org

1, 1, 2, 6, 18, 61, 220, 822, 3157, 12378, 49345, 199441, 815467, 3367153, 14020938, 58811032, 248260925, 1053893607, 4496248445, 19268100048, 82902438819, 357987967157, 1550951132419, 6739554074740, 29366902576469, 128287060703669
Offset: 0

Views

Author

Paul D. Hanna, Jul 01 2011

Keywords

Comments

A003188(n) is the decimal equivalent of the binary Gray code for n; A003188 forms a permutation of the nonnegative integers.

Examples

			G.f.: A(x) = 1 + x + 2*x^2 + 6*x^3 + 18*x^4 + 61*x^5 + 220*x^6 +...
The g.f. A(x) satisfies:
A(x) = 1 + x*A(x) + x^2*A(x)^3 + x^3*A(x)^2 + x^4*A(x)^6 + x^5*A(x)^7 + x^6*A(x)^5 + x^7*A(x)^4 + x^8*A(x)^12 + x^9*A(x)^13 + x^10*A(x)^15 +...
where the powers of A(x) are given by A003188, which begins:
[0,1,3,2,6,7,5,4,12,13,15,14,10,11,9,8,24,25,27,26,30,31,29,...].
		

Crossrefs

Programs

  • PARI
    {a(n)=local(A=1+x);for(i=1,n,A=sum(m=0,n,x^m*(A+x*O(x^n))^bitxor(m,m\2)));polcoeff(A,n)}

A327314 Rectangular array read by descending antidiagonals: the distinct rows of the quotient array, A307693, of A003188.

Original entry on oeis.org

1, 3, 1, 2, 2, 1, 6, 4, 3, 1, 7, 5, 2, 2, 1, 5, 3, 5, 4, 2, 1, 4, 8, 6, 3, 5, 2, 1, 12, 9, 4, 7, 4, 4, 3, 1, 13, 10, 10, 9, 3, 3, 2, 3, 1, 15, 7, 11, 8, 9, 8, 6, 2, 2, 1, 14, 6, 12, 6, 10, 9, 7, 6, 5, 2, 1, 10, 16, 8, 5, 11, 7, 5, 5, 4, 4, 2, 1, 11, 17, 9
Offset: 1

Views

Author

Clark Kimberling, Nov 01 2019

Keywords

Comments

Each row of the quotient array, A307693, occurs infinitely many times. Specifically, if p is a prime (A000040), then for every multiple m*p of p, the rows numbered m*p are identical. In the present array only the first occurrence of each row of A307693 is retained; these are the prime-numbered rows of A307693. Every row is a permutation of the positive integers, so that every positive integer occurs infinitely many times.

Examples

			Northwest corner:
  1   3   2   6   7   5   4   12  13  15
  1   2   4   5   3   8   9   10   7   6
  1   3   2   5   6   4  10   11  12   8
  1   2   4   3   7   9   8    6   5  14
  1   2   5   4   3   9  10   11   8   7
  1   2   4   3   8   9   7    6   5  15
		

Crossrefs

Programs

  • Mathematica
    s = Table[BitXor[n, Floor[n/2]], {n, 2000}]; (* A003188 *)
    g[n_] := Flatten[Position[Mod[s, n], 0]];
    u[n_] := s[[g[Prime[n]]]]/Prime[n];
    Column[Table[Take[u[n], 20], {n, 1, 20}]]  (* A326925 array *)
    v[n_, k_] := u[n][[k]];
    Table[v[n - k + 1, k], {n, 14}, {k, n, 1, -1}] // Flatten  (* A326925 sequence *)

A363930 Irregular table T(n, k), n >= 0, k = 1..A363710(n), read by rows; the n-th row lists the nonnegative numbers m <= n such that A003188(m) AND A003188(n-m) = 0 (where AND denotes the bitwise AND operator).

Original entry on oeis.org

0, 0, 1, 0, 2, 0, 3, 0, 1, 3, 4, 0, 1, 4, 5, 0, 6, 0, 7, 0, 1, 7, 8, 0, 1, 2, 3, 6, 7, 8, 9, 0, 2, 3, 7, 8, 10, 0, 3, 8, 11, 0, 1, 3, 9, 11, 12, 0, 1, 12, 13, 0, 14, 0, 15, 0, 1, 15, 16, 0, 1, 2, 3, 14, 15, 16, 17, 0, 2, 3, 4, 6, 12, 14, 15, 16, 18, 0, 3, 4, 7, 12, 15, 16, 19
Offset: 0

Views

Author

Rémy Sigrist, Jun 28 2023

Keywords

Comments

This sequence is related to the T-square fractal (see A363710).

Examples

			Table T(n, k) begins:
  n   n-th row
  --  ----------------------
   0  0
   1  0, 1
   2  0, 2
   3  0, 3
   4  0, 1, 3, 4
   5  0, 1, 4, 5
   6  0, 6
   7  0, 7
   8  0, 1, 7, 8
   9  0, 1, 2, 3, 6, 7, 8, 9
  10  0, 2, 3, 7, 8, 10
  11  0, 3, 8, 11
  12  0, 1, 3, 9, 11, 12
  13  0, 1, 12, 13
  14  0, 14
  15  0, 15
  16  0, 1, 15, 16
		

Crossrefs

See A295989, A353174 and A362327 for similar sequences.

Programs

  • PARI
    row(n) = { select (m -> bitand(bitxor(m, m\2), bitxor(n-m, (n-m)\2))==0, [0..n]) }

Formula

T(n, 1) = 0.
T(n, A363710(n)) = n.
T(n, k) + T(n, A363710(n)+1-k) = n.

A204686 G.f.: A(x) = Sum_{n>=0} x^n * A(x)^A006068(n) where A006068 forms the inverse permutation of the binary Gray code numbers (A003188).

Original entry on oeis.org

1, 1, 2, 6, 18, 62, 228, 869, 3410, 13663, 55689, 230276, 963851, 4076429, 17394641, 74798044, 323797908, 1409980003, 6171824159, 27141256911, 119854448404, 531261779875, 2362873352568, 10541865261557, 47165485163426, 211572830443060, 951338664998601, 4287174496933723
Offset: 0

Views

Author

Paul D. Hanna, Jan 18 2012

Keywords

Comments

A006068 satisfies: A006068(n) XOR [A006068(n)/2] = n.

Examples

			G.f.: A(x) = 1 + x + 2*x^2 + 6*x^3 + 18*x^4 + 62*x^5 + 228*x^6 +...
The g.f. A(x) satisfies:
A(x) = 1 + x*A(x) + x^2*A(x)^3 + x^3*A(x)^2 + x^4*A(x)^7 + x^5*A(x)^6 + x^6*A(x)^4 + x^7*A(x)^5 + x^8*A(x)^15 + x^9*A(x)^14 + x^10*A(x)^12 +...
where the powers of A(x) are given by A006068, which begins:
[0,1,3,2,7,6,4,5,15,14,12,13,8,9,11,10,31,30,28,29,24,25,27,26,...].
		

Crossrefs

Programs

  • PARI
    {A006068(n)=local(B=n);for(k=1,floor(log(n+1)/log(2)),B=bitxor(B,n\2^k));B}
    {a(n)=local(A=1+x); for(i=1, n, A=sum(m=0, n, x^m*(A+x*O(x^n))^A006068(m))); polcoeff(A, n)}
Previous Showing 51-60 of 214 results. Next