login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

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.
5
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,2
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.
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.
PROG
(Scheme) (define (A243352 n) (if (zero? (A008966 n)) (* 2 (A057627 n)) (+ (* 2 (A013928 n)) 1)))
CROSSREFS
Inverse: A088610. Cf. A243343, A072062.
Sequence in context: A079313 A125132 A352849 * A026184 A026208 A120837
KEYWORD
nonn,easy
AUTHOR
Antti Karttunen, Jun 04 2014
STATUS
approved