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

A292274 a(n) = A292383(A163511(n)).

Original entry on oeis.org

0, 0, 0, 1, 0, 0, 2, 2, 0, 1, 0, 0, 4, 5, 4, 5, 0, 0, 2, 2, 0, 1, 0, 0, 8, 8, 10, 11, 8, 8, 10, 11, 0, 1, 0, 0, 4, 5, 4, 5, 0, 0, 2, 2, 0, 1, 0, 0, 16, 17, 16, 17, 20, 20, 22, 22, 16, 17, 16, 17, 20, 20, 22, 22, 0, 0, 2, 2, 0, 1, 0, 0, 8, 8, 10, 11, 8, 8, 10, 11, 0, 1, 0, 0, 4, 5, 4, 5, 0, 0, 2, 2, 0, 1, 0, 0, 32, 32, 34, 35, 32, 32, 34, 35, 40, 41, 40, 40, 44
Offset: 0

Views

Author

Antti Karttunen, Sep 16 2017

Keywords

Comments

Because A292383(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 4k+3 in binary tree A005940 on that trajectory which leads from the root of the tree to the node containing A163511(n). This works because A243071(n) = A054429(A156552(n)), a bit-flipped variant of Leonid Broukhis's unary-binary encoded compressed factorization of natural numbers, A156552(n) being an inverse of Doudna map f(n) = A005940(1+n).

Examples

			A163511(18) = 54, that is, at "node address" 18 in binary tree A163511 (which is the mirror image of A005940) sits number 54. 18 in binary is "10010", which when read from left to right (after the most significant bit which is always 1) gives the directions to follow in either tree when starting from the root, so that we land in number 54. (E.g. in A005940-tree, turn right from 2, turn right from 4, turn left from 8 and then turn right from 27 and one lands in 54, this corresponds with the four lowermost bits of the code, "0010". In A163511 the sense of direction is just reversed). When one selects the numbers of the form 4k+3 from this path 1 -> 2 -> 4 -> 8 -> 27 -> 54, one sees that only one is 27, which corresponds with the second rightmost bit (which also is the only 1-bit) in the code, which can be masked with 2 (binary "10"), thus a(18) = 2.
A163511(15) = 7, that is, at "node address" 15 in binary tree A163511 sits number 7. 15 in binary is "1111", which tells that 7 can be located in mirror-image tree A005940 by going (after the initial root 1 and 2) three steps towards left from 2: 1 -> 2 -> 3 -> 5 -> 7. Of these numbers, only 3 and 7 are of the form 4k+3, thus the mask with which to obtain the corresponding bits from "1111" is "00101" (5 in binary), thus a(15) = 5.
A163511(31) = 11, that is, at "node address" 31 in binary tree A163511 sits number 11. 31 in binary is "11111", which tells that 11 can be located in mirror-image tree A005940 by going (after the initial root 1 and 2) four steps towards left from 2: 1 -> 2 -> 3 -> 5 -> 7 -> 11. Of these numbers, only 3, 7 and 11 are of the form 4k+3, thus the mask with which to obtain the corresponding bits from "11111" is "001011" (11 in binary), thus a(31) = 11.
		

Crossrefs

Differs from related A292592 for the first time at n=31, where a(31) = 11, while A292592(31) = 10. Compare also the scatter plots.

Programs

  • Mathematica
    f[n_] := Reverse@ Map[Ceiling[(Length@ # - 1)/2] &, DeleteCases[Split@ Join[Riffle[IntegerDigits[n, 2], 0], {0}], {k__} /; k == 1]]; Map[FromDigits[Reverse@ NestWhileList[Function[k, Which[k == 1, 1, EvenQ@ k, k/2, True, Times @@ Power[Which[# == 1, 1, # == 2, 1, True, NextPrime[#, -1]] & /@ First@ #, Last@ #] &@ Transpose@ FactorInteger@ k]], #, # > 1 &] /. k_ /; IntegerQ@ k :> If[Mod[k, 4] == 3, 1, 0], 2] &, {1}~Join~Table[Function[t, Prime[t] Product[Prime[m]^(f[n][[m]]), {m, t}]][DigitCount[n, 2, 1]], {n, 120}]] (* Michael De Vlieger, Sep 22 2017 *)

Formula

a(n) = A292383(A163511(n)).
a(n) + A292271(n) = n, a(n) AND A292271(n) = 0.
a(n) AND n = a(n), where AND is bitwise-AND (A004198).

Extensions

Comments and examples from Antti Karttunen, Sep 22 2017

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).

A292593 a(n) = A292591(A245612(n)).

Original entry on oeis.org

0, 1, 2, 2, 4, 5, 4, 5, 8, 8, 10, 11, 8, 8, 10, 10, 16, 17, 16, 17, 20, 20, 22, 23, 16, 17, 16, 16, 20, 21, 20, 21, 32, 32, 34, 35, 32, 32, 34, 34, 40, 41, 40, 41, 44, 44, 46, 47, 32, 32, 34, 34, 32, 33, 32, 32, 40, 40, 42, 43, 40, 40, 42, 42, 64, 65, 64, 65, 68, 68, 70, 71, 64, 65, 64, 64, 68, 69, 68, 69, 80, 80, 82, 83, 80, 80, 82, 82, 88, 89, 88, 89
Offset: 0

Views

Author

Antti Karttunen, Sep 20 2017

Keywords

Crossrefs

Differs from A292271 for the first time at n=31, where a(31) = 21, while A292271(31) = 20.

Programs

  • Mathematica
    f[n_] := f[n] = Which[n == 1, 0, Mod[n, 3] == 2, Ceiling[n/3], True, (Times @@ Power[If[# == 1, 1, NextPrime[#, -1]] & /@ First@ #, Last@ #] &@ Transpose@ FactorInteger[2 n - 1] + 1)/2]; g[n_] := g[n] = If[n <= 2, n - 1, 2 g[f@ n] + Boole[Mod[n, 3] == 1]]; h[n_] := (Times @@ Power[If[# == 1, 1, NextPrime@ #] & /@ First@ #, Last@ #] + 1)/2 &@ Transpose@ FactorInteger@ If[n == 0, 1, Prime[#] Product[Prime[m]^(Map[ Ceiling[ (Length@ # - 1)/2] &, DeleteCases[Split@ Join[Riffle[IntegerDigits[n, 2], 0], {0}], {k__} /; k == 1]][[-m]]), {m, #}] &[DigitCount[n, 2, 1]]]; Array[g@ h@ # &, 92, 0] (* Michael De Vlieger, Sep 22 2017 *)

Formula

a(n) + A292592(n) = n.

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.

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.

A292946 a(n) = A292945(A163511(n)).

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 4, 4, 4, 5, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 8, 8, 8, 8, 8, 8, 10, 10, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 4, 4, 4, 5, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0
Offset: 0

Views

Author

Antti Karttunen, Sep 28 2017

Keywords

Comments

Because A292945(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+5 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, A292256, A292264, A292271, A292274, A292592, A292593, A292942, A292944 (for similarly constructed sequences).

Programs

Formula

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

A292590 a(1) = 0; and for n > 1, a(n) = 2*a(A285712(n)) + [0 == (n mod 3)].

Original entry on oeis.org

0, 0, 1, 2, 0, 5, 10, 2, 21, 42, 4, 85, 0, 0, 171, 342, 10, 5, 684, 20, 1369, 2738, 4, 5477, 0, 42, 10955, 8, 84, 21911, 43822, 8, 21, 87644, 170, 175289, 350578, 0, 11, 701156, 0, 1402313, 40, 342, 2804627, 16, 684, 85, 5609254, 20, 11218509, 22437018, 10, 44874037, 89748074, 1368, 179496149, 168, 40, 43, 0, 2738, 1, 358992298, 5476, 717984597, 80, 8
Offset: 1

Views

Author

Antti Karttunen, Sep 20 2017

Keywords

Comments

Binary expansion of a(n) encodes the positions of multiples of three in the path taken from n to the root in the binary trees like A245612 and A244154.

Crossrefs

Programs

  • Mathematica
    f[n_] := f[n] = Which[n == 1, 0, Mod[n, 3] == 2, Ceiling[n/3], True, (Times @@ Power[If[# == 1, 1, NextPrime[#, -1]] & /@ First@ #, Last@ #] &@ Transpose@ FactorInteger[2 n - 1] + 1)/2]; a[n_] := a[n] = If[n == 1, n - 1, 2 a[f@ n] + Boole[Divisible[n, 3]]]; Array[a, 67] (* Michael De Vlieger, Sep 22 2017 *)
  • Scheme
    (define (A292590 n) (if (<= n 1) 0 (+ (if (zero? (modulo n 3)) 1 0) (* 2 (A292590 (A285712 n))))))

Formula

a(1) = 0; and for n > 1, a(n) = A079978(n) + 2*a(A285712(n)).
a(n) + A292591(n) = A245611(n).
a(A245612(n)) = A292592(n).
A000120(a(n)) = A292594(n).

A332996 a(n) = A332896(A332817(n)).

Original entry on oeis.org

0, 0, 0, 1, 0, 0, 2, 2, 0, 1, 0, 0, 4, 5, 4, 5, 0, 0, 2, 2, 0, 1, 0, 0, 8, 8, 10, 11, 8, 8, 10, 10, 0, 1, 0, 0, 4, 5, 4, 5, 0, 0, 2, 2, 0, 1, 0, 0, 16, 17, 16, 17, 20, 20, 22, 23, 16, 17, 16, 16, 20, 21, 20, 21, 0, 0, 2, 2, 0, 1, 0, 0, 8, 8, 10, 11, 8, 8, 10, 10, 0, 1, 0, 0, 4, 5, 4, 5, 0, 0, 2, 2, 0, 1, 0, 0, 32, 32, 34, 35, 32, 32, 34, 34, 40, 41
Offset: 0

Views

Author

Antti Karttunen, Mar 05 2020

Keywords

Comments

In contrast to similarly constructed A292274, this sequence can be computed directly from the binary expansion of n, without involving primes or their distribution at all.

Crossrefs

Differs from a similarly constructed A292592 for the first time at n=511, where a(511) = 170, while A292592(511) = 171.

Programs

Formula

a(n) = A332896(A332817(n)).
a(n) = n - A332995(n) = n XOR A332995(n).
A000120(a(n)) = A332998(n).
Showing 1-9 of 9 results.