|
|
A350033
|
|
a(n) is the smallest positive integer k not occurring earlier such that Möbius(k) == n (mod 3).
|
|
1
|
|
|
1, 2, 4, 6, 3, 8, 10, 5, 9, 14, 7, 12, 15, 11, 16, 21, 13, 18, 22, 17, 20, 26, 19, 24, 33, 23, 25, 34, 29, 27, 35, 30, 28, 38, 31, 32, 39, 37, 36, 46, 41, 40, 51, 42, 44, 55, 43, 45, 57, 47, 48, 58, 53, 49, 62, 59, 50, 65, 61, 52, 69, 66, 54, 74, 67, 56, 77, 70
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
Permutation of the positive integers.
In other words, a(n) is the least positive unused integer such that Möbius(a(n)) is respectively 1, -1, 0, 1, -1, 0, 1, -1, 0, ... for n > 0.
|
|
LINKS
|
|
|
EXAMPLE
|
a(1) = 1 because 1 is the smallest positive integer with Möbius(1) = 1.
For a(2) we search for the smallest positive integer k not already in the sequence with Möbius(k) = -1. So, a(2) = 2.
Next, we search for Möbius(k) = 0 and a(3) = 6. We continue by asking for the smallest k such that Möbius(k) = 1, -1, 0, 1, -1, 0, ... and so on.
|
|
MATHEMATICA
|
a[1]=1; a[n_]:=a[n]=(k=1; While[MemberQ[Array[a, n-1], k]||Mod[n, 3, -1]!=MoebiusMu@k, k++]; k); Array[a, 100]
|
|
PROG
|
(PARI) lista(n)=my(v=vector(n), k=[1, 1, 1]); for(i=1, n, my(m=i%3); while((moebius(k[m+1])-m) % 3, k[m+1]++); v[i]=k[m+1]; k[m+1]++; ); v \\ Winston de Greef, Mar 25 2023
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|