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

A366373 a(n) = gcd(n, A332214(n)), where A332214 is the Mersenne-prime fixing variant of permutation A163511.

Original entry on oeis.org

1, 1, 2, 3, 4, 1, 6, 7, 8, 9, 2, 1, 12, 1, 14, 5, 16, 1, 18, 1, 4, 21, 2, 1, 24, 1, 2, 1, 28, 1, 10, 31, 32, 3, 2, 7, 36, 1, 2, 1, 8, 1, 42, 1, 4, 15, 2, 1, 48, 7, 2, 1, 4, 1, 2, 5, 56, 3, 2, 1, 20, 1, 62, 1, 64, 1, 6, 1, 4, 3, 14, 1, 72, 1, 2, 25, 4, 1, 2, 1, 16, 27, 2, 1, 84, 5, 2, 1, 8, 1, 30, 7, 4, 93, 2, 1, 96
Offset: 0

Views

Author

Antti Karttunen, Oct 08 2023

Keywords

Crossrefs

Programs

Formula

a(n) = gcd(n, A366372(n)) = gcd(A332214(n), A366372(n)).
For n >= 1, a(n) = n / A366374(n)
a(n) = A332214(n) / A366375(n).

A366375 a(n) = A332214(n) / gcd(n, A332214(n)), where A332214 is the Mersenne-prime fixing variant of permutation A163511.

Original entry on oeis.org

1, 2, 2, 1, 2, 9, 1, 1, 2, 3, 9, 49, 1, 21, 1, 1, 2, 81, 3, 343, 9, 7, 49, 25, 1, 63, 21, 35, 1, 15, 1, 1, 2, 81, 81, 343, 3, 1029, 343, 125, 9, 441, 7, 175, 49, 5, 25, 961, 1, 27, 63, 245, 21, 105, 35, 31, 1, 15, 15, 217, 1, 93, 1, 11, 2, 729, 81, 16807, 81, 2401, 343, 625, 3, 3087, 1029, 35, 343, 375, 125, 29791, 9, 49
Offset: 0

Views

Author

Antti Karttunen, Oct 08 2023

Keywords

Comments

Denominator of n / A332214(n).

Crossrefs

Cf. A332214, A366372, A366373, A366374 (numerators), A366376 (rgs-transform).
Cf. also A364492, A366285.

Programs

Formula

a(n) = A332214(n) / A366373(n) = A332214(n) / gcd(n, A332214(n)).

A366376 Lexicographically earliest infinite sequence such that a(i) = a(j) => A366375(i) = A366375(j) for all i, j >= 0, where A366375(n) is the denominator of n / A332214(n).

Original entry on oeis.org

1, 2, 2, 1, 2, 3, 1, 1, 2, 4, 3, 5, 1, 6, 1, 1, 2, 7, 4, 8, 3, 9, 5, 10, 1, 11, 6, 12, 1, 13, 1, 1, 2, 7, 7, 8, 4, 14, 8, 15, 3, 16, 9, 17, 5, 18, 10, 19, 1, 20, 11, 21, 6, 22, 12, 23, 1, 13, 13, 24, 1, 25, 1, 26, 2, 27, 7, 28, 7, 29, 8, 30, 4, 31, 14, 12, 8, 32, 15, 33, 3, 5, 16, 34, 9, 22, 17, 35, 5, 36, 18, 19, 10
Offset: 0

Views

Author

Antti Karttunen, Oct 08 2023

Keywords

Comments

Restricted growth sequence transform of A366375.

Crossrefs

Cf. also A365393, A365431, A366286 (compare the scatter plots).

Programs

  • PARI
    \\ Needs also program from A332214:
    up_to = 65537;
    rgs_transform(invec) = { my(om = Map(), outvec = vector(length(invec)), u=1); for(i=1, length(invec), if(mapisdefined(om,invec[i]), my(pp = mapget(om, invec[i])); outvec[i] = outvec[pp] , mapput(om,invec[i],i); outvec[i] = u; u++ )); outvec; };
    A366375(n) = { my(u=A332214(n)); (u/gcd(n,u)); };
    v366376 = rgs_transform(vector(1+up_to,n,A366375(n-1)));
    A366376(n) = v366376[1+n];

A364260 a(n) = A331410(A332214(n)).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Jul 16 2023

Keywords

Crossrefs

Cf. A131577 (positions of 0's), A335431 (of 1's).
Differs from related A334204 for the first time at n=31, where a(31) = 1, while A334204(31) = 2.

Formula

a(n) = A364259(A163511(n)).
For all n >= 0, a(2^n) = 0, a(2^n + 1) = n.

A366372 a(n) = A332214(n) - n, where A332214 is the Mersenne-prime fixing variant of permutation A163511.

Original entry on oeis.org

1, 1, 2, 0, 4, 4, 0, 0, 8, 18, 8, 38, 0, 8, 0, -10, 16, 64, 36, 324, 16, 126, 76, 2, 0, 38, 16, 8, 0, -14, -20, 0, 32, 210, 128, 2366, 72, 992, 648, 86, 32, 400, 252, 132, 152, 30, 4, 914, 0, 140, 76, 194, 32, 52, 16, 100, 0, -12, -28, 158, -40, 32, 0, -52, 64, 664, 420, 16740, 256, 7134, 4732, 554, 144, 3014, 1984
Offset: 0

Views

Author

Antti Karttunen, Oct 08 2023

Keywords

Crossrefs

Cf. A332214, A335431 (known positions of 0's), A366373, A366374, A366375, A366376.
Cf. also A364253, A364258, A366282.

Programs

A366374 a(n) = n / gcd(n, A332214(n)), where A332214 is the Mersenne-prime fixing variant of permutation A163511.

Original entry on oeis.org

0, 1, 1, 1, 1, 5, 1, 1, 1, 1, 5, 11, 1, 13, 1, 3, 1, 17, 1, 19, 5, 1, 11, 23, 1, 25, 13, 27, 1, 29, 3, 1, 1, 11, 17, 5, 1, 37, 19, 39, 5, 41, 1, 43, 11, 3, 23, 47, 1, 7, 25, 51, 13, 53, 27, 11, 1, 19, 29, 59, 3, 61, 1, 63, 1, 65, 11, 67, 17, 23, 5, 71, 1, 73, 37, 3, 19, 77, 39, 79, 5, 3, 41, 83, 1, 17, 43, 87, 11, 89
Offset: 0

Views

Author

Antti Karttunen, Oct 08 2023

Keywords

Comments

Numerator of n / A332214(n).

Crossrefs

Cf. A332214, A366372, A366373, A366375 (denominators), A366376.
Cf. also A364491, A366284.

Programs

Formula

a(n) = n / A366373(n) = n / gcd(n, A332214(n)).

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

A335431 Numbers of the form q*(2^k), where q is one of the Mersenne primes (A000668) and k >= 0.

Original entry on oeis.org

3, 6, 7, 12, 14, 24, 28, 31, 48, 56, 62, 96, 112, 124, 127, 192, 224, 248, 254, 384, 448, 496, 508, 768, 896, 992, 1016, 1536, 1792, 1984, 2032, 3072, 3584, 3968, 4064, 6144, 7168, 7936, 8128, 8191, 12288, 14336, 15872, 16256, 16382, 24576, 28672, 31744, 32512, 32764, 49152, 57344, 63488, 65024, 65528, 98304, 114688, 126976, 130048, 131056, 131071
Offset: 1

Views

Author

Antti Karttunen, Jun 28 2020

Keywords

Comments

Numbers of the form 2^k * ((2^p)-1), where p is one of the primes in A000043, and k >= 0.
Numbers k such that A000265(k) is in A000668.
Numbers k for which A331410(k) = 1.
Numbers k that themselves are not powers of two, but for which A335876(k) = k+A052126(k) is [a power of 2].
Conjecture: This sequence gives all fixed points of map n -> A332214(n) and its inverse n -> A332215(n). See also notes in A029747 and in A163511.

Crossrefs

Cf. A000043, A000396 (even terms form a subsequence), A000668 (primes present), A335882, A341622.
Row 1 of A335430.
Positions of 1's in A331410, in A364260, and in A364251 (characteristic function).
Subsequence of A054784.

Programs

  • Mathematica
    qs = 2^MersennePrimeExponent[Range[6]] - 1; max = qs[[-1]]; Reap[Do[n = 2^k*q; If[n <= max, Sow[n]], {k, 0, Log2[max]}, {q, qs}]][[2, 1]] // Union (* Amiram Eldar, Feb 18 2021 *)
  • PARI
    A000265(n) = (n>>valuation(n,2));
    isA000668(n) = (isprime(n)&&!bitand(n,1+n));
    isA335431(n) = isA000668(A000265(n));

Formula

A332214(a(n)) = A332215(a(n)) = a(n) for all n.
Sum_{n>=1} 1/a(n) = 2 * A173898 = 1.0329083578... - Amiram Eldar, Feb 18 2021

A332817 a(n) = A108548(A163511(n)).

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, 13, 64, 243, 162, 625, 108, 375, 250, 343, 72, 225, 150, 245, 100, 147, 98, 169, 48, 135, 90, 175, 60, 105, 70, 91, 40, 63, 42, 65, 28, 39, 26, 11, 128, 729, 486, 3125, 324, 1875, 1250, 2401, 216, 1125, 750, 1715, 500
Offset: 0

Views

Author

Antti Karttunen, Mar 05 2020

Keywords

Comments

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 A332818 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 13
etc.
This is the mirror image of the tree in A332815.

Crossrefs

Cf. A332811 (inverse permutation).
Cf. A054429, A108548, A163511, A332815 (mirror image).
Cf. A108546 (the right edge of the tree from 2 downward).
Cf. also A332214.

Programs

  • PARI
    up_to = 26927;
    A005940(n) = { my(p=2, t=1); n--; until(!n\=2, if((n%2), (t*=p), p=nextprime(p+1))); t }; \\ From A005940
    A054429(n) = ((3<<#binary(n\2))-n-1); \\ From A054429
    A163511(n) = if(!n,1,A005940(1+A054429(n)));
    A108546list(up_to) = { my(v=vector(up_to), p,q); v[1] = 2; v[2] = 3; v[3] = 5; for(n=4,up_to, p = v[n-2]; q = nextprime(1+p); while(q%4 != p%4, q=nextprime(1+q)); v[n] = q); (v); };
    v108546 = A108546list(up_to);
    A108546(n) = v108546[n]; \\ Antti Karttunen, Mar 05 2020
    A108548(n) = { my(f=factor(n)); f[,1] = apply(A108546,apply(primepi,f[,1])); factorback(f); };
    A332817(n) = A108548(A163511(n));

Formula

a(n) = A108548(A163511(n)).
For n >= 1, a(n) = A332815(A054429(n)).

A365805 a(n) = largest exponent m for which a representation of the form A163511(n) = k^m exists (for some k). a(0) = 0 by convention.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Oct 01 2023

Keywords

Comments

Equivalently, the largest exponent m for which a representation of the form A332214(n) = k^m exists (for some k), or similarly, for any other such variant of A163511, like A332817.

Crossrefs

Cf. A365808 (positions of even terms), A365801 (multiples of 3), A365802 (multiples of 5), A366287 (multiples of 7), A366391 (multiples of 11).

Programs

  • PARI
    A052409(n) = { my(k=ispower(n)); if(k, k, n>1); };
    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));
    A365805(n) = A052409(A163511(n));

Formula

a(n) = A052409(A163511(n)).
If a(n) > 1 (or A052409(n) > 1), then a(n) <> A052409(n). [Consider A366370]
Showing 1-10 of 16 results. Next