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

A300957 Fixed points of A300955.

Original entry on oeis.org

1, 5, 6, 7, 11, 13, 17, 19, 23, 29, 30, 31, 35, 37, 41, 42, 43, 47, 53, 55, 59, 61, 65, 66, 67, 71, 72, 73, 77, 78, 79, 83, 85, 89, 91, 95, 97, 101, 102, 103, 107, 108, 109, 113, 114, 115, 119, 127, 131, 133, 137, 138, 139, 143, 145, 149, 151, 155, 157, 161
Offset: 1

Views

Author

Rémy Sigrist, Mar 17 2018

Keywords

Comments

For any n > 0, A279510(A279510(n)) belongs to this sequence (and this sequence is infinite).
For any n > 0:
- a(n) is a multiple of 2 iff a(n) is a multiple of 3,
- if a(n) is a multiple of 2 then A007814(a(n)) = A300955(A007949(a(n))) and A300955(A007814(a(n))) = A007949(a(n)),
- if a prime p > 3 divides a(n), then the p-adic valuation of a(n) belongs to this sequence.
Squarefree numbers coprime to 6 are in this sequence, and all members of this sequence are 0, 1, or 5 mod 6, so the lower density is at least 3/Pi^2 = 0.303... and the upper density is at most 1/2. This could be improved with more care. - Charles R Greathouse IV, May 17 2024

Examples

			A300955(42) = 42 hence 42 belongs to this sequence.
		

Crossrefs

Programs

  • Maple
    b:= n-> `if`(n=1, 1, mul(`if`(i[1]=2, 3, `if`(i[1]=3,
                 2, i[1]))^b(i[2]), i=ifactors(n)[2])):
    select(n-> n=b(n), [$1..200])[]; # Alois P. Heinz, Mar 17 2018

A300948 a(1) = 2, a(2) = 1, and for any n > 2 with binary expansion Sum_{i=0..k} b_i * 2^i, a(n) = Sum_{i=0..k} b_i * 2^(a(i+1)-1).

Original entry on oeis.org

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

Views

Author

Rémy Sigrist, Mar 16 2018

Keywords

Comments

More informally, in binary, the a(k)-th bit of a(n) is set iff the k-th bit of n is set (where the least significant bit has index 1).
For any k >= 0, the restriction of this sequence to the first A007013(k) terms is a self-inverse permutation preserving the Hamming weight; this property can be proven by induction.
This sequence is a self-inverse permutation of the natural numbers.
This sequence has infinitely many fixed points (A300950); for any k >= 0, at least one of 2^k or 2^k + a(2^k) is a fixed point.
See also A300955 and A300956 for sequences in the same vein.

Examples

			a(3) = a(2^1 + 2^0) = 2^(a(2)-1) + 2^(a(1)-1) = 2^0 + 2^1 = 3.
a(4) = a(2^2) = 2^(a(3)-1) = 2^2 = 4.
a(6) = a(2^2 + 2^1) = 2^(a(3)-1) + 2^(a(2)-1) = 2^2 + 2^0 = 5.
a(42) = a(2^5 + 2^3 + 2^1) = 2^(a(6)-1) + 2^(a(4)-1) + 2^(a(2)-1) = 2^4 + 2^3 + 2^0 = 25.
		

Crossrefs

Cf. A000120, A007013, A300950 (fixed points), A300955, A300956.

Programs

  • Mathematica
    a[1] = 2; a[2] = 1; a[n_] := a[n] = With[{b = IntegerDigits[n, 2] // Reverse}, Sum[If[b[[i]] == 1, 2^(a[i]-1), 0], {i, Length[b]}]]; Array[a, 100] (* Jean-François Alcover, Mar 17 2018 *)
  • PARI
    a(n) = if (n==1, 2, n==2, 1, my (b=Vecrev(binary(n))); sum(i=1, #b, if (b[i], 2^(a(i)-1), 0)))

Formula

A000120(a(n)) = A000120(n).
a(a(n)) = n.

A300956 a(0) = 0, a(1) = 2, a(2) = 1, and for any n > 2 with ternary representation n = Sum_{i=0..k} t_i * 3^i, a(n) = Sum_{i=0..k} a(t_i) * 3^a(i).

Original entry on oeis.org

0, 2, 1, 18, 20, 19, 9, 11, 10, 6, 8, 7, 24, 26, 25, 15, 17, 16, 3, 5, 4, 21, 23, 22, 12, 14, 13, 774840978, 774840980, 774840979, 774840996, 774840998, 774840997, 774840987, 774840989, 774840988, 774840984, 774840986, 774840985, 774841002, 774841004
Offset: 0

Views

Author

Rémy Sigrist, Mar 17 2018

Keywords

Comments

This sequence is a self-inverse permutation of the natural numbers.
This sequence has connections with A300955.
This sequence has infinitely many fixed points (A300958); for any k >= 0, at least one of k or 3^k + 2 * 3^a(k) is a fixed point.

Crossrefs

Cf. A160384, A300955, A300958 (fixed points).

Programs

  • PARI
    a(n) = my (t=Vecrev(digits(n,3))); sum(i=0, #t-1, if (t[i+1]==1, 2, t[i+1]==2, 1, 0) * 3 ^ a(i))

Formula

A160384(a(n)) = A160384(n).
a(a(n)) = n.
Showing 1-3 of 3 results.