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-7 of 7 results.

A163511 a(0)=1. a(n) = p(A000120(n)) * Product_{m=1..A000120(n)} p(m)^A163510(n,m), where p(m) is the m-th prime.

Original entry on oeis.org

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

Views

Author

Leroy Quet, Jul 29 2009

Keywords

Comments

This is a permutation of the positive integers.
From Antti Karttunen, Jun 20 2014: (Start)
Note the indexing: the domain starts from 0, while the range excludes zero, thus this is neither a bijection on the set of nonnegative integers nor on the set of positive natural numbers, but a bijection from the former set to the latter.
Apart from that discrepancy, this could be viewed as yet another "entanglement permutation" where the two complementary pairs to be interwoven together are even and odd numbers (A005843/A005408) which are entangled with the complementary pair even numbers (taken straight) and odd numbers in the order they appear in A003961: (A005843/A003961). See also A246375 which has almost the same recurrence.
Note how the even bisection halved gives the same sequence back. (For a(0)=1, take ceiling of 1/2).
(End)
From Antti Karttunen, Dec 30 2017: (Start)
This irregular table can be represented as a binary tree. Each child to the left is obtained by doubling the parent, and each child to the right is obtained by applying A003961 to the parent:
1
|
...................2...................
4 3
8......../ \........9 6......../ \........5
/ \ / \ / \ / \
/ \ / \ / \ / \
/ \ / \ / \ / \
16 27 18 25 12 15 10 7
32 81 54 125 36 75 50 49 24 45 30 35 20 21 14 11
etc.
Sequence A005940 is obtained by scanning the same tree level by level in mirror image fashion. Also in binary trees A253563 and A253565 the terms on level of the tree are some permutation of the terms present on the level n of this tree. A252464(n) gives the distance of n from 1 in all these trees, and A252463 gives the parent of the node containing n.
A252737(n) gives the sum and A252738(n) the product of terms on row n (where 1 is on row 0, 1 on row 1, 3 and 4 on row 2, etc.). A252745(n) gives the number of nodes on level n whose left child is smaller than the right child, and A252744(n) is an indicator function for those nodes.
(End)
Note that the idea behind maps like this (and the mirror image A005940) admits also using alternative orderings of primes, not just standard magnitude-wise ordering (A000040). For example, A332214 is a similar sequence but with primes rearranged as in A332211, and A332817 is obtained when primes are rearranged as in A108546. - Antti Karttunen, Mar 11 2020
From Lorenzo Sauras Altuzarra, Nov 28 2020: (Start)
This sequence is generated from A228351 by applying the following procedure: 1) eliminate the compositions that end in one unless the first one, 2) subtract one unit from every component, 3) replace every tuple [t_1, ..., t_r] by Product_{k=1..r} A000040(k)^(t_k) (see the examples).
Is it true that a(n) = A337909(n+1) if and only if a(n+1) is not a term of A161992?
Does this permutation have any other cycle apart from (1), (2) and (6, 9, 16, 7)? (End)
From Antti Karttunen, Jul 25 2023: (Start)
(In the above question, it is assumed that the starting offset would be 1 instead of 0).
Questions:
Does a(n) = 1+A054429(n) hold only when n is of the form 2^k times 1, 3 or 7, i.e., one of the terms of A029748?
It seems that A007283 gives all fixed points of map n -> a(n), like A335431 seems to give all fixed points of map n -> A332214(n). Is there a general rule for mappings like these that the fixed points (if they exist) must be of the form 2^k times a certain kind of prime, i.e., that any odd composite (times 2^k) can certainly be excluded? See also note in A029747.
(End)
If the conjecture given in A364297 holds, then it implies the above conjecture about A007283. See also A364963. - Antti Karttunen, Sep 06 2023
Conjecture: a(n^k) is never of the form x^k, for any integers n > 0, k > 1, x >= 1. This holds at least for squares, cubes, seventh and eleventh powers (see A365808, A365801, A366287 and A366391). - Antti Karttunen, Sep 24 2023, Oct 10 2023.
See A365805 for why the above holds for any n^k, with k > 1. - Antti Karttunen, Nov 23 2023

Examples

			For n=3, whose binary representation is "11", we have A000120(3)=2, with A163510(3,1) = A163510(3,2) = 0, thus a(3) = p(2) * p(1)^0 * p(2)^0 = 3*1*1 = 3.
For n=9, "1001" in binary, we have A000120(9)=2, with A163510(9,1) = 0 and A163510(9,2) = 2, thus a(9) = p(2) * p(1)^0 * p(2)^2 = 3*1*9 = 27.
For n=10, "1010" in binary, we have A000120(10)=2, with A163510(10,1) = 1 and A163510(10,2) = 1, thus a(10) = p(2) * p(1)^1 * p(2)^1 = 3*2*3 = 18.
For n=15, "1111" in binary, we have A000120(15)=4, with A163510(15,1) = A163510(15,2) = A163510(15,3) = A163510(15,4) = 0, thus a(15) = p(4) * p(1)^0 * p(2)^0 * p(3)^0 * p(4)^0 = 7*1*1*1*1 = 7.
[1], [2], [1,1], [3], [1,2], [2,1] ... -> [1], [2], [3], [1,2], ... -> [0], [1], [2], [0,1], ... -> 2^0, 2^1, 2^2, 2^0*3^1, ... = 1, 2, 4, 3, ... - _Lorenzo Sauras Altuzarra_, Nov 28 2020
		

Crossrefs

Inverse: A243071.
Cf. A007283 (known positions where a(n)=n), A029747, A029748, A364255 [= gcd(n,a(n))], A364258 [= a(n)-n], A364287 (where a(n) < n), A364292 (where a(n) <= n), A364494 (where n|a(n)), A364496 (where a(n)|n), A364963, A364297.
Cf. A365808 (positions of squares), A365801 (of cubes), A365802 (of fifth powers), A365805 [= A052409(a(n))], A366287, A366391.
Cf. A005940, A332214, A332817, A366275 (variants).

Programs

  • Mathematica
    f[n_] := Reverse@ Map[Ceiling[(Length@ # - 1)/2] &, DeleteCases[Split@ Join[Riffle[IntegerDigits[n, 2], 0], {0}], {k__} /; k == 1]]; {1}~Join~
    Table[Function[t, Prime[t] Product[Prime[m]^(f[n][[m]]), {m, t}]][DigitCount[n, 2, 1]], {n, 120}] (* Michael De Vlieger, Jul 25 2016 *)
  • Python
    from sympy import prime
    def A163511(n):
        if n:
            k, c, m = n, 0, 1
            while k:
                c += 1
                m *= prime(c)**(s:=(~k&k-1).bit_length())
                k >>= s+1
            return m*prime(c)
        return 1 # Chai Wah Wu, Jul 17 2023

Formula

For n >= 1, a(2n) is even, a(2n+1) is odd. a(2^k) = 2^(k+1), for all k >= 0.
From Antti Karttunen, Jun 20 2014: (Start)
a(0) = 1, a(1) = 2, a(2n) = 2*a(n), a(2n+1) = A003961(a(n)).
As a more general observation about the parity, we have:
For n >= 1, A007814(a(n)) = A135523(n) = A007814(n) + A209229(n). [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, A055396(a(n)) = A091090(n) = A007814(n+1) + 1 - A036987(n).
For n >= 1, a(A000225(n)) = A000040(n).
(End)
From Antti Karttunen, Oct 11 2014: (Start)
As a composition of related permutations:
a(n) = A005940(1+A054429(n)).
a(n) = A064216(A245612(n))
a(n) = A246681(A246378(n)).
Also, for all n >= 0, it holds that:
A161511(n) = A243503(a(n)).
A243499(n) = A243504(a(n)).
(End)
More linking identities from Antti Karttunen, Dec 30 2017: (Start)
A046523(a(n)) = A278531(n). [See also A286531.]
A278224(a(n)) = A285713(n). [Another filter-sequence.]
A048675(a(n)) = A135529(n) seems to hold for n >= 1.
A250245(a(n)) = A252755(n).
A252742(a(n)) = A252744(n).
A245611(a(n)) = A253891(n).
A249824(a(n)) = A275716(n).
A292263(a(n)) = A292264(n). [A292944(n) + A292264(n) = n.]
--
A292383(a(n)) = A292274(n).
A292385(a(n)) = A292271(n). [A292271(n) + A292274(n) = n.]
--
A292941(a(n)) = A292942(n).
A292943(a(n)) = A292944(n).
A292945(a(n)) = A292946(n). [A292942(n) + A292944(n) + A292946(n) = n.]
--
A292253(a(n)) = A292254(n).
A292255(a(n)) = A292256(n). [A292944(n) + A292254(n) + A292256(n) = n.]
--
A279339(a(n)) = A279342(n).
a(A071574(n)) = A269847(n).
a(A279341(n)) = A279338(n).
a(A252756(n)) = A250246(n).
(1+A008836(a(n)))/2 = A059448(n).
(End)
From Antti Karttunen, Jul 26 2023: (Start)
For all n >= 0, a(A007283(n)) = A007283(n).
A001222(a(n)) = A290251(n).
(End)

Extensions

More terms computed and examples added by Antti Karttunen, Jun 20 2014

A292944 a(n) = A292272(A004754(n)) - 2*A053644(n).

Original entry on oeis.org

0, 0, 0, 1, 0, 1, 2, 2, 0, 1, 2, 2, 4, 5, 4, 4, 0, 1, 2, 2, 4, 5, 4, 4, 8, 9, 10, 10, 8, 9, 8, 8, 0, 1, 2, 2, 4, 5, 4, 4, 8, 9, 10, 10, 8, 9, 8, 8, 16, 17, 18, 18, 20, 21, 20, 20, 16, 17, 18, 18, 16, 17, 16, 16, 0, 1, 2, 2, 4, 5, 4, 4, 8, 9, 10, 10, 8, 9, 8, 8, 16, 17, 18, 18, 20, 21, 20, 20, 16, 17, 18, 18, 16, 17, 16, 16, 32, 33, 34, 34, 36, 37, 36, 36
Offset: 0

Views

Author

Antti Karttunen, Sep 28 2017

Keywords

Comments

In binary expansion (A007088) of n, clear the most significant bit and all those 1-bits that have another 1-bit at their left side, except for the second most significant 1-bit, even in cases where the binary expansion begins as "11...".
Because A292943(n) = a(A243071(n)), the sequence works as a "masking function" where the 1-bits in a(n) (always a subset of the 1-bits in binary expansion of n) indicate which numbers are of the form 6k+3 (odd multiples of three) in binary tree A163511 (or its mirror image tree A005940) on that trajectory which leads from the root of the tree to the node containing A163511(n).

Examples

			For n = 23, 10111 in binary, when we clear (change to zero) the most significant bit (always 1) and also all 1-bits that have 1's at their left side, we are left with 100, which in binary stands for 4, thus a(23) = 4.
For n = 27, 11011 in binary, when we clear the most significant bit, and also all 1-bits that have 1's at their left side except the second most significant, we are left with 1010, which in binary stands for ten, thus a(27) = 10.
		

Crossrefs

Programs

Formula

a(n) = A292272(A004754(n)) - 2*A053644(n).
a(n) = A292943(A163511(n)).
Other identities. For all n >= 0:
a(n) + A292264(n) = A292942(n) + a(n) + A292946(n) = a(n) + A292254(n) + A292256(n) = n.
a(n) = a(n) AND n; a(n) AND A292264(n) = 0, where AND is bitwise-and (A004198).

A292254 a(n) = A292253(A163511(n)).

Original entry on oeis.org

0, 1, 2, 2, 4, 4, 4, 4, 8, 8, 8, 9, 8, 8, 8, 8, 16, 16, 16, 16, 16, 16, 18, 19, 16, 16, 16, 17, 16, 16, 16, 17, 32, 32, 32, 33, 32, 32, 32, 32, 32, 32, 32, 32, 36, 36, 38, 39, 32, 32, 32, 32, 32, 32, 34, 34, 32, 32, 32, 32, 32, 32, 34, 35, 64, 64, 64, 64, 64, 64, 66, 67, 64, 64, 64, 65, 64, 64, 64, 65, 64, 64, 64, 65, 64, 64, 64, 64, 72, 72, 72, 72, 76, 76
Offset: 0

Views

Author

Antti Karttunen, Sep 28 2017

Keywords

Comments

Because A292253(n) = a(A243071(n)), the sequence works as a "masking function" where the 1-bits in a(n) (always a subset of the 1-bits in binary expansion of n) indicate the numbers that are either of the form 12k+1 or of the form 12k+11 in binary tree A163511 (or its mirror image tree A005940) on that trajectory which leads from the root of the tree to the node containing A163511(n).
The AND - XOR formula just restates the fact that J(3|n) = J(-1|n)*J(-3|n), as the Jacobi-symbol is multiplicative (also) with respect to its upper argument.

Crossrefs

Cf also A292247, A292248, A292256, A292264, A292271, A292274, A292592, A292593, A292942, A292944, A292946 (for similarly constructed sequences).

Programs

Formula

a(n) = A292253(A163511(n)).
a(n) = A292264(n) AND (A292274(n) XOR A292942(n)), where AND is bitwise-and (A004198) and XOR is bitwise-XOR (A003987). [See comments.]
For all n >= 0, a(n) + A292944(n) + A292256(n) = n.

A292256 a(n) = A292255(A163511(n)).

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 2, 3, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 6, 6, 0, 0, 0, 0, 0, 0, 2, 3, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 8, 8, 8, 9, 12, 12, 12, 12, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 6, 6, 0, 0, 0, 0, 0, 0, 2, 3, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 2, 2, 16, 16, 16, 16, 16, 16
Offset: 0

Views

Author

Antti Karttunen, Sep 28 2017

Keywords

Comments

Because A292255(n) = a(A243071(n)), the sequence works as a "masking function" where the 1-bits in a(n) (always a subset of the 1-bits in binary expansion of n) indicate the numbers that are either of the form 12k+5 or of the form 12k+7 in binary tree A163511 (or its mirror image tree A005940) on that trajectory which leads from the root of the tree to the node containing A163511(n).
The AND - XOR formulas just restate the fact that J(3|n) = J(-1|n)*J(-3|n), as the Jacobi-symbol is multiplicative (also) with respect to its upper argument.

Crossrefs

Cf. also A292247, A292248, A292254, A292264, A292271, A292274, A292592, A292593, A292942, A292944, A292946 (for similarly constructed sequences).

Programs

Formula

a(n) = A292255(A163511(n)).
a(n) = A292264(n) AND (A292274(n) XOR A292946(n)), where AND is bitwise-and (A004198) and XOR is bitwise-XOR (A003987).
a(n) = A292264(n) AND (A292271(n) XOR A292942(n)). [See comments].
For all n >= 0, a(n) + A292944(n) + A292254(n) = n.

A292264 a(n) = n - A292944(n).

Original entry on oeis.org

0, 1, 2, 2, 4, 4, 4, 5, 8, 8, 8, 9, 8, 8, 10, 11, 16, 16, 16, 17, 16, 16, 18, 19, 16, 16, 16, 17, 20, 20, 22, 23, 32, 32, 32, 33, 32, 32, 34, 35, 32, 32, 32, 33, 36, 36, 38, 39, 32, 32, 32, 33, 32, 32, 34, 35, 40, 40, 40, 41, 44, 44, 46, 47, 64, 64, 64, 65, 64, 64, 66, 67, 64, 64, 64, 65, 68, 68, 70, 71, 64, 64, 64, 65, 64, 64, 66, 67, 72, 72, 72, 73, 76, 76
Offset: 0

Views

Author

Antti Karttunen, Sep 30 2017

Keywords

Comments

Because A292263(n) = a(A243071(n)), the sequence works as a "masking function" where the 1-bits in a(n) (always a subset of the 1-bits in binary expansion of n) indicate which numbers are of the form 6k+1 or 6k+5 in binary tree A163511 (or in its mirror image tree A005940) on that trajectory which leads from the root of the tree to the node containing A163511(n).

Crossrefs

Cf. A048735, A292944, A292272 but also A292254, A292256, A292942, A292946 for similarly constructed sequences.

Programs

Formula

a(n) = n - A292944(n).
a(n) = A292263(A163511(n)).
a(n) = A292942(n) + A292946(n).
a(n) = A292254(n) + A292256(n).

A292942 a(n) = A292941(A163511(n)).

Original entry on oeis.org

0, 1, 2, 2, 4, 4, 4, 4, 8, 8, 8, 9, 8, 8, 8, 9, 16, 16, 16, 16, 16, 16, 18, 19, 16, 16, 16, 16, 16, 16, 18, 18, 32, 32, 32, 33, 32, 32, 32, 33, 32, 32, 32, 32, 36, 36, 38, 39, 32, 32, 32, 33, 32, 32, 32, 32, 32, 32, 32, 33, 36, 36, 36, 37, 64, 64, 64, 64, 64, 64, 66, 67, 64, 64, 64, 64, 64, 64, 66, 66, 64, 64, 64, 65, 64, 64, 64, 65, 72, 72, 72, 72, 76, 76
Offset: 0

Views

Author

Antti Karttunen, Sep 28 2017

Keywords

Comments

Because A292941(n) = a(A243071(n)), the sequence works as a "masking function" where the 1-bits in a(n) (always a subset of the 1-bits in binary expansion of n) indicate which numbers are of the form 6k+1 in binary tree A163511 (or its mirror image tree A005940) on that trajectory which leads from the root of the tree to the node containing A163511(n).
The AND - XOR formula is just a restatement of the fact that J(-3|n) = J(-1|n)*J(3|n), as the Jacobi-symbol is multiplicative (also) with respect to its upper argument.

Crossrefs

Cf. also A292247, A292248, A292254, A292256, A292264, A292271, A292274, A292592, A292593, A292944, A292946 (for similarly constructed sequences).

Programs

Formula

a(n) = A292941(A163511(n)).
a(n) = A292264(n) AND (A292254(n) XOR A292274(n)), where AND is bitwise-and (A004198) and XOR is bitwise-XOR (A003987). [See comments.]
For all n >= 0, a(n) + A292944(n) + A292946(n) = n.

A292945 Base-2 expansion of a(n) encodes the steps where numbers of the form 6k+5 are encountered when map x -> A252463(x) is iterated down to 1, starting from x=n.

Original entry on oeis.org

0, 0, 0, 0, 1, 0, 2, 0, 0, 2, 5, 0, 10, 4, 0, 0, 21, 0, 42, 4, 4, 10, 85, 0, 0, 20, 0, 8, 171, 0, 342, 0, 8, 42, 1, 0, 684, 84, 20, 8, 1369, 8, 2738, 20, 0, 170, 5477, 0, 0, 0, 40, 40, 10955, 0, 8, 16, 84, 342, 21911, 0, 43822, 684, 8, 0, 17, 16, 87644, 84, 168, 2, 175289, 0, 350578, 1368, 0, 168, 3, 40, 701156, 16, 0, 2738, 1402313, 16, 40, 5476, 340, 40
Offset: 1

Views

Author

Antti Karttunen, Sep 28 2017

Keywords

Comments

The AND - XOR formulas are just a restatement of the fact that J(-3|n) = J(-1|n)*J(3|n), i.e., that Jacobi-symbol is multiplicative (also) with respect to its upper argument.

Crossrefs

Programs

  • Scheme
    (define (A292945 n) (if (<= n 1) 0 (+ (if (= 5 (modulo n 6)) 1 0) (* 2 (A292945 (A252463 n))))))

Formula

a(1) = 0, and for n > 1, a(n) = 2*a(A252463(n)) + [n == 5 (mod 6)], where the last part of the formula is Iverson bracket, giving 1 only if n is of the form 6k+5, and 0 otherwise.
Also, for n > 1, a(n) = 2*a(A252463(n)) + [n == 1 (mod 2)]*[J(-3|n) = -1], where J is the Jacobi-symbol.
a(n) = A292263(n) AND (A292255(n) XOR A292383(n)), where AND is bitwise-and (A004198) and XOR is bitwise-XOR (A003987).
a(n) = A292263(n) AND (A292253(n) XOR A292385(n)). [See comments.]
For n >= 0, a(A163511(n)) = A292946(n).
For n >= 1, A292941(n) + A292943(n) + a(n) = A243071(n).
Showing 1-7 of 7 results.