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

A366275 The Cat's tongue permutation: a(n) = A163511(A057889(n)).

Original entry on oeis.org

1, 2, 4, 3, 8, 9, 6, 5, 16, 27, 18, 15, 12, 25, 10, 7, 32, 81, 54, 45, 36, 75, 30, 21, 24, 125, 50, 35, 20, 49, 14, 11, 64, 243, 162, 135, 108, 225, 90, 63, 72, 375, 150, 105, 60, 147, 42, 33, 48, 625, 250, 175, 100, 245, 70, 55, 40, 343, 98, 77, 28, 121, 22, 13, 128, 729, 486, 405, 324, 675, 270, 189, 216, 1125
Offset: 0

Views

Author

Antti Karttunen, Oct 06 2023

Keywords

Comments

"Cat's tongue" refers to the look of the scatter plot of this sequence.

Crossrefs

Cf. A000040, A000225, A007814, A057889, A163511, A209229, A290251, A366276 (inverse map), A366277 (fixed points of map n -> a(n)), A366278, A366279, A366280, A366281 [= A052409(a(n))], A366282 [= a(n)-n], A366283 [= gcd(n,a(n))].
Cf. also A163511, A253563, A366263 (compare the scatter plots).

Programs

  • PARI
    A030101(n) = if(n<1,0,subst(Polrev(binary(n)),x,2));
    A057889(n) = if(!n,n,A030101(n/(2^valuation(n,2))) * (2^valuation(n, 2)));
    A163511(n) = if(!n, 1, my(p=2, t=1); while(n>1, if(!(n%2), (t*=p), p=nextprime(1+p)); n >>= 1); (t*p));
    A366275(n) = A163511(A057889(n));
    
  • Python
    from sympy import prime
    def A366275(n):
        if n:
            k, c, m = int(bin(n>>(r:=(~n & n-1).bit_length()))[:1:-1],2)<>= s+1
            return m*prime(c)
        return 1 # Chai Wah Wu, Oct 08 2023

Formula

For n >= 0, A001222(a(n)) = A290251(n).
For n >= 1, A007814(a(n)) = A135523(n) = A007814(n) + A209229(n). [Like A163511, also this permutation preserves the 2-adic valuation of n, except when n is a power of two, in which cases that value is incremented by one.]
For n >= 1, a(2*n) = 2*a(n).
For n >= 1, a(A000225(n)) = A000040(n).

A264965 Permutation of nonnegative integers: a(n) = A263273(A057889(n)).

Original entry on oeis.org

0, 1, 2, 3, 4, 7, 6, 5, 8, 9, 10, 13, 12, 19, 22, 21, 16, 25, 18, 17, 20, 15, 26, 55, 24, 11, 14, 27, 28, 23, 30, 37, 64, 57, 46, 43, 36, 67, 70, 33, 40, 31, 66, 79, 52, 63, 38, 47, 48, 73, 58, 75, 76, 49, 54, 65, 56, 39, 34, 29, 60, 61, 74, 45, 32, 59, 42, 145, 68, 81, 226, 193, 72, 35, 82, 219, 100, 217, 174, 121, 80, 69
Offset: 0

Views

Author

Antti Karttunen, Dec 05 2015

Keywords

Comments

Perform an adjusted reverse of n in base 2, followed by another adjusted reverse in base 3. "Adjusted reverse" here means the digit-reversing operation in which the tail of trailing zeros (in the base in question) is fixed, while the portion from the most significant digit to the least significant nonzero digit is reversed.
What percentage of the cycles are finite? (See the scatter-plot and A264969, also A264972, A264973.)

Crossrefs

Programs

Formula

a(n) = A263273(A057889(n)).
Other identities. For all n >= 0:
A000035(a(n)) = A000035(n). [This permutation preserves the parity of n.]

A264966 Permutation of nonnegative integers: a(n) = A057889(A263273(n)).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Dec 05 2015

Keywords

Comments

Perform an adjusted reverse of n in base 3, followed by another adjusted reverse in base 2. "Adjusted reverse" here means a digit-reversing operation where the suffix of trailing zeros (in the base in question) stays as it is at the right side, and only the section from the most significant digit to the least significant nonzero digit is reversed.

Crossrefs

Inverse: A264965.
Cf. also A264967, A264968.

Programs

Formula

a(n) = A057889(A263273(n)).
Other identities. For all n >= 0:
A000035(a(n)) = A000035(n). [This permutation preserves the parity of n.]

A265369 Self-inverse permutation of nonnegative integers: a(n) = A057889(A263273(A057889(n))).

Original entry on oeis.org

0, 1, 2, 3, 4, 7, 6, 5, 8, 9, 10, 11, 12, 25, 26, 21, 16, 19, 18, 17, 20, 15, 22, 59, 24, 13, 14, 27, 28, 29, 30, 41, 64, 39, 58, 53, 36, 97, 98, 33, 40, 31, 66, 121, 44, 63, 50, 61, 48, 73, 46, 105, 100, 35, 54, 65, 56, 57, 34, 23, 60, 47, 82, 45, 32, 55, 42, 137, 68, 69, 142, 131, 72, 49, 74, 219, 76, 155, 234, 79, 80, 81, 62, 173
Offset: 0

Views

Author

Antti Karttunen, Jan 02 2016

Keywords

Crossrefs

Programs

Formula

a(n) = A057889(A263273(A057889(n))).
As a composition of related permutations:
a(n) = A264966(A057889(n)).
a(n) = A057889(A264965(n)).
Other identities. For all n >= 0:
A000035(a(n)) = A000035(n). [This permutation preserves the parity of n.]

A246200 Self-inverse permutation of natural numbers: a(n) = A057889(3*n) / 3.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Aug 27 2014

Keywords

Comments

In binary system, 3 ("11" in binary), has a similar shortcut rule for divisibility as eleven has in decimal system. This rule doesn't depend on which end of the number representation it is applied from, thus, if we reverse the number 3*n with "balanced bit-reverse" (A057889), the result should still be divisible by 3. Moreover, because the reversing operation is itself a self-inverse involution, and the prime factorization of any natural number is unique, we get a self-inverse permutation of nonnegative integers when we divide the bit-reversed result with 3.

Crossrefs

Programs

  • Python
    def a057889(n):
        x=bin(n)[2:]
        y=x[::-1]
        return int(str(int(y))+(len(x) - len(str(int(y))))*'0', 2)
    def a(n): return a057889(3*n)//3
    print([a(n) for n in range(101)]) # Indranil Ghosh, Jun 11 2017
  • Scheme
    (define (A246200 n) (/ (A057889 (* 3 n)) 3))
    

Formula

a(n) = A057889(3*n) / 3.

A265329 Self-inverse permutation of nonnegative integers: a(n) = A263273(A057889(A263273(n))).

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 17, 12, 19, 26, 15, 16, 11, 18, 13, 20, 21, 22, 55, 24, 25, 14, 27, 28, 65, 30, 67, 32, 39, 38, 35, 36, 37, 34, 33, 40, 145, 42, 73, 100, 45, 46, 61, 48, 79, 226, 219, 76, 121, 54, 23, 56, 57, 70, 59, 60, 47, 82, 63, 64, 29, 66, 31, 68, 81, 58, 217, 72, 43, 74, 75, 52, 193, 174, 49, 80, 69, 62, 221
Offset: 0

Views

Author

Antti Karttunen, Jan 02 2016

Keywords

Crossrefs

Programs

Formula

a(n) = A263273(A057889(A263273(n))).
As a composition of related permutations:
a(n) = A264965(A263273(n)).
a(n) = A263273(A264966(n)).
Other identities. For all n >= 0:
A000035(a(n)) = A000035(n). [This permutation preserves the parity of n.]

A280505 The palindromic kernel of n in base 2 (with carryless GF(2)[X] factorization): a(n) = A091255(n,A057889(n)).

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 12, 1, 14, 15, 16, 17, 18, 1, 20, 21, 2, 3, 24, 1, 2, 27, 28, 3, 30, 31, 32, 33, 34, 7, 36, 1, 2, 5, 40, 1, 42, 3, 4, 45, 6, 1, 48, 7, 2, 51, 4, 3, 54, 1, 56, 5, 6, 1, 60, 1, 62, 63, 64, 65, 66, 1, 68, 1, 14, 3, 72, 73, 2, 15, 4, 3, 10, 7, 80, 1, 2, 9, 84, 85, 6, 1, 8, 3, 90, 1, 12, 93, 2, 5, 96, 1, 14, 99, 4, 9, 102, 1, 8, 15, 6
Offset: 1

Views

Author

Antti Karttunen, Jan 09 2017

Keywords

Comments

a(n) = the maximal GF(2)[X]-divisor of n which in base 2 is either a palindrome or becomes a palindrome if trailing 0's are omitted.
More precisely: a(n) = the unique term m of A057890 for which A280500(n,m) > 0 and A091222(m) >= A091222(k) for all such terms k of A057890 for which A280500(n,k) > 0.
All terms are in A057890 and each term of A057890 occurs an infinite number of times.

Crossrefs

Programs

Formula

a(n) = A091255(n,A057889(n)).
Other identities. For all n >= 1:
a(A057889(n)) = a(n).
A048720(a(n), A280506(n)) = n.

A266351 Start with a(1) = 1, then always choose for a(n) the least unused number such that A057889(a(n)*a(n-1)) = A057889(a(n)) * A057889(a(n-1)), where A057889 is a bijective base-2 reverse.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 14, 16, 11, 17, 13, 32, 15, 24, 18, 20, 19, 33, 21, 36, 28, 27, 56, 34, 22, 64, 23, 65, 25, 40, 35, 72, 42, 48, 30, 51, 60, 66, 26, 68, 37, 96, 31, 99, 62, 128, 29, 129, 38, 80, 49, 73, 70, 130, 39, 256, 41, 131, 74, 136, 44, 132, 46, 257, 43, 258, 45, 260, 47, 512, 50, 133, 76, 160, 67, 84, 97, 137, 112, 54
Offset: 1

Views

Author

Antti Karttunen, Dec 28 2015

Keywords

Comments

Equally: always choose for a(n) the least unused number such that a(n)*a(n-1) = A057889(A057889(a(n)) * A057889(a(n-1))).
Note that the adjacent terms of permutation A266195 satisfy the same condition, except that permutation is not the lexicographically earliest sequence of this kind (because it has a more restrictive condition). See A266194.
This is a bijection for the same reason that A266195 is. Any high enough 2^k will always save the permutation of being stuck, and will also immediately pick up as its succeeding pair the least term unused so far.

Crossrefs

Inverse: A266352.
Cf. A266195, A265405, A266405 (similar sequences).

A280508 a(n) = n XOR A057889(n).

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 6, 0, 0, 0, 0, 0, 10, 0, 0, 12, 10, 0, 10, 12, 0, 0, 10, 0, 0, 0, 0, 0, 18, 0, 12, 20, 30, 0, 12, 0, 30, 24, 0, 20, 18, 0, 18, 20, 0, 24, 30, 0, 12, 0, 30, 20, 12, 0, 18, 0, 0, 0, 0, 0, 34, 0, 20, 36, 54, 0, 0, 24, 34, 40, 20, 60, 54, 0, 20, 24, 54, 0, 0, 60, 34, 48, 20, 0, 54, 40, 0, 36, 34, 0, 34, 36, 0, 40, 54, 0, 20, 48
Offset: 0

Views

Author

Antti Karttunen, Jan 09 2017

Keywords

Crossrefs

Cf. A057890 (positions of zeros).

Programs

Formula

a(n) = A003987(n,A057889(n)) = n XOR A057889(n).
Other identities. For all n >= 0:
a(A057889(n)) = a(n).

A345201 Bit-reverse the odd part of the Zeckendorf representation of n: a(n) = A022290(A057889(A003714(n))).

Original entry on oeis.org

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

Views

Author

Rémy Sigrist, Jun 10 2021

Keywords

Comments

This sequence is a self-inverse permutation of the nonnegative integers.
This sequence is similar to A343150 and to A344682.

Crossrefs

Programs

  • PARI
    See Links section.

Formula

a(n) < A000045(k) for any n < A000045(k).
Showing 1-10 of 68 results. Next