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

A237427 a(0)=0, a(1)=1; thereafter, if n is k-th ludic number [i.e., n = A003309(k)], a(n) = 1 + (2*a(k-1)); otherwise, when n is k-th nonludic number [i.e., n = A192607(k)], a(n) = 2*a(k).

Original entry on oeis.org

0, 1, 3, 7, 2, 15, 6, 5, 14, 4, 30, 31, 12, 13, 10, 28, 8, 11, 60, 62, 24, 26, 20, 29, 56, 9, 16, 22, 120, 61, 124, 48, 52, 40, 58, 112, 18, 63, 32, 44, 240, 25, 122, 27, 248, 96, 104, 21, 80, 116, 224, 36, 126, 57, 64, 88, 480, 50, 244, 54, 496, 17, 192, 208, 42
Offset: 0

Views

Author

Keywords

Comments

Shares with permutation A237058 the property that all odd numbers occur in positions given by ludic numbers (A003309: 1, 2, 3, 5, 7, 11, 13, 17, ...), while the even numbers > 0 occur in positions given by nonludic numbers (A192607: 4, 6, 8, 9, 10, 12, 14, 15, 16, ...). However, instead of placing terms into those positions in monotone order this sequence recursively permutes the order of both subsets with the emerging permutation itself, so this is a kind of "deep" variant of A237058.
Alternatively, this can be viewed as yet another "entanglement permutation", where two pairs of complementary subsets of natural numbers are entangled with each other. In this case a complementary pair ludic/nonludic numbers (A003309/A192607) is entangled with a complementary pair odd/even numbers (A005408/A005843).
Because 2 is the only even ludic number, it implies that, apart from a(2)=3, odd numbers occur in odd positions only (along with many even numbers that also occur in odd positions).

Examples

			For n=2, with 2 being the second ludic number (= A003309(2)), the value is computed as 1+(2*a(2-1)) = 1+2*a(1) = 1+2 = 3, thus a(2)=3.
For n=3, with 3 being the third ludic number (= A003309(3)), the value is computed as 1+(2*a(3-1)) = 1+2*a(2) = 1+2*3 = 7, thus a(3)=7.
For n=4, with 4 being the first nonludic number (= A192607(1)), the value is computed as 2*a(1) = 2 = a(4).
For n=5, with 5 being the fourth ludic number (= A003309(4)), the value is computed as 1+(2*a(4-1)) = 1+2*a(3) = 1+2*7 = 15 = a(5).
For n=9, with 9 being the fourth nonludic number (= A192607(4)), the value is computed as 2*a(4) = 2*2 = 4 = a(9).
		

Crossrefs

Inverse permutation of A237126.
Similar permutations: A135141/A227413, A243287/A243288, A243343-A243346.

Programs

  • Haskell
    import Data.List (elemIndex); import Data.Maybe (fromJust)
    a237427 = (+ 1) . fromJust . (`elemIndex` a237126_list)
    
  • Mathematica
    nmax = 100;
    T = Range[2, nmax+7];
    L = {1};
    While[Length[T] > 0, With[{k = First[T]},
         AppendTo[L, k]; T = Drop[T, {1, -1, k}]]];
    nonL = Complement[Range[Last[L]], L];
    a[n_] := a[n] = Module[{k}, Which[
         n < 2, n,
         IntegerQ[k = FirstPosition[L, n][[1]]], 1 + 2 a[k-1],
         IntegerQ[k = FirstPosition[nonL, n][[1]]], 2 a[k],
         True , Print[" error: n = ", n]]];
    Table[a[n], {n, 0, nmax}] (* Jean-François Alcover, Oct 10 2021, after Ray Chandler in A003309 *)
  • Scheme
    ;; With Antti Karttunen's IntSeq-library for memoizing definec-macro.
    (definec (A237427 n) (cond ((< n 2) n) ((= 1 (A192490 n)) (+ 1 (* 2 (A237427 (- (A192512 n) 1))))) (else (* 2 (A237427 (A236863 n))))))
    ;; Antti Karttunen, Feb 07 2014

Formula

a(0)=0, a(1)=1; thereafter, if A192490(n) = 1 [i.e., n is ludic], a(n) = 1+(2*a(A192512(n)-1)); otherwise a(n) = 2*a(A236863(n)) [where A192512 and A236863 give the number of ludic and nonludic numbers <= n, respectively].

A243287 a(1)=1, and for n > 1, if n is k-th number divisible by the square of its largest prime factor (i.e., n = A070003(k)), a(n) = 1 + (2*a(k)); otherwise, when n = A102750(k), a(n) = 2*a(k).

Original entry on oeis.org

1, 2, 4, 3, 8, 6, 16, 5, 9, 12, 32, 10, 18, 24, 64, 7, 20, 17, 36, 48, 128, 14, 40, 34, 13, 72, 33, 96, 256, 28, 80, 11, 68, 26, 144, 19, 66, 192, 512, 56, 160, 22, 136, 52, 288, 38, 132, 384, 25, 65, 1024, 112, 320, 21, 44, 272, 104, 576, 76, 264, 768, 50, 130, 37, 2048
Offset: 1

Views

Author

Antti Karttunen, Jun 02 2014

Keywords

Comments

This is an instance of "entanglement permutation", where two pairs of complementary subsets of natural numbers are interwoven with each other. In this case complementary pair A070003/A102750 (numbers which are divisible/not divisible by the square of their largest prime factor) is entangled with complementary pair odd/even numbers (A005408/A005843).
Thus this shares with the permutation A122111 the property that each term of A102750 is mapped to a unique even number and likewise each term of A070003 is mapped to a unique odd number.

Crossrefs

Inverse: A243288.
Similarly constructed permutations: A243343-A243346, A135141-A227413, A237126-A237427, A193231.

Formula

a(1) = 1, and thereafter, if A241917(n) = 0 (i.e., n is a term of A070003), a(n) = 1 + (2*a(A243282(n))); otherwise a(n) = 2*a(A243285(n)) (where A243282 and A243285 give the number of integers <= n divisible/not divisible by the square of their largest prime factor).

A245605 Permutation of natural numbers: a(1) = 1, a(2n) = 2 * a(A064989(2n-1)), a(2n-1) = 1 + (2 * a(A064989(2n-1)-1)).

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 9, 10, 7, 8, 13, 18, 17, 26, 11, 12, 37, 34, 25, 74, 15, 16, 69, 50, 21, 14, 19, 20, 33, 138, 41, 66, 35, 52, 53, 22, 277, 82, 31, 32, 45, 554, 65, 90, 27, 36, 1109, 130, 101, 42, 43, 28, 73, 2218, 149, 30, 71, 104, 57, 146, 209, 114, 51, 148, 133, 70, 293, 418, 555, 164, 141, 586, 329, 282, 75, 68, 105, 106, 1173, 658, 23, 24
Offset: 1

Views

Author

Antti Karttunen, Jul 29 2014

Keywords

Comments

The even bisection halved gives A245607. The odd bisection incremented by one and halved gives A245707.

Crossrefs

Programs

  • PARI
    A064989(n) = my(f = factor(n)); for(i=1, #f~, if((2 == f[i,1]),f[i,1] = 1,f[i,1] = precprime(f[i,1]-1))); factorback(f);
    A245605(n) = if(1==n, 1, if(0==(n%2), 2*A245605(A064989(n-1)), 1+(2*A245605(A064989(n)-1))));
    for(n=1, 10001, write("b245605.txt", n, " ", A245605(n)));
    
  • Scheme
    ;; With memoization-macro definec.
    (definec (A245605 n) (cond ((= 1 n) 1) ((even? n) (* 2 (A245605 (A064989 (- n 1))))) (else (+ 1 (* 2 (A245605 (-1+ (A064989 n))))))))

Formula

a(1) = 1, a(2n) = 2 * a(A064989(2n-1)), a(2n-1) = 1 + (2 * a(A064989(2n-1)-1)).
a(1) = 1, a(2n) = 2 * a(A064216(n)), a(2n-1) = 1 + (2 * a(A064216(n)-1)).
As a composition of related permutations:
a(n) = A245607(A048673(n)).

A243288 Permutation of natural numbers: a(1)=1, a(2n) = A102750(a(n)), a(2n+1) = A070003(a(n)).

Original entry on oeis.org

1, 2, 4, 3, 8, 6, 16, 5, 9, 12, 32, 10, 25, 22, 81, 7, 18, 13, 36, 17, 54, 42, 242, 14, 49, 34, 150, 30, 128, 99, 882, 11, 27, 24, 100, 19, 64, 46, 256, 23, 98, 68, 490, 55, 338, 279, 4624, 20, 72, 62, 432, 44, 245, 178, 2209, 40, 216, 154, 1800, 119, 1200, 966
Offset: 1

Views

Author

Antti Karttunen, Jun 02 2014

Keywords

Comments

This is an instance of "entanglement permutation", where two pairs of complementary subsets of natural numbers are interwoven with each other. In this case complementary pair odd/even numbers (A005408/A005843) is entangled with complementary pair A070003/A102750 (numbers which are divisible/not divisible by the square of their largest prime factor).
Thus this shares with the permutation A122111 the property that each even number is mapped to a unique term of A102750 and each odd number (larger than 1) to a unique term of A070003.

Crossrefs

Inverse of A243287.
Similarly constructed permutations: A243343-A243346, A135141-A227413, A237126-A237427, A193231.

Formula

a(1)=1, and for n > 1, if n=2k, a(n) = A102750(a(k)), otherwise, when n = 2k+1, a(n) = A070003(a(k)).

A243346 a(1) = 1, a(2n) = A005117(1+a(n)), a(2n+1) = A013929(a(n)), where A005117 are squarefree and A013929 are nonsquarefree numbers.

Original entry on oeis.org

1, 2, 4, 3, 8, 6, 12, 5, 9, 13, 24, 10, 18, 19, 32, 7, 16, 14, 25, 21, 36, 38, 63, 15, 27, 30, 49, 31, 50, 53, 84, 11, 20, 26, 45, 22, 40, 39, 64, 34, 54, 59, 96, 62, 99, 103, 162, 23, 44, 42, 72, 47, 80, 79, 126, 51, 81, 82, 128, 86, 136, 138, 220, 17, 28, 33, 52, 41, 68, 73, 120
Offset: 1

Views

Author

Antti Karttunen, Jun 03 2014

Keywords

Comments

This permutation entangles complementary pair A005843/A005408 (even/odd numbers) with complementary pair A005117/A013929 (numbers which are squarefree/are not squarefree).

Crossrefs

Formula

a(1) = 1, a(2n) = A005117(1+a(n)), a(2n+1) = A013929(a(n)).
For all n > 1, A008966(a(n)) = A000035(n+1), or equally, mu(a(n)) + 1 = n modulo 2, where mu is Moebius mu (A008683). [A property shared with a simpler variant A075378].

A243347 a(1)=1, and for n>1, if mu(n) = 0, a(n) = A005117(1+a(A057627(n))), otherwise, a(n) = A013929(a(A013928(n))).

Original entry on oeis.org

1, 4, 12, 2, 32, 8, 84, 6, 19, 24, 220, 3, 18, 50, 63, 53, 564, 13, 9, 138, 49, 128, 162, 10, 31, 136, 38, 365, 1448, 36, 25, 5, 351, 126, 332, 30, 414, 27, 81, 82, 348, 99, 931, 103, 86, 3699, 96, 929, 21, 14, 64, 223, 16, 79, 892, 210, 325, 847, 80, 265, 1056, 72, 15, 51, 208, 212, 884, 221, 256
Offset: 1

Views

Author

Antti Karttunen, Jun 03 2014

Keywords

Comments

Self-inverse permutation of natural numbers.
Shares with A088609 the property that after 1, positions indexed by squarefree numbers larger than one, A005117(n+1): 2, 3, 5, 6, 7, 10, 11, 13, 14, ... contain only nonsquarefree numbers A013929: 4, 8, 9, 12, 16, 18, 20, 24, ..., and vice versa. However, instead of placing terms in those subsets in monotone order this sequence recursively permutes the order of both subsets with the emerging permutation itself, thus implementing a kind of "deep" variant of A088609. Alternatively, this can be viewed as yet another "entanglement permutation", where two pairs of complementary subsets of natural numbers are interwoven with each other. In this case complementary pair A005117/A013929 is entangled with complementary pair A013929/A005117.

Crossrefs

Formula

a(1), and for n>1, if mu(n) = 0, a(n) = A005117(1+a(A057627(n))), otherwise, a(n) = A013929(a(A013928(n))). [Here mu is Moebius mu-function, A008683, which is zero only when n is a nonsquarefree number, one of the numbers in A013929.]
For all n > 1, A008966(a(n)) = 1 - A008966(n), or equally, mu(a(n)) + 1 = mu(n) modulo 2, where mu is Moebius mu (A008683). [Note: Permutation A088609 satisfies the same condition.]

A244321 Permutation of natural numbers: a(1)=1; thereafter, if n is k-th number whose greatest prime factor has an odd index [i.e., n = A244991(k)], a(n) = 2*a(k), otherwise, when n is k-th number whose greatest prime factor has an even index [i.e., n = A244990(1+k)], a(n) = 1+(2*a(k)).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Jul 22 2014

Keywords

Crossrefs

Inverse: A244322.
Similar entanglement permutations: A135141, A237427, A243287, A243343, A243345.

Formula

a(1) = 1, and for n > 1, if A244992(n) = 1 [i.e. the greatest prime factor of n has an odd index], a(n) = 2 * A244321(A244989(n)), otherwise, a(n) = 1 + (2 * A244321(A244988(n)-1)).
For all n >= 1, A000035(a(n)) = 1 - A244992(n).

A243344 a(1) = 1, a(2n) = A013929(a(n)), a(2n+1) = A005117(1+a(n)).

Original entry on oeis.org

1, 4, 2, 12, 6, 8, 3, 32, 19, 18, 10, 24, 13, 9, 5, 84, 53, 50, 31, 49, 30, 27, 15, 63, 38, 36, 21, 25, 14, 16, 7, 220, 138, 136, 86, 128, 82, 81, 51, 126, 79, 80, 47, 72, 42, 44, 23, 162, 103, 99, 62, 96, 59, 54, 34, 64, 39, 40, 22, 45, 26, 20, 11, 564, 365
Offset: 1

Views

Author

Antti Karttunen, Jun 03 2014

Keywords

Comments

This permutation entangles complementary pair odd/even numbers (A005408/A005843) with complementary pair A005117/A013929 (numbers which are squarefree/not squarefree).

Crossrefs

Formula

a(1) = 1, a(2n) = A013929(a(n)), a(2n+1) = A005117(1+a(n)).
For all n, A008966(a(n)) = A000035(n), or equally, mu(a(n)) = n modulo 2, where mu is Moebius mu (A008683). [The same property holds for A088610.]

A243345 a(1)=1; thereafter, if n is k-th squarefree number [i.e., n = A005117(k)], a(n) = 2*a(k-1); otherwise, when n is k-th nonsquarefree number [i.e., n = A013929(k)], a(n) = 2*a(k)+1.

Original entry on oeis.org

1, 2, 4, 3, 8, 6, 16, 5, 9, 12, 32, 7, 10, 18, 24, 17, 64, 13, 14, 33, 20, 36, 48, 11, 19, 34, 25, 65, 128, 26, 28, 15, 66, 40, 72, 21, 96, 22, 38, 37, 68, 50, 130, 49, 35, 256, 52, 129, 27, 29, 56, 67, 30, 41, 132, 73, 80, 144, 42, 97, 192, 44, 23, 39, 76, 74, 136, 69, 100
Offset: 1

Views

Author

Antti Karttunen, Jun 03 2014

Keywords

Comments

Any other fixed points than 1, 2, 6, 9, 135, 147, 914, ... ?
Any other points than 4, 21, 39, 839, 4893, 12884, ... where a(n) = n-1 ?

Crossrefs

Formula

a(1) = 1, and for n>1, if mu(n) = 0, a(n) = 1 + 2*a(A057627(n)), otherwise a(n) = 2*a(A013928(n)), where mu is Moebius mu function (A008683).
For all n > 1, A000035(a(n)+1) = A008966(n) = A008683(n)^2, or equally, a(n) = mu(n) + 1 modulo 2.

A243352 If n is k-th squarefree number [i.e., n = A005117(k)], a(n) = 2k-1; otherwise, when n is k-th nonsquarefree number [i.e., n = A013929(k)], a(n) = 2k.

Original entry on oeis.org

1, 3, 5, 2, 7, 9, 11, 4, 6, 13, 15, 8, 17, 19, 21, 10, 23, 12, 25, 14, 27, 29, 31, 16, 18, 33, 20, 22, 35, 37, 39, 24, 41, 43, 45, 26, 47, 49, 51, 28, 53, 55, 57, 30, 32, 59, 61, 34, 36, 38, 63, 40, 65, 42, 67, 44, 69, 71, 73, 46, 75, 77, 48, 50, 79, 81, 83, 52, 85, 87, 89
Offset: 1

Views

Author

Antti Karttunen, Jun 04 2014

Keywords

Comments

Odd numbers occur (in order) at the positions given by squarefree numbers, A005117, and even numbers occur (in order) at the positions given by their complement, nonsquarefree numbers, A013929.

Crossrefs

Inverse: A088610. Cf. A243343, A072062.

Programs

Formula

If mu(n) = 0, a(n) = 2*A057627(n), otherwise, a(n) = 1 + 2 * A013928(n). [Here mu is Moebius mu-function, A008683, which is zero only when n is a nonsquarefree number, one of the numbers in A013929].
For all n, A000035(a(n)) = A008966(n) = A008683(n)^2, or equally, a(n) = mu(n) modulo 2.
Showing 1-10 of 14 results. Next