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 23 results. Next

A163914 Number of 3-cycles in range [A000302(n-1)..A024036(n)] of permutation A163355/A163356.

Original entry on oeis.org

0, 0, 2, 1, 10, 9, 54, 57, 295, 329, 1613, 1834, 8812, 10072
Offset: 0

Views

Author

Antti Karttunen, Sep 19 2009

Keywords

Crossrefs

a(n) = A163913(n)/3. Bisections: A163909, A163919. See also A163903, A163911, A163912, A163904, A163890.

A302845 Permutation of nonnegative integers: a(n) = A163355(A064707(n)).

Original entry on oeis.org

0, 1, 3, 2, 15, 14, 12, 13, 5, 6, 4, 7, 10, 9, 11, 8, 21, 20, 22, 23, 16, 19, 17, 18, 26, 27, 25, 24, 31, 28, 30, 29, 63, 62, 60, 61, 48, 49, 51, 50, 58, 57, 59, 56, 53, 54, 52, 55, 42, 43, 41, 40, 47, 44, 46, 45, 37, 36, 38, 39, 32, 35, 33, 34, 255, 254, 252, 253, 240, 241, 243, 242, 250, 249, 251, 248, 245, 246, 244
Offset: 0

Views

Author

Antti Karttunen, Apr 14 2018

Keywords

Crossrefs

Programs

Formula

a(n) = A163355(A064707(n)).
a(n) = A302843(A006068(n)).

A163903 The positions i where A163915(i) = i, but not A163355(i) = i, that is, the 3-cycles of permutation A163355.

Original entry on oeis.org

5, 6, 10, 11, 13, 15, 17, 18, 19, 80, 81, 85, 86, 90, 91, 93, 95, 105, 106, 160, 161, 165, 166, 170, 171, 173, 175, 190, 191, 213, 215, 240, 241, 245, 246, 250, 251, 253, 255, 257, 258, 259, 276, 277, 278, 279, 282, 296, 297, 298, 299, 303, 309, 316, 317, 318
Offset: 0

Views

Author

Antti Karttunen, Sep 19 2009

Keywords

Crossrefs

A302843 Permutation of nonnegative integers: a(n) = A163355(A006068(n)).

Original entry on oeis.org

0, 1, 2, 3, 12, 13, 14, 15, 10, 9, 8, 11, 4, 7, 6, 5, 26, 27, 24, 25, 30, 29, 28, 31, 16, 19, 18, 17, 22, 23, 20, 21, 42, 43, 40, 41, 46, 45, 44, 47, 32, 35, 34, 33, 38, 39, 36, 37, 58, 57, 56, 59, 52, 55, 54, 53, 48, 49, 50, 51, 60, 61, 62, 63, 192, 193, 194, 195, 204, 205, 206, 207, 202, 201, 200, 203, 196, 199, 198, 197, 218, 219, 216, 217, 222
Offset: 0

Views

Author

Antti Karttunen, Apr 14 2018

Keywords

Crossrefs

Cf. A302844 (inverse).

Programs

  • PARI
    A006068(n)= { my(s=1, ns); while(1, ns = n >> s; if(0==ns, break()); n = bitxor(n, ns); s <<= 1; ); return (n); } \\ From A006068
    A057300(n) = { my(t=1, s=0); while(n>0,  if(1==(n%4),n++,if(2==(n%4),n--)); s += (n%4)*t; n >>= 2; t <<= 2); (s); };
    A163355(n) = if(!n,n,my(i = (#binary(n)-1)\2, f = 4^i, d = (n\f)%4, r = (n%f)); if(((1==d)&&!(i%2))||((2==d)&&(i%2)), f+A163355(A057300(r)), if(3==d,f+f+A163355(A057300(r)), (3*f)+A163355(f-1-r))));
    A302843(n) = A163355(A006068(n));

Formula

a(n) = A163355(A006068(n)).
a(n) = A302845(A003188(n)).

A163902 The positions i where A163905(i) = i, but not A163355(i) = i, that is, the 2-cycles of permutation A163355.

Original entry on oeis.org

2, 3, 22, 23, 25, 26, 29, 31, 37, 38, 40, 41, 42, 43, 53, 55, 60, 61, 62, 63, 262, 263, 265, 266, 269, 271, 322, 323, 342, 343, 345, 346, 349, 351, 357, 358, 360, 361, 362, 363, 373, 375, 380, 381, 382, 383, 405, 406, 408, 409, 410, 411, 416, 420, 421, 422
Offset: 0

Views

Author

Antti Karttunen, Sep 19 2009

Keywords

Crossrefs

See also A163901, A163903, A163910.

A163913 Number of integers i in range [A000302(n-1)..A024036(n)] of permutation A163355/A163356 with A163915(i)=i, but not A163355(i)=i.

Original entry on oeis.org

0, 0, 6, 3, 30, 27, 162, 171, 885, 987, 4839, 5502, 26436, 30216
Offset: 0

Views

Author

Antti Karttunen, Sep 19 2009

Keywords

Crossrefs

a(n) = 3*A163914(n). See also A163903.

A163357 Hilbert curve in N X N grid, starting rightwards from the top-left corner, listed by descending antidiagonals.

Original entry on oeis.org

0, 1, 3, 14, 2, 4, 15, 13, 7, 5, 16, 12, 8, 6, 58, 19, 17, 11, 9, 57, 59, 20, 18, 30, 10, 54, 56, 60, 21, 23, 29, 31, 53, 55, 61, 63, 234, 22, 24, 28, 32, 52, 50, 62, 64, 235, 233, 25, 27, 35, 33, 51, 49, 67, 65, 236, 232, 230, 26, 36, 34, 46, 48, 68, 66, 78, 239, 237, 231
Offset: 0

Views

Author

Antti Karttunen, Jul 29 2009

Keywords

Examples

			The top left 8 X 8 corner of the array shows how this surjective self-avoiding walk begins (connect the terms in numerical order, 0-1-2-3-...):
   0  1 14 15 16 19 20 21
   3  2 13 12 17 18 23 22
   4  7  8 11 30 29 24 25
   5  6  9 10 31 28 27 26
  58 57 54 53 32 35 36 37
  59 56 55 52 33 34 39 38
  60 61 50 51 46 45 40 41
  63 62 49 48 47 44 43 42
		

Crossrefs

Transpose: A163359. Inverse: A163358. One-based version: A163361. Row sums: A163365. Row 0: A163482. Column 0: A163483. Central diagonal: A062880. See also A163334 & A163336 for the Peano curve.

Programs

  • Mathematica
    b[{n_, k_}, {m_}] := (A[k, n] = m-1);
    MapIndexed[b, List @@ HilbertCurve[4][[1]]];
    Table[A[n-k, k], {n, 0, 12}, {k, n, 0, -1}] // Flatten (* Jean-François Alcover, Mar 07 2021 *)

Formula

a(n) = A163355(A054238(n)).

Extensions

Links to further derived sequences added by Antti Karttunen, Sep 21 2009

A163332 Self-inverse permutation of the integers for constructing the Peano curve in an N X N grid.

Original entry on oeis.org

0, 1, 2, 5, 4, 3, 6, 7, 8, 15, 16, 17, 14, 13, 12, 9, 10, 11, 18, 19, 20, 23, 22, 21, 24, 25, 26, 47, 46, 45, 48, 49, 50, 53, 52, 51, 44, 43, 42, 39, 40, 41, 38, 37, 36, 29, 28, 27, 30, 31, 32, 35, 34, 33, 54, 55, 56, 59, 58, 57, 60, 61, 62, 69, 70, 71, 68, 67, 66, 63, 64, 65
Offset: 0

Views

Author

Antti Karttunen, Jul 29 2009

Keywords

Comments

The integers [0,(3^k)-1] are confined to range [0,(3^k)-1].
From Kevin Ryde, Sep 04 2020: (Start)
To calculate a(n), write n in ternary digits n[k],..,n[0], where n[0] is the least significant digit. Then the ternary digits of a(n) are a[j] = k^{n[j+1]+n[j+3]+...}(n[j]) where Peano's complement operator k^{s}(d) = d if s even or 2-d if s odd.
A single complement is k(d) = 2-d and the "exponent" is repeats k(k(k(...))). Sum s = n[j+1] + n[j+3] + ... is every second digit above j, so digit j flips 0 <-> 2 when an odd number of odd digits (1's) among these. The complement does not change digit parity so a second transformation re-complements back to the original digits and so self-inverse a(a(n)) = n.
Peano's curve is formed by digits of a(n) put alternately to x and y coordinates, so a(n) maps between the Peano curve the ternary Z-order curve per the formulas in A163528, A163529.
(End)

Crossrefs

Coordinates using this transform: A163528, A163529.
A163334 & A163336 give two variants of the Peano curve in an N X N grid.
Cf. A163355 (Hilbert curve).

Programs

  • Mathematica
    a[n_] := FromDigits[With[{d = Reverse@IntegerDigits[n, 3]}, Reverse@Table[
      If[EvenQ@Total@d[[j+1 ;; ;; 2]], d[[j]], 2-d[[j]]], {j, Length@d}]], 3];
    Array[a, 100] (* Andrey Zabolotskiy, Apr 08 2021, after Kevin Ryde *)
  • PARI
    a(n) = my(v=digits(n,3)); for(start=2,3, my(s=0); forstep(i=start,#v,2, s+=v[i-1]; if(s%2,v[i]=2-v[i]))); fromdigits(v,3); \\ Kevin Ryde, Sep 04 2020

Formula

a(n) = A163327(A163333(A163327(n))).

Extensions

Name corrected by Kevin Ryde, Aug 27 2020

A163485 Permutation of integers used for constructing A147995 and A163545.

Original entry on oeis.org

0, 3, 1, 2, 14, 15, 13, 12, 6, 7, 5, 4, 8, 11, 9, 10, 58, 57, 59, 56, 62, 63, 61, 60, 54, 55, 53, 52, 50, 49, 51, 48, 26, 25, 27, 24, 30, 31, 29, 28, 22, 23, 21, 20, 18, 17, 19, 16, 32, 35, 33, 34, 46, 47, 45, 44, 38, 39, 37, 36, 40, 43, 41, 42, 234, 233, 235, 232, 228, 229
Offset: 0

Views

Author

Antti Karttunen, Aug 01 2009

Keywords

Crossrefs

Inverse: A163486. This permutation can be used to construct array A147995 and its transpose A163545. See A163355 for a bit similarly defined recursive permutation.

A163907 Permutation A163905 shown in N x N grid.

Original entry on oeis.org

0, 1, 2, 9, 3, 14, 10, 11, 12, 15, 16, 8, 4, 13, 47, 18, 19, 6, 7, 45, 44, 20, 17, 27, 5, 39, 46, 40, 21, 22, 25, 26, 37, 38, 41, 42, 149, 23, 30, 24, 58, 36, 33, 43, 234, 150, 151, 29, 28, 56, 57, 34, 35, 232, 235, 152, 148, 157, 31, 54, 59, 49, 32, 236, 233, 227, 154
Offset: 0

Views

Author

Antti Karttunen, Sep 19 2009

Keywords

Examples

			The top left 8x8 corner of this array:
+0 +1 +9 10 16 18 20 21
+2 +3 11 +8 19 17 22 23
14 12 +4 +6 27 25 30 29
15 13 +7 +5 26 24 28 31
47 45 39 37 58 56 54 53
44 46 38 36 57 59 52 55
40 41 33 34 49 51 60 61
42 43 35 32 48 50 62 63
		

Crossrefs

Inverse: A163908. a(n) = A163905(A054238(n)) = A163355(A163357(n)). See also A163357, A163917.
Previous Showing 11-20 of 23 results. Next