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-4 of 4 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.

A088610 Starting with n = 1, a(n) is the smallest squarefree number not included earlier if n is odd, else n is the smallest nonsquarefree number.

Original entry on oeis.org

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

Views

Author

Amarnath Murthy, Oct 16 2003

Keywords

Comments

From Antti Karttunen, Jun 04 2014: (Start)
Squarefree (A005117) and nonsquarefree numbers (A013929) interleaved, the former at odd n and the latter at even n.
A243344 is a a "recursivized" variant of this permutation. Like this one, it also satisfies the given simple identity linking the parity of n with the Moebius mu-function. (End)

Crossrefs

Inverse: A243352.
Bisections: A005117, A013929.

Programs

  • Mathematica
    With[{max = 100}, s = Select[Range[max], SquareFreeQ]; ns = Complement[Range[max], s]; Riffle[s[[1 ;; Length[ns]]], ns]] (* Amiram Eldar, Mar 04 2024 *)
  • Scheme
    (define (A088610 n) (if (even? n) (A013929 (/ n 2)) (A005117 (/ (+ 1 n) 2))))

Formula

From Antti Karttunen, Jun 04 2014: (Start)
a(2n) = A013929(n), a(2n-1) = A005117(n).
For all n, A008966(a(n)) = A000035(n), or equally, mu(a(n)) = n modulo 2, where mu is Moebius mu (A008683). (End)

Extensions

More terms from Ray Chandler, Oct 18 2003

A088609 a(1) = 1, a(n) is the smallest squarefree number not included earlier if n is not squarefree, else n is the smallest nonsquarefree number.

Original entry on oeis.org

1, 4, 8, 2, 9, 12, 16, 3, 5, 18, 20, 6, 24, 25, 27, 7, 28, 10, 32, 11, 36, 40, 44, 13, 14, 45, 15, 17, 48, 49, 50, 19, 52, 54, 56, 21, 60, 63, 64, 22, 68, 72, 75, 23, 26, 76, 80, 29, 30, 31, 81, 33, 84, 34, 88, 35, 90, 92, 96, 37, 98, 99, 38, 39, 100, 104, 108, 41, 112, 116
Offset: 1

Views

Author

Amarnath Murthy, Oct 16 2003

Keywords

Comments

From Antti Karttunen, Jun 04 2014: (Start)
This is a self-inverse permutation (involution) of natural numbers.
After 1, nonsquarefree numbers occur (in monotonic order) at the positions given by squarefree numbers, A005117, and squarefree numbers occur (in monotonic order) at the positions given by their complement, nonsquarefree numbers, A013929.
(End)

Crossrefs

Formula

From Antti Karttunen, Jun 04 2014: (Start)
a(1), and for n>1, if mu(n) = 0, a(n) = A005117(1+A057627(n)), otherwise, a(n) = A013929(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. [A property shared with A243347].
(End)

Extensions

More terms from Ray Chandler, Oct 18 2003

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