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

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

Original entry on oeis.org

1, 3, 7, 2, 15, 5, 31, 6, 14, 11, 63, 4, 13, 29, 23, 30, 127, 10, 9, 62, 27, 59, 47, 12, 28, 61, 22, 126, 255, 21, 19, 8, 125, 55, 119, 26, 95, 25, 57, 58, 123, 45, 253, 46, 60, 511, 43, 254, 20, 18, 39, 124, 17, 54, 251, 118, 111, 239, 53, 94, 191, 51, 24, 56
Offset: 1

Views

Author

Antti Karttunen, Jun 03 2014

Keywords

Comments

This is an instance of an "entanglement permutation", where two pairs of complementary subsets of natural numbers are interwoven with each other. In this case complementary pair A005117/A013929 (numbers which are squarefree/not squarefree) is entangled with complementary pair odd/even numbers (A005408/A005843).
Thus this shares with permutation A243352 the property that each term of A005117 is mapped bijectively to a unique odd number and likewise each term of A013929 is mapped (bijectively) to a unique even number. 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.
Are there any other fixed points than 1, 13, 54, 120, 1389, 3183, ... ?

Crossrefs

Formula

a(1) = 1; thereafter, if A008966(n) = 0 (i.e., n is a term of A013929, not squarefree), a(n) = 2*a(A057627(n)); otherwise a(n) = 2*a(A013928(n+1)-1)+1 (where A057627 and A013928(n+1) give the number of integers <= n divisible/not divisible by a square greater than one).
For all n, A000035(a(n)) = A008966(n) = A008683(n)^2, or equally, a(n) = mu(n) modulo 2. The same property holds for A243352.

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)).

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

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

A245613 Permutation of natural numbers: a(1) = 1; thereafter, if n is k-th number with an odd number of prime divisors (counted with multiplicity) [i.e., n = A026424(k)], a(n) = A244991(a(k)), otherwise, when n is k-th number > 1 with an even number of prime divisors [i.e., n = A028260(1+k)], a(n) = A244990(1+a(k)).

Original entry on oeis.org

1, 2, 4, 3, 8, 6, 5, 16, 9, 7, 11, 10, 32, 18, 13, 12, 17, 15, 22, 20, 35, 19, 66, 14, 24, 21, 34, 25, 23, 33, 31, 45, 63, 37, 27, 26, 41, 36, 29, 43, 69, 40, 134, 30, 47, 39, 44, 68, 71, 50, 38, 46, 67, 131, 28, 49, 42, 70, 64, 52, 92, 48, 127, 65, 61, 75, 55, 51, 89, 83, 73, 60
Offset: 1

Views

Author

Antti Karttunen, Jul 27 2014

Keywords

Comments

This shares with the permutation A122111 the property that each term of A028260 is mapped to a unique term of A244990 and each term of A026424 is mapped to a unique term of A244991.

Crossrefs

Formula

a(1) = 1, and for n > 1, if A066829(n) = 1, a(n) = A244991(a(A055038(n))), otherwise a(n) = A244990(1+a(A055037(n)-1)).
As a composition of related permutations:
a(n) = A244322(A245603(n)).
For all n >= 1, A066829(n) = A244992(a(n)).

A285111 Permutation of nonnegative integers: a(1) = 0, a(2) = 1, a(A005117(1+n)) = 2*a(n), a(A065642(n)) = 1 + 2*a(n).

Original entry on oeis.org

0, 1, 2, 3, 4, 6, 8, 7, 5, 12, 16, 13, 14, 10, 24, 15, 32, 27, 26, 25, 28, 20, 48, 55, 9, 30, 11, 21, 64, 54, 52, 31, 50, 56, 40, 111, 96, 110, 18, 51, 60, 22, 42, 41, 49, 128, 108, 223, 17, 103, 104, 61, 62, 447, 100, 43, 112, 80, 222, 109, 192, 220, 57, 63, 36, 102, 120, 113, 44, 84, 82, 895, 98, 256, 99, 221, 216, 446, 34, 207, 23
Offset: 1

Views

Author

Antti Karttunen, Apr 17 2017

Keywords

Comments

Note the indexing: the domain starts from 1, while the range includes also zero.

Crossrefs

Inverse: A285112.
Similar or related permutations: A243343, A243345, A277695, A284571.

Programs

  • Python
    from operator import mul
    from sympy import primefactors
    from sympy.ntheory.factor_ import core
    from functools import reduce
    def a007947(n): return 1 if n<2 else reduce(mul, primefactors(n))
    def a285328(n):
        if core(n) == n: return 1
        k=n - 1
        while k>0:
            if a007947(k) == a007947(n): return k
            else: k-=1
    def a013928(n): return sum([1 for i in range(1, n) if core(i) == i])
    def a(n):
        if n<3: return n - 1
        if core(n)==n: return 2*a(a013928(n))
        else: return 1 + 2*a(a285328(n))
    print([a(n) for n in range(1, 121)]) # Indranil Ghosh, Apr 17 2017

Formula

a(1) = 0, a(2) = 1, and for n > 2, if A008683(n) <> 0 [when n is squarefree], a(n) = 2*a(A013928(n)), otherwise a(n) = 1 + 2*a(A285328(n)).

A284571 Permutation of natural numbers: a(1) = 1, a(A005117(1+n)) = 2*a(n), a(A065642(1+n)) = 1 + 2*a(n).

Original entry on oeis.org

1, 2, 4, 3, 8, 6, 16, 9, 5, 12, 32, 17, 18, 10, 24, 33, 64, 65, 34, 11, 36, 20, 48, 129, 7, 66, 19, 37, 128, 130, 68, 49, 22, 72, 40, 97, 96, 258, 14, 69, 132, 38, 74, 73, 21, 256, 260, 81, 13, 29, 136, 15, 98, 521, 44, 39, 144, 80, 194, 257, 192, 516, 23, 137, 28, 138, 264, 45, 76, 148, 146, 197, 42, 512, 147, 193, 520, 162, 26, 27
Offset: 1

Views

Author

Antti Karttunen, Apr 17 2017

Keywords

Crossrefs

Inverse: A284572.
Similar or related permutations: A243343, A243345, A277695, A285111.

Programs

  • Python
    from operator import mul
    from sympy import primefactors
    from sympy.ntheory.factor_ import core
    def a007947(n): return 1 if n<2 else reduce(mul, primefactors(n))
    def a285328(n):
        if core(n) == n: return 1
        k=n - 1
        while k>0:
            if a007947(k) == a007947(n): return k
            else: k-=1
    def a013928(n): return sum(1 for i in range(1, n) if core(i) == i)
    def a(n):
        if n==1: return 1
        if core(n)==n: return 2*a(a013928(n))
        else: return 1 + 2*a(a285328(n) - 1)
    [a(n) for n in range(1, 121)] # Indranil Ghosh, Apr 17 2017

Formula

a(1) = 1, for n > 1, if A008683(n) <> 0 [when n is squarefree], a(n) = 2*a(A013928(n)), otherwise a(n) = 1 + 2*a(A285328(n)-1).

A284584 a(1) = 0; for n > 1, if n is not squarefree, then a(n) = A057627(n), otherwise a(n) = A013928(n).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Apr 17 2017

Keywords

Comments

Each number n > 0 occurs exactly twice in this sequence, at the positions A005117(1+n) and A013929(n).

Crossrefs

Cf. A066136 (a similar sequence).

Programs

  • Python
    from sympy import mobius
    from sympy.ntheory.factor_ import core
    def a057627(n): return n - sum([mobius(k)**2 for k in range(1, n + 1)])
    def a013928(n): return sum([1 for i in range(1, n) if core(i) == i])
    def a(n):
        if n==1: return 0
        if core(n)==n: return a013928(n)
        else: return a057627(n)
    print([a(n) for n in range(1, 121)]) # Indranil Ghosh, Apr 17 2017
  • Scheme
    (define (A284584 n) (cond ((= 1 n) 0) ((zero? (A008683 n)) (A057627 n)) (else (A013928 n))))
    

Formula

a(1) = 0; for n > 1, if A008683(n) is 0 [when n is not squarefree], then a(n) = A057627(n), otherwise a(n) = A013928(n).
Showing 1-9 of 9 results.