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 23 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].

A237126 a(0)=0, a(1) = 1, a(2n) = nonludic(a(n)), a(2n+1) = ludic(a(n)+1), where ludic = A003309, nonludic = A192607.

Original entry on oeis.org

0, 1, 4, 2, 9, 7, 6, 3, 16, 25, 14, 17, 12, 13, 8, 5, 26, 61, 36, 115, 22, 47, 27, 67, 20, 41, 21, 43, 15, 23, 10, 11, 38, 119, 81, 359, 51, 179, 146, 791, 33, 91, 64, 247, 39, 121, 88, 407, 31, 83, 57, 221, 32, 89, 59, 227, 24, 53, 34, 97, 18, 29, 19, 37, 54
Offset: 0

Views

Author

Keywords

Comments

Shares with permutation A237056 the property that the other bisection consists of only ludic numbers and the other bisection of only nonludic numbers. 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, so this is a kind of "deep" variant of A237056.
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 odd/even numbers (A005408/A005843) is entangled with a complementary pair ludic/nonludic numbers (A003309/A192607).

Examples

			a(2) = a(2*1) = nonludic(a(1)) = A192607(1) = 4.
a(3) = a(2*1+1) = ludic(a(1)+1) = A003309(1+1) = A003309(2) = 2.
a(4) = a(2*2) = nonludic(a(2)) = A192607(4) = 9.
a(5) = a(2*2+1) = ludic(a(2)+1) = A003309(4+1) = A003309(5) = 7.
		

Crossrefs

Cf. A237427 (inverse), A237056, A235491.
Similarly constructed permutations: A227413/A135141.

Programs

  • Haskell
    import Data.List (transpose)
    a237126 n = a237126_list !! n
    a237126_list = 0 : es where
       es = 1 : concat (transpose [map a192607 es, map (a003309 . (+ 1)) es])
    -- Reinhard Zumkeller, Feb 10 2014, Feb 06 2014
    
  • Mathematica
    nmax = 64;
    T = Range[2, 20 nmax];
    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] = Which[
         n < 2, n,
         EvenQ[n] && a[n/2] <= Length[nonL], nonL[[a[n/2]]],
         OddQ[n] && a[(n-1)/2]+1 <= Length[L], L[[a[(n-1)/2]+1]],
         True, Print[" error: n = ", n, " size of T should be increased"]];
    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 (A237126 n) (cond ((< n 2) n) ((even? n) (A192607 (A237126 (/ n 2)))) (else (A003309 (+ 1 (A237126 (/ (- n 1) 2))))))) ;; Antti Karttunen, Feb 07 2014

Formula

a(0)=0, a(1) = 1, a(2n) = nonludic(a(n)), a(2n+1) = ludic(a(n)+1), where ludic = A003309, nonludic = A192607.

A255421 Permutation of natural numbers: a(1) = 1, a(p_n) = ludic(1+a(n)), a(c_n) = nonludic(a(n)), where p_n = n-th prime, c_n = n-th composite number and ludic = A003309, nonludic = A192607.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Feb 23 2015

Keywords

Comments

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 a complementary pair ludic/nonludic numbers (A003309/A192607) is intertwined with a complementary pair prime/composite numbers (A000040/A002808).

Examples

			When n = 19 = A000040(8) [the eighth prime], we look for the value of a(8), which is 8 [all terms less than 19 are fixed because the beginnings of A003309 and A008578 coincide up to A003309(8) = A008578(8) = 17], and then take the eighth ludic number larger than 1, which is A003309(1+8) = 23, thus a(19) = 23.
When n = 20 = A002808(11) [the eleventh composite], we look for the value of a(11), which is 11 [all terms less than 19 are fixed, see above], and then take the eleventh nonludic number, which is A192607(11) = 19, thus a(20) = 19.
When n = 30 = A002808(19) [the 19th composite], we look for the value of a(19), which is 23 [see above], and then take the 23rd nonludic number, which is A192607(23) = 34, thus a(30) = 34.
		

Crossrefs

Formula

a(1) = 1, and for n > 1, if A010051(n) = 1 [i.e. when n is a prime], a(n) = A003309(1+a(A000720(n))), otherwise a(n) = A192607(a(A065855(n))).
As a composition of other permutations:
a(n) = A237126(A246377(n)).
Other identities.
a(A007097(n)) = A255420(n). [Maps iterates of primes to the iterates of Ludic numbers.]

A235491 Self-inverse permutation of natural numbers: complementary pair ludic/nonludic numbers (A003309/A192607) entangled with the same pair in the opposite order, nonludic/ludic. See Formula.

Original entry on oeis.org

0, 1, 4, 9, 2, 16, 7, 6, 25, 3, 61, 26, 17, 14, 13, 115, 5, 12, 359, 119, 67, 47, 43, 36, 791, 8, 11, 41, 3017, 81, 811, 407, 247, 227, 179, 7525, 23, 38, 37, 221, 34015, 27, 503, 22, 7765, 3509, 1943, 21, 1777, 1333, 93625, 97, 193, 146, 181, 1717, 486721, 121, 4493, 91, 96839, 10, 40217, 20813, 89
Offset: 0

Views

Author

Antti Karttunen, Feb 07 2014

Keywords

Comments

The permutation is self-inverse (an involution), meaning that a(a(n)) = n for all n.

Examples

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

Crossrefs

Cf. A236854 (a similar permutation constructed from prime and composite numbers).
Cf. A237126/A237427 (entanglement permutations between ludic/nonludic <-> odd/even numbers).

Formula

a(0)=0, a(1)=1, and for n > 1, if n is k-th ludic number (i.e., n = A003309(k)), then a(n) = nonludic(a(k-1)); otherwise, when n is k-th nonludic number (i.e., n = A192607(k)), then a(n) = ludic(a(k)+1), where ludic numbers are given by A003309, and nonludic numbers by A192607.
a(0)=0, a(1)=1, and for n > 1, if A192490(n)=1 (n is ludic) a(n) = A192607(a(A192512(n)-1)); otherwise (n is nonludic), a(n) = A003309(1+(a(A236863(n)))).

A255422 Permutation of natural numbers: a(1) = 1 and for n > 1, if n is k-th ludic number larger than 1 [i.e., n = A003309(k+1)], a(n) = nthprime(a(k)), otherwise, when n is k-th nonludic number [i.e., n = A192607(k)], a(n) = nthcomposite(a(k)), where nthcomposite = A002808, nthprime = A000040.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Feb 23 2015

Keywords

Comments

The graph has a comet appearance. - Daniel Forgues, Dec 15 2015

Examples

			When n = 19 = A192607(11) [the eleventh nonludic number], we look for the value of a(11), which is 11 [all terms less than 19 are fixed because the beginnings of A003309 and A008578 coincide up to A003309(8) = A008578(8) = 17], and then take the eleventh composite number, which is A002808(11) = 20, thus a(19) = 20.
When n = 25 = A003309(10) = A003309(1+9) [the tenth ludic number, and ninth after one], we look for the value of a(9), which is 9 [all terms less than 19 are fixed, see above], and then take the ninth prime number, which is A000040(9) = 23, thus a(25) = 23.
		

Crossrefs

Inverse: A255421.
Related or similar permutations: A237427, A246378, A245703, A245704 (compare the scatterplots), A255407, A255408.

Formula

a(1)=1; and for n > 1, if A192490(n) = 1 [i.e., n is ludic], a(n) = A000040(a(A192512(n)-1)), otherwise a(n) = A002808(a(A236863(n))) [where A192512 and A236863 give the number of ludic and nonludic numbers <= n, respectively].
As a composition of other permutations: a(n) = A246378(A237427(n)).

A236863 Number of nonludic numbers (A192607) not greater than n.

Original entry on oeis.org

0, 0, 0, 0, 1, 1, 2, 2, 3, 4, 5, 5, 6, 6, 7, 8, 9, 9, 10, 11, 12, 13, 14, 14, 15, 15, 16, 17, 18, 18, 19, 20, 21, 22, 23, 24, 25, 25, 26, 27, 28, 28, 29, 29, 30, 31, 32, 32, 33, 34, 35, 36, 37, 37, 38, 39, 40, 41, 42, 43, 44, 44, 45, 46, 47, 48, 49, 49, 50, 51, 52
Offset: 0

Views

Author

Antti Karttunen, Feb 07 2014

Keywords

Crossrefs

Programs

Formula

a(0)=0, a(n) = n - A192512(n).

A266410 a(n) = (A266419(n) - 1) / 2; numbers n such that 2n+1 is a nonludic number (in A192607).

Original entry on oeis.org

4, 7, 9, 10, 13, 15, 16, 17, 19, 22, 24, 25, 27, 28, 29, 31, 32, 34, 36, 37, 39, 40, 42, 43, 46, 47, 49, 50, 51, 52, 54, 55, 56, 58, 61, 62, 64, 66, 67, 68, 69, 70, 72, 73, 75, 76, 77, 79, 81, 82, 83, 84, 85, 88, 91, 92, 93, 94, 95, 97, 98, 99, 100, 101, 102, 103, 106, 107, 108, 109, 112, 114, 115, 118, 120, 121
Offset: 1

Views

Author

Antti Karttunen, Jan 28 2016

Keywords

Comments

Odd nonludic numbers (A266419) decremented by one, then halved.

Crossrefs

Complement: A266409.
Cf. permutations A266418, A266638.
Cf. also A047845.

Formula

a(n) = (A266419(n) - 1) / 2.

A266638 a(1) = 1, a(ludic(n)) = (ludic(3+a(n-1))-1)/2, a(nonludic(n)) = A266410(a(n)), where ludic(n) = n-th ludic number A003309, nonludic(n) = n-th nonludic number A192607 and A266410 = numbers n such that 2n+1 is nonludic.

Original entry on oeis.org

1, 2, 3, 4, 5, 7, 6, 9, 10, 13, 8, 16, 12, 15, 19, 22, 11, 27, 17, 31, 25, 29, 18, 36, 20, 40, 24, 49, 26, 32, 54, 46, 51, 34, 62, 37, 14, 68, 43, 81, 35, 47, 23, 55, 88, 76, 33, 83, 58, 99, 64, 28, 44, 107, 72, 127, 61, 77, 42, 91, 53, 136, 121, 56, 130, 94, 21, 151, 101, 50, 65, 73, 161, 114, 189, 98, 38
Offset: 1

Views

Author

Antti Karttunen, Jan 28 2016

Keywords

Crossrefs

Inverse: A266637.
Related or similar permutations: A237427, A266418.

Formula

a(1) = 1; for n > 1, if A192490(n) = 1 [when n is one of Ludic numbers, A003309] a(n) = A266409(1+a(A192512(n)-1)), otherwise a(n) = A266410(a(A236863(n))).
As a composition of related permutations:
a(n) = A266418(A237427(n)).

A257733 Permutation of natural numbers: a(1) = 1, a(ludic(n)) = lucky(1+a(n-1)), a(nonludic(n)) = unlucky(a(n)), where ludic(n) = n-th ludic number A003309, nonludic(n) = n-th nonludic number A192607 and lucky = A000959, unlucky = A050505.

Original entry on oeis.org

1, 3, 9, 2, 33, 5, 7, 14, 4, 45, 163, 8, 15, 11, 20, 6, 25, 59, 203, 12, 22, 17, 63, 28, 13, 10, 35, 78, 235, 251, 18, 30, 24, 83, 39, 19, 1093, 16, 47, 101, 31, 290, 67, 309, 26, 41, 43, 34, 107, 53, 27, 1283, 87, 23, 61, 128, 42, 354, 88, 376, 21, 36, 55, 57, 46, 137, 115, 70, 38, 1499, 321, 112, 32, 81, 161, 56, 1401, 430, 113, 454, 29, 48, 49
Offset: 1

Views

Author

Antti Karttunen, May 06 2015

Keywords

Crossrefs

Inverse: A257734.
Related or similar permutations: A237427, A255422, A257726, A257731.
Cf. also A256486, A256487.
Differs from A257731 for the first time at n=19, where a(19) = 203, while A257731(19) = 63.

Formula

a(1) = 1; for n > 1: if A192490(n) = 1 [i.e., if n is ludic], then a(n) = A000959(1+a(A192512(n)-1)), otherwise a(n) = A050505(a(A236863(n))).
As a composition of other permutations:
a(n) = A257731(A255422(n)).
a(n) = A257726(A237427(n)).

A257734 Permutation of natural numbers: a(1) = 1, a(lucky(n)) = ludic(1+a(n-1)), a(unlucky(n)) = nonludic(a(n)), where lucky(n) = n-th lucky number A000959, unlucky(n) = n-th unlucky number A050505, and ludic = A003309, nonludic = A192607.

Original entry on oeis.org

1, 4, 2, 9, 6, 16, 7, 12, 3, 26, 14, 20, 25, 8, 13, 38, 22, 31, 36, 15, 61, 21, 54, 33, 17, 45, 51, 24, 81, 32, 41, 73, 5, 48, 27, 62, 119, 69, 35, 105, 46, 57, 47, 96, 10, 65, 39, 82, 83, 151, 115, 92, 50, 135, 63, 76, 64, 124, 18, 86, 55, 106, 23, 108, 189, 146, 43, 118, 193, 68, 169, 84, 91, 100, 149, 85, 156, 28, 179, 111, 74, 136, 34
Offset: 1

Views

Author

Antti Karttunen, May 06 2015

Keywords

Crossrefs

Inverse: A257733.
Related or similar permutations: A237126, A255421, A257725, A257732.
Cf. also A256486, A256487.

Formula

a(1) = 1; for n > 1: if A145649(n) = 1 [i.e., if n is lucky], then a(n) = A003309(1+a(A109497(n)-1)), otherwise a(n) = A192607(a(n-A109497(n))).
As a composition of other permutations:
a(n) = A255421(A257732(n)).
a(n) = A237126(A257725(n)).
Showing 1-10 of 23 results. Next