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-10 of 12 results. Next

A209863 a(n) = Number of fixed points of permutation A209861/A209862 in range [2^(n-1),(2^n)-1].

Original entry on oeis.org

1, 1, 2, 4, 6, 6, 6, 8, 8, 8, 12, 8, 10, 8, 10, 6, 6, 10, 8, 6, 6, 10, 8, 8, 6
Offset: 0

Views

Author

Antti Karttunen, Mar 24 2012

Keywords

Comments

See the conjecture given in A209860. If true, then all the terms from a(2) onward are even. a(0) gives the number of fixed points in range [0,0], i.e. 1.

Crossrefs

A209864 a(n) = number of cycles in range [2^(n-1),(2^n)-1] of permutation A209861/A209862.

Original entry on oeis.org

1, 1, 2, 4, 7, 8, 11, 12, 14, 10, 21, 14, 20, 26, 22, 18, 18, 28, 23, 30, 32
Offset: 0

Views

Author

Antti Karttunen, Mar 24 2012

Keywords

Comments

a(0) gives the number of cycles in range [0,0], i.e. 1.

Crossrefs

A209866 a(n) = least common multiple of all cycle sizes in range [2^(n-1),(2^n)-1] of permutation A209861/A209862.

Original entry on oeis.org

1, 1, 1, 1, 2, 5, 24, 26, 672, 246, 3755388, 13827240, 1768910220, 99034598880, 1463488641762840, 612823600, 171768365608799778, 16338317307187487976, 27491145139913884194480, 14794457633180140325810400, 2084886621890359572790082258379649440
Offset: 0

Views

Author

Antti Karttunen, Mar 24 2012

Keywords

Comments

a(0) gives the LCM of cycle sizes in range [0,0], i.e., 1.

Examples

			In range [2^(6-1),(2^6)-1] ([32,63]) of permutations A209861 & A209862, there are 6 cycles of size 1 (fixed points), 2 cycles of size 3, one cycle of size 4, and 2 cycles of size 8 (6 + 2*3 + 4 + 2*8 = 32), thus a(6) = lcm(1,3,4,8) = 24.
		

Crossrefs

A209865 a(n) = maximal cycle size in range [2^(n-1),(2^n)-1] of permutation A209861/A209862.

Original entry on oeis.org

1, 1, 1, 1, 2, 5, 8, 26, 96, 246, 181, 540, 868, 724, 6038, 4405, 23302, 39514, 34480, 83424, 270884
Offset: 0

Views

Author

Antti Karttunen, Mar 24 2012

Keywords

Comments

a(0) gives the maximum cycle size in range [0,0], i.e. 1.

Crossrefs

A209867 a(n) = number of integers in range [2^(n-1),(2^n)-1] which permutation A209861/A209862 sends to odd-sized orbits.

Original entry on oeis.org

1, 1, 2, 4, 6, 16, 12, 8, 14, 8, 406, 8, 56, 80, 1686, 8866, 8272, 15178, 9462, 938, 41128
Offset: 0

Views

Author

Antti Karttunen, Mar 24 2012

Keywords

Comments

a(0) gives the number of odd sized cycles in range [0,0], i.e. 1, as there is just one fixed point in that range.

Examples

			In range [2^(6-1),(2^6)-1] ([32,63]) of permutations A209861 & A209862, there are 6 cycles of size 1 (six fixed points), 2 cycles of size 3, one cycle of size 4, and 2 cycles of size 8, 6*1 + 2*3 + 1*4 + 2*8 = 32 in total, of which 6*1 + 2*3 elements are in odd-sized cycles, thus a(6)=12.
		

Crossrefs

a(n) = A000079(n-1) - A209868(n) for all n>0. Cf. A209860, A209863, A209864, A209865, A209866.

A209860 Fixed points of permutation A209861/A209862.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 13, 14, 15, 16, 17, 18, 29, 30, 31, 32, 33, 34, 61, 62, 63, 64, 65, 66, 73, 118, 125, 126, 127, 128, 129, 130, 148, 235, 253, 254, 255, 256, 257, 258, 274, 493, 509, 510, 511, 512, 513, 514, 651, 689, 710, 825, 846, 884, 1021, 1022, 1023, 1024, 1025, 1026, 1097, 1974, 2045, 2046, 2047, 2048, 2049
Offset: 0

Views

Author

Antti Karttunen, Mar 24 2012

Keywords

Comments

Conjecture: for every a(n), also A054429(a(n)) is in the sequence. Conversely, if i is not in the sequence, then neither is A054429(i).

Crossrefs

A209863 gives the number of these fixed points in each range [2^(n-1),(2^n)-1].

Formula

Those i, for which A209861(i)=i, or equally A209862(i)=i.

A209868 a(n) = number of integers in range [2^(n-1),(2^n)-1] which permutation A209861/A209862 sends to even-sized orbits.

Original entry on oeis.org

0, 0, 0, 0, 2, 0, 20, 56, 114, 248, 106, 1016, 1992, 4016, 6506, 7518, 24496, 50358, 121610, 261206, 483160
Offset: 0

Views

Author

Antti Karttunen, Mar 24 2012

Keywords

Comments

a(0) gives the number of even-sized cycles in range [0,0], i.e. 0, as there is only one fixed point in that range.

Examples

			In range [2^(6-1),(2^6)-1] ([32,63]) of permutations A209861 & A209862, there are 6 cycles of size 1 (six fixed points), 2 cycles of size 3, one cycle of size 4, and 2 cycles of size 8, i.e. 6*1 + 2*3 + 1*4 + 2*8 = 32 in total, of which 4 + 2*8 elements are in even-sized cycles, thus a(6)=20.
		

Crossrefs

a(n) = A000079(n-1) - A209867(n) for all n>0. Cf. A209860, A209863, A209864, A209865, A209866.

A209862 Permutation of nonnegative integers which maps A209642 into ascending order (A209641).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Mar 24 2012

Keywords

Comments

Conjecture: For all n, a(A054429(n)) = A054429(a(n)), i.e. A054429 acts as a homomorphism (automorphism) of the cyclic group generated by this permutation. This implies also a weaker conjecture given in A209860.
From Gus Wiseman, Aug 24 2021: (Start)
As a triangle with row lengths 2^n, T(n,k) for n > 0 appears (verified up to n = 2^15) to be the unique nonnegative integer whose binary indices are the k-th subset of {1..n} containing n. Here, a binary index of n (row n of A048793) is any position of a 1 in its reversed binary expansion, and sets are sorted first by length, then lexicographically. For example, the triangle begins:
1
2 3
4 5 6 7
8 9 10 12 11 13 14 15
16 17 18 20 24 19 21 25 22 26 28 23 27 29 30 31
Mathematica: Table[Total[2^(Append[#,n]-1)]&/@Subsets[Range[n-1]],{n,5}]
Row lengths are A000079 (shifted right). Also Column k = 1.
Row sums are A010036.
Using reverse-lexicographic order gives A059893.
Using lexicographic order gives A059894.
Taking binary indices to prime indices gives A339195 (or A019565).
The ordering of sets is A344084.
A version using Heinz numbers is A344085.
(End)

Examples

			From _Gus Wiseman_, Aug 24 2021: (Start)
The terms, their binary expansions, and their binary indices begin:
   0:      ~ {}
   1:    1 ~ {1}
   2:   10 ~ {2}
   3:   11 ~ {1,2}
   4:  100 ~ {3}
   5:  101 ~ {1,3}
   6:  110 ~ {2,3}
   7:  111 ~ {1,2,3}
   8: 1000 ~ {4}
   9: 1001 ~ {1,4}
  10: 1010 ~ {2,4}
  12: 1100 ~ {3,4}
  11: 1011 ~ {1,2,4}
  13: 1101 ~ {1,3,4}
  14: 1110 ~ {2,3,4}
  15: 1111 ~ {1,2,3,4}
(End)
		

Crossrefs

Formula

A209640 Global ranking function for restricted totally balanced binary strings given in A209641.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Mar 24 2012

Keywords

Comments

The given Scheme-program implements a ranking function for the terms of A209641, using Khayyam's triangle A007318.

Examples

			a(12)=3, as 12 occurs as the 3rd term (zero-based) in A209641.
a(14)=0, as 14 doesn't occur in A209641.
		

Crossrefs

This is an inverse function for A209641 in the sense that a(A209641(n)) = n for all n. The beginning of sequence coincides with A080300, because A209641 is a subsequence of A014486. Used to compute the permutation A209861.

Programs

  • Scheme
    (define (A209640 n) (if (or (zero? n) (not (member_of_A209641? n))) 0 (let* ((w (/ (binwidth n) 2))) (let loop ((rank 0) (row 1) (u (- w 1)) (n (- n (A053644 n))) (i (/ (A053644 n) 2)) (first_0_found? #f)) (cond ((or (zero? row) (zero? u) (zero? n)) (+ (expt 2 (-1+ w)) rank)) ((> i n) (loop rank (- row 1) u n (/ i 2) #t)) (else (loop (+ rank (if first_0_found? (A007318tr (- (+ row u) 1) (- row 1)) (A007318tr (- w 1) (- row 1)))) (+ row 1) (- u 1) (- n i) (/ i 2) first_0_found?)))))))
    (define (binwidth n) (let loop ((n n) (i 0)) (if (zero? n) i (loop (floor->exact (/ n 2)) (1+ i)))))

A209642 A014486-codes for rooted plane trees where non-leaf branching can occur only at the leftmost branch of any level, but nowhere else. Reflected from the corresponding rightward branching codes in A071162, thus not in ascending order.

Original entry on oeis.org

0, 2, 10, 12, 42, 50, 52, 56, 170, 202, 210, 226, 212, 228, 232, 240, 682, 810, 842, 906, 850, 914, 930, 962, 852, 916, 932, 964, 936, 968, 976, 992, 2730, 3242, 3370, 3626, 3402, 3658, 3722, 3850, 3410, 3666, 3730, 3858, 3746, 3874, 3906, 3970, 3412, 3668, 3732, 3860, 3748, 3876, 3908, 3972, 3752, 3880, 3912, 3976, 3920, 3984, 4000, 4032
Offset: 0

Views

Author

Antti Karttunen, Mar 11 2012

Keywords

Comments

Like with A071162, a(n) can be computed directly from the binary expansion of n. (See the Scheme function given). However, the function is not monotone. A209641 gives the same terms in ascending order.

Crossrefs

a(n) = A209641(A209861(n)).

Programs

  • Python
    def a(n):
        s=0
        i=1
        while n!=0:
            if n%2==0:
                n//=2
                s=4*s + 1
            else:
                n=(n - 1)//2
                s=(s + i)*2
            i*=4
        return s
    print([a(n) for n in range(101)]) # Indranil Ghosh, May 25 2017, translated from Antti Karttunen's SCHEME code
  • Scheme
    (define (A209642 n) (let loop ((n n) (s 0) (i 1)) (cond ((zero? n) s) ((even? n) (loop (/ n 2) (+ (* 4 s) 1) (* i 4))) (else (loop (/ (- n 1) 2) (* 2 (+ s i)) (* i 4))))))
    

Formula

a(n) = A056539(A071162(n)) = A036044(A071162(n)). (See also the given Scheme-function).
Showing 1-10 of 12 results. Next