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

A143693 A143691(A143691(n)).

Original entry on oeis.org

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

Views

Author

Reinhard Zumkeller, Aug 29 2008

Keywords

Comments

Permutation of the natural numbers with inverse A143694.

A109465 a(1)=1; for n>1, a(n) = smallest positive integer not among the earlier terms of the sequence that is divisible by a different number of distinct primes than a(n-1).

Original entry on oeis.org

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

Views

Author

Leroy Quet, Aug 28 2005

Keywords

Comments

Sequence is a permutation of the positive integers.

Examples

			Of the positive integers (4,5,7,8,9,10,11,...) not among the first 4 terms of the sequence, 10 is the smallest which is divisible by a different number of distinct primes than a(4) = 3. So a(5) = 10.
		

Crossrefs

Cf. A001221.
Cf. A241012 (inverse), A143691.

Programs

  • Haskell
    import Data.List (delete)
    a109465 n = a109465_list !! (n-1)
    a109465_list = f 1 [1..] where
       f o xs = g xs where
         g (z:zs) = if o' == o then g zs else z : f o' (delete z xs)
                    where o' = a001221 z
    -- Reinhard Zumkeller, Aug 07 2014
  • Mathematica
    a = {1}; Do[k = 2; While[Nand[FreeQ[a, k], PrimeNu[k] != PrimeNu[a[[i - 1]]]], k++]; AppendTo[a, k], {i, 2, 72}]; a (* Michael De Vlieger, Sep 28 2017 *)

Extensions

Extended by Ray Chandler, Aug 28 2005

A245604 Permutation of natural numbers: a(1)=1, a(2n) = A026424(a(n)), a(2n+1) = A028260(1+a(n)).

Original entry on oeis.org

1, 2, 4, 3, 6, 7, 10, 5, 9, 11, 15, 12, 16, 18, 24, 8, 14, 17, 22, 19, 25, 28, 35, 20, 26, 29, 36, 31, 39, 44, 55, 13, 21, 27, 34, 30, 38, 42, 51, 32, 40, 45, 56, 50, 60, 67, 81, 37, 46, 47, 57, 52, 62, 68, 82, 59, 65, 72, 86, 79, 93, 105, 121, 23, 33, 41, 49, 48, 58, 66, 77, 53, 64, 71, 85, 76, 90, 99, 111, 61
Offset: 1

Views

Author

Antti Karttunen, Jul 27 2014

Keywords

Crossrefs

Inverse: A245603.
Similar permutations: A143691, A244152, A244322, A245614, A245606, A245608.

Formula

a(1)=1, a(2n) = A026424(a(n)), a(2n+1) = A028260(1+a(n)).
As a composition of related permutations:
a(n) = A245614(A244322(n)).
For all n >= 1, A066829(a(n)) = 1 - A000035(n). [Permutation A143691 has the same property].
Equally, A066829(a(n)*a(n+1)) = 1 for all n.

A143692 Permutation of natural numbers: If n is k-th number with an odd number of prime divisors (counted with multiplicity) [i.e., n = A026424(k)], a(n) = 2*k, otherwise, when n is k-th number with an even number of prime divisors [i.e., n = A028260(k)], a(n) = (2*k)-1.

Original entry on oeis.org

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

Views

Author

Reinhard Zumkeller, Aug 29 2008

Keywords

Comments

a(a(n)) = A143694(n).

Crossrefs

Programs

  • Haskell
    import Data.List (elemIndex); import Data.Maybe (fromJust)
    a243692 = (+ 1) . fromJust . (`elemIndex` a143691_list)
    -- Reinhard Zumkeller, Aug 07 2014
  • Maple
    N:= 1000: # to get a(1) to a(N)
    Odds,Evens:= selectremove(t -> numtheory:-bigomega(t)::odd,[$1..N]):
    for k from 1 to nops(Odds) do A[Odds[k]]:= 2*k od:
    for k from 1 to nops(Evens) do A[Evens[k]]:= 2*k-1 od:
    seq(A[k],k=1..N); # Robert Israel, Jul 27 2014
  • Mathematica
    m = 100;
    odds = Select[Range[m], OddQ[PrimeOmega[#]]&];
    evens = Select[Range[m], EvenQ[PrimeOmega[#]]&];
    Do[a[odds[[k]]] = 2k, {k, 1, Length[odds]}];
    Do[a[evens[[k]]] = 2k-1, {k, 1, Length[evens]}];
    Array[a, m] (* Jean-François Alcover, Mar 09 2019, from Maple *)

Formula

From Antti Karttunen, Jul 27 2014: (Start)
If A066829(n) = 1, then a(n) = 2 * A055038(n), otherwise a(n) = (2 * A055037(n)) - 1.
For all n >= 1, A000035(a(n)) = 1 - A066829(n). [Permutation A245603 has the same property].
(End)

Extensions

Name changed by Antti Karttunen, Jul 27 2014

A143694 A143692(A143692(n)).

Original entry on oeis.org

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

Views

Author

Reinhard Zumkeller, Aug 29 2008

Keywords

Comments

Permutation of the natural numbers with inverse A143693.

Crossrefs

Showing 1-5 of 5 results.