A129979 a(n) = 2-mu(n), where mu=A008683 is the Moebius function.
1, 3, 3, 2, 3, 1, 3, 2, 2, 1, 3, 2, 3, 1, 1, 2, 3, 2, 3, 2, 1, 1, 3, 2, 2, 1, 2, 2, 3, 3, 3, 2, 1, 1, 1, 2, 3, 1, 1, 2, 3, 3, 3, 2, 2, 1, 3, 2, 2, 2, 1, 2, 3, 2, 1, 2, 1, 1, 3, 2, 3, 1, 2, 2, 1, 3, 3, 2, 1, 3, 3, 2, 3, 1, 2, 2, 1, 3, 3, 2, 2, 1, 3, 2, 1, 1, 1, 2, 3, 2
Offset: 1
Examples
A131088 = (1; 3,1; 3,0,1; 2,3,0,1; ...).
Programs
-
Maple
with(numtheory); seq(2-mobius(k),k=1..70); # Wesley Ivan Hurt, Aug 22 2013
-
Mathematica
2 - MoebiusMu[Range[100]] (* Alonso del Arte, Aug 22 2013 *)
-
PARI
T(n,k) = 2*!(n%k) - if (!(n % k), moebius(n/k), 0); \\ A131088 a(n) = T(n, 1); \\ Michel Marcus, Feb 26 2022
Formula
Inverse Moebius transform of A007427 with changed signs except for A007427(1) = 1; i.e., inverse Moebius transform of (1, 2, 2, -1, 2, -4, 2, 0, -1, -4, ...).
a(n) = 2 - mu(n) = 2 - A008683(n). - Wesley Ivan Hurt, Aug 22 2013
Extensions
More terms from Michel Marcus, Feb 26 2022
Comments