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.

User: Gevorg Hmayakyan

Gevorg Hmayakyan's wiki page.

Gevorg Hmayakyan has authored 22 sequences. Here are the ten most recent ones:

A366900 a(n) is the number of real roots of the derivative of the cyclotomic polynomial Phi(n, 1/x).

Original entry on oeis.org

0, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 2, 1, 1, 3, 0, 1, 1, 1, 2, 3, 1, 1, 2, 1, 1, 1, 2, 1, 3, 1, 0, 3, 1, 3, 2, 1, 1, 3, 2, 1, 3, 1, 2, 3, 1, 1, 2, 1, 1, 3, 2, 1, 1, 3, 2, 3, 1, 1, 4, 1, 1, 3, 0, 3, 3, 1, 2, 3, 3, 1, 2, 1, 1, 3, 2, 3, 3, 1, 2, 1, 1, 1, 4, 3, 1, 3
Offset: 1

Author

Gevorg Hmayakyan, Oct 26 2023

Keywords

Programs

  • Mathematica
    c[n_, y_] := Limit[D[Cyclotomic[n, 1/x], x], x -> y]; Table[Length[Solve[c[n, x] == 0, x, Reals]], {n, 1, 128}]
  • PARI
    a(n)=my(v=valuation(n,2)); 2*omega(n>>v) - (v <= 1 && n > 2) \\ Andrew Howroyd, Oct 27 2023

Formula

For n = 2^m, a(n) = 0;
For odd n = p^m, a(n) = 1;
For odd n = p1^r1*p2^r2*...*pm^rm, a(n) = 2m-1;
For n = 2*p1^r1*p2^r2*...*pm^rm, a(n) = 2m-1 if p1, ..., pm are odd;
For n = 2^r*p1^r1*p2^r2*...*pm^rm, a(n) = 2m if p1, ..., pm are odd and r > 1.

A339210 a(n) = Sum_{k=0..(n+1)/2} A010815(n*k).

Original entry on oeis.org

0, 0, 1, 1, 1, 0, 2, 1, 1, 0, 2, 0, 2, 0, 0, 1, 2, 0, 2, 1, 1, 1, 2, 1, 2, 1, 1, 2, 2, 1, 2, 1, 1, 0, 0, 1, 2, 0, 0, 0, 2, 0, 2, 0, 2, 1, 2, 0, 2, 1, 2, 0, 2, 0, 2, 1, 2, 0, 2, 0, 2, 0, 0, 1, 1, -1, 2, 1, 0, 2, 2, 0, 2, 1, 1, 1, 1, 0, 2, 2, 1, 0, 2, 0, 1, 0
Offset: 1

Author

Gevorg Hmayakyan, Nov 26 2020

Keywords

Comments

Conjecture: a(p) = 2 for prime p > 5. Tested for p up to 100000.
From Sebastian Karlsson, Dec 12 2020: (Start)
Proof: The terms of the sum are A010815(n*k) = (-1)^m if n*k = m*(3*m+-1)/2, 0 otherwise. If n*k = m*(3*m+-1)/2 and n is a prime p, then p (>2) divides either m or 3*m+-1. If p divides m, then either m = 0 or p <= m and p < p+1 < 3*m+-1. For m = 0 we get the term (-1)^0 = 1. If m is not 0, then p*k <= p*(p+1)/2 < m*(3*m+-1)/2, so p*k cannot be expressed as m*(3*m+-1)/2.
On the contrary, if p divides 3*m+-1, let 3*m+-1 = q*p were q is an integer. We get: m*(3*m+-1)/2 = q*p*(q*p+-1)/6. If p > 5 and q >= 2 then q*p*(q*p+-1)/6 >= 2*p*(2*p+-1)/6 > p*(p+1)/2 >= p*k. Thus, p*k cannot be expressed as m*(3*m+-1)/2. If q = 1, i.e., if p = 3*m+-1, then m*(3*m+-1)/2 = p*(p+-1)/6. Thus, for k = (p+-1)/6 (which always is an integer if p >= 5) we get the only term (except for when k = 0) for which A010815(p*k) is not 0. When k = (p+-1)/6, m = (p+-1)/3 and hence A010815(p*k) = 1 (since (p+-1)/3 is even if p > 2). This shows that a(p) = 1+0+...+0+1+0+...+0 = 2. (End)

Crossrefs

Cf. A010815.

Programs

  • Mathematica
    d[ n_] := With[ {m = Sqrt[24 n + 1]}, If[ IntegerQ[m], KroneckerSymbol[ 12, m], 0]];
    a[ n_] := Sum[d[n*k], {k, 0, (n + 1)/2}]
  • PARI
    f(n) = if( issquare( 24*n + 1, &n), kronecker( 12, n)); \\ A010815
    a(n) = sum(k=0, (n+1)/2, f(n*k)); \\ Michel Marcus, Nov 27 2020

A337760 Irregular triangle where T(n,k) are the coefficients of expansion 2^(n-1) Product_{k=1..n} sin(k*t) = Sum_{k=1..n*(n+1)/2} T(n,k)*cos(k*t) for even n and 2^(n-1) Product_{k=1..n} sin(k*t) = Sum_{k=1..n*(n+1)/2} T(n,k)*sin(k*t) for odd n.

Original entry on oeis.org

0, 1, 0, 1, 0, -1, 0, 0, 1, 0, 1, 0, -1, 1, 0, 0, 0, 0, 0, -1, 0, -1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, -1, 0, -1, 0, 1, 0, 1, 0, 1, 0, 0, 0, -2, 0, 0, 0, -1, 0, 0, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0, 0, 0, 2, 0, 1, 0, 1, 0, 0, 0, -1, 0, -1, 0, 0, 0, -1, 0, 0
Offset: 1

Author

Gevorg Hmayakyan, Sep 18 2020

Keywords

Comments

This coefficients appear in Euler totient function exact formula.

Examples

			sin(t) = sin(t),
2*sin(t)*sin(2*t) = cos(t)-cos(3*t),
4*sin(t)*sin(2*t)*sin(3*t) = sin(2*t)+sin(4*t)-sin(6*t),
8*sin(t)*sin(2*t)*sin(3*t)*sin(4*t) = 1-cos(6*t)-cos(8*t)+cos(10*t),
...
and corresponding table is:
0, 1
0, 1, 0, -1
0, 0, 1,  0, 1, 0, -1
1, 0, 0,  0, 0, 0, -1,  0, -1, 0, 1
0, 1, 0,  1, 0, 1,  0,  0,  0, 0, 0, -1, 0, -1, 0, 1
0, 1, 0,  1, 0, 0,  0, -2,  0, 0, 0, -1, 0,  0, 0, 0, 0, 1, 0, 1, 0, -1
...
		

Programs

  • Maple
    an := proc (n, r) option remember;
    if n < 0 or r < 0 then
    0
    elif n = 1 then
    if r = 1 then
    1
    else
    0
    end if;
    elif r=0 and n mod 2 = 0 then
    procname(n-1, n-r)
    else
    procname(n-1, n-r)+(-1)^n*(procname(n-1, n+r)-procname(n-1, r-n))
    end if
    end proc
  • Mathematica
    Table[Expand[2^(n-1)*TrigReduce[Product[Sin[k*t],{k,1,n}]]],{n,1,10}]

Formula

T(1, 1) = 1,
T(n, r) = 0 if r < 0 or r > n*(n+1)/2,
T(n, 0) = T(n - 1, n) if n is even,
T(n, 0) = 0 if n is odd,
T(n, r) = T(n - 1, n - r) + (-1)^n*(T(n - 1, n + r) - T(n - 1, r - n)).

A275966 a(n) is the real part of -I*Sum_{d|n}(mobius(d)*I^(n/d)), I=sqrt(-1), mobius(n) is A008683.

Original entry on oeis.org

1, -1, -2, 0, 0, 2, -2, 0, 2, 0, -2, 0, 0, 2, 0, 0, 0, -2, -2, 0, 4, 2, -2, 0, 0, 0, -2, 0, 0, 0, -2, 0, 4, 0, 0, 0, 0, 2, 0, 0, 0, -4, -2, 0, 0, 2, -2, 0, 2, 0, 0, 0, 0, 2, 0, 0, 4, 0, -2, 0, 0, 2, -4, 0, 0, -4, -2, 0, 4, 0, -2, 0, 0, 0, 0, 0, 4, 0, -2, 0, 2
Offset: 1

Author

Gevorg Hmayakyan, Mar 19 2017

Keywords

Comments

It seems the nonzero coefficients are powers of 2.
This function is multiplicative with a(p^n) = Re(I^(p^n+1) - I^(p^(n-1)+1)).

Examples

			a(4) = -Re(I*(mobius(1)*I^4 + mobius(2)*I^2 + mobius(4)*I)) = Re((I^4-I^2)*I) = Re(2*I) = 0.
		

Crossrefs

Programs

  • Maple
    a(n):=-Re(I*add(numtheory:-mobius(d)*I^(n/d), d = numtheory:-divisors(n))).
  • Mathematica
    Table[-Re[I *  Sum[MoebiusMu[d] * (I^(n/d)), {d, Divisors[n]}]], {n, 81}] (* Indranil Ghosh, Mar 19 2017 *)
  • PARI
    a(n)=my(f=factor(n)); prod(i=1,#f~, if(f[i,1]==2, if(f[i,2]==1,-1,0), if(f[i,1]%4==3, 2*(-1)^f[i,2], 0))) \\ Charles R Greathouse IV, Mar 22 2017

Formula

a(p^n) = (-1)^n*2, for prime p=3 mod 4.
a(p^n) = 0, for prime p=1 mod 4.
a(2) = -1, a(2^n) = 0 for n > 1.
a(n) = -Re(I*Sum_{d|n}(mobius(d)*I^(n/d))).
Dirichlet g.f.: Sum_{n >= 1} a(n)/n^s = beta(s)/zeta(s), where beta(s) and zeta(s) are Dirichlet Beta and Riemann zeta functions accordingly.
Sum_{n >= 1} a(n)/n^s = (1-2^(-s))*Product_{p=3 mod 4}(p^s-1)/(p^s+1), where p runs over prime numbers.
Sum_{n>=1} mobius(n)/(z^n-I) = Sum_{n >= 1} b(n)/z^n. a(n)=Re(b(n)).
Sum_{n>=1} a(n)/(z^n-1) = z/(z^2+1)
Sum_{d|n} a(d) = A101455(n). - Gevorg Hmayakyan, Dec 27 2017

A284059 The absolute values of A275966.

Original entry on oeis.org

1, 1, 2, 0, 0, 2, 2, 0, 2, 0, 2, 0, 0, 2, 0, 0, 0, 2, 2, 0, 4, 2, 2, 0, 0, 0, 2, 0, 0, 0, 2, 0, 4, 0, 0, 0, 0, 2, 0, 0, 0, 4, 2, 0, 0, 2, 2, 0, 2, 0, 0, 0, 0, 2, 0, 0, 4, 0, 2, 0, 0, 2, 4, 0, 0, 4, 2, 0, 4, 0, 2, 0, 0, 0, 0, 0, 4, 0, 2, 0, 2, 0, 2, 0, 0, 2, 0
Offset: 1

Author

Gevorg Hmayakyan, Mar 19 2017

Keywords

Comments

This is multiplicative function with a(p^n) = |Re(I^(p^n+1) - I^(p^(n-1)+1))|.

Examples

			a(9) = |Re(I*(mobius(1)*I^9 + mobius(3)*I^3 + mobius(9)*I))| = |Re((I^10 - I^4))| = |-2| = 2.
		

Crossrefs

Programs

  • Maple
    a(n):=abs(Re(I*add(numtheory:-mobius(d)*I^(n/d), d = numtheory:-divisors(n)))).
  • Mathematica
    Table[Abs@ Re[I* Sum[MoebiusMu[d] * I^(n/d), {d, Divisors[n]}]], {n, 87}] (* Indranil Ghosh, Mar 19 2017 *)
    f[p_, e_] := If[Mod[p, 4] == 1, 0, 2]; f[2, e_] := If[e == 1, 1, 0]; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Jan 27 2024 *)
  • PARI
    a(n)=my(f=factor(n)); prod(i=1,#f~, if(f[i,1]==2, if(f[i,2]==1,1,0), if(f[i,1]%4==3, 2, 0))) \\ Charles R Greathouse IV, Mar 22 2017

Formula

a(n) = |Re(I*Sum_{d|n}(mobius(d)*I^(n/d)))|.
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = 3/Pi = 0.954929... (A089491). - Amiram Eldar, Jan 27 2024

A282938 Recursive 2-parameter sequence allowing calculation of the Möbius function (not the same as A266378).

Original entry on oeis.org

1, -1, 1, -1, -1, 2, -1, 0, 1, -2, 1, 0, -1, 2, -1, -1, 3, -2, -1, 1, -1, 1, 1, 0, -2, 1, 1, -2, 1, 0, -1, 1, -1, 3, -1, 0, -1, -2, 1, 1, 1, -1, -1, 3, -2, -1, 1, -1, 2, -2, 1, 1, 0, 0, -1, -3, 2, 2, 0, 0, -2, 1, 0, 0, 1, -3, 2, 1, -1, 1, -2, 2, -2, 2, -2, -1
Offset: 1

Author

Gevorg Hmayakyan, Feb 25 2017

Keywords

Comments

The a(n,m) forms a table where each row has (n-1)*(n-2)/2+1 = A000124(n-2) elements.
The index of the first row is n=1 and the index of the first column is m=0.
The right diagonal a(n, A000217(n-2)) = A008683(n), Möbius numbers, for n>=1.

Examples

			The first few rows starting from 1 follow:
  1
  -1
  1, -1
  -1, 2, -1, 0
  1, -2, 1, 0, -1, 2, -1
  -1, 3, -2, -1, 1, -1, 1, 1, 0, -2, 1
  1, -2, 1, 0, -1, 1, -1, 3, -1, 0, -1, -2, 1, 1, 1, -1
  -1, 3, -2, -1, 1, -1, 2, -2, 1, 1, 0, 0, -1, -3, 2, 2, 0, 0, -2, 1, 0, 0
		

Crossrefs

Programs

  • Mathematica
    nu[n_]:=(n-1)*(n-2)/2
    U[n_, m_] := U[n, m] = If[n > 1, U[n - 1, m - n + 1] - U[n - 1, m], 0]
    U[1, m_] := U[1, m] = If[m == 0, 1, 0]
    a[n_, m_] := a[n, m] = If[(m < 0) || (nu[n] < m), 0, a[n - 1, m - n + 1] - a[n - 1, m] - a[n - 1, nu[n - 1]]*U[n - 1, m - 1]]
    a[1, m_] := a[1, m] = If[m == 0, 1, 0]
    Table[Table[a[n, m], {m, 0, nu[n]}], {n, 1, 30}]
    Table[a[n, nu[n]], {n, 1, 50}]

Formula

a(n,m) = a(n-1, m-n+1) - a(n-1, m) - a(n-1, nu(n-1))*U(n-1, m-1),
where U(n,m) are coefficients of A231599, nu(n)=(n-1)*(n-2)/2, a(1,0)=1, a(n,m)=0 if m<0 and m>nu(n).
Möbius(n) = a(n,nu(n)).

A282634 Recursive 2-parameter sequence allowing the Ramanujan's sum calculation.

Original entry on oeis.org

1, 1, -1, 2, -1, -1, 2, 0, -2, 0, 4, -1, -1, -1, -1, 2, 1, -1, -2, -1, 1, 6, -1, -1, -1, -1, -1, -1, 4, 0, 0, 0, -4, 0, 0, 0, 6, 0, 0, -3, 0, 0, -3, 0, 0, 4, 1, -1, 1, -1, -4, -1, 1, -1, 1, 10, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 4, 0, 2, 0, -2, 0, -4, 0
Offset: 1

Author

Gevorg Hmayakyan, Feb 20 2017

Keywords

Comments

a(n,0) = phi(n), where phi(n) is Euler's totient function A000010(n).
a(n,1) = mu(n), where mu(n) is the Möbius function A008683(n).

Examples

			The few first rows follow:            c_n(t)
  t   0   1   2   3   4   5   6     |  t   1   2   3   4   5   6   7
n                                   |n
1     1;                            |1     1;
2     1, -1;                        |2    -1,  1;
3     2, -1, -1;                    |3    -1, -1,  2;
4     2,  0, -2,  0;                |4     0, -2,  0,  2;
5     4, -1, -1, -1, -1;            |5    -1, -1, -1, -1,  4;
6     2,  1, -1, -2, -1,  1;        |6     1, -1, -2, -1,  1,  2;
7     6, -1, -1, -1, -1, -1, -1;    |7    -1, -1, -1, -1, -1, -1,  6;
      ...                           |     ...
[Edited by _Seiichi Manyama_, Mar 05 2018]
		

Crossrefs

Cf. A000010 (phi(n)), A008683 (mu(n)), A054532, A054533, A054534, A054535, A231599.

Programs

  • Mathematica
    b[n_, m_] := b[n, m] = If[n > 1, b[n - 1, m] - b[n - 1, m - n + 1], 0]
    b[1, m_] := b[1, m] = If[m == 0, 1, 0]
    nt[n_, t_] := Round[(n - 1)/2 - t/n]
    a[n_, t_] := Sum[b[n, k*n + t], {k, 0, nt[n, t]}]
    Flatten[Table[Table[a[n, m], {m, 0, n - 1}], {n, 1, 20}]]

Formula

a(n,t) = Sum(b(n, k*n + t), k=0..N(n, t)), where b(n,k) = A231599(n-1,k) and N(n,t) = [(n - 1)/2 - t/n].
a(n,t) = c_n(t) for t >= 1, where c_n(t) is a Ramanujan's sum A054533.
a(n,t) = a(n,-t)
From Seiichi Manyama, Mar 05 2018: (Start)
a(n,t) = c_n(n-t) = Sum_{d | gcd(n,n-t)} d*mu(n/d) for 0 <= t <= n-1.
So a(n,t) = Sum_{d | gcd(n,t)} d*mu(n/d) for 1 <= t <= n-1. (End)

A282283 Recursive 2-parameter sequence allowing calculation of the Euler Totient function.

Original entry on oeis.org

0, 1, -1, 1, 2, -4, 2, -4, 10, -6, -2, 2, 6, -16, 10, 4, -6, 8, -10, 4, -10, 28, -18, -8, 10, -10, 10, -2, 8, -10, 0, 2, 12, -34, 22, 10, -12, 12, -22, 30, -30, 6, 10, -10, 8, 0, 6, -14, 6, -18, 52, -34, -16, 18, -18, 34, -36, 20, 10, -6, -2, 4, -28, 18, 8
Offset: 0

Author

Gevorg Hmayakyan, Feb 11 2017

Keywords

Comments

The a(n,m) forms a table where each row has (n*(n-3)+4)/2 = A152947(n) elements.
The index of the first row is n=1 and the index of the first column is m=0.
The right diagonal a(n, A152947(n)) = A000010(n), Euler Totient function.

Examples

			The first few rows are:
0, 1;
-1, 1;
2, -4, 2;
-4, 10, -6, -2, 2;
6, -16, 10, 4, -6, 8, -10, 4;
-10, 28, -18, -8, 10, -10, 10, -2, 8, -10, 0, 2;
12, -34, 22, 10, -12, 12, -22, 30, -30, 6, 10, -10, 8, 0, 6, -14, 6;
		

Crossrefs

Programs

  • Mathematica
    U[n_, m_] := U[n, m] = If[n > 1, U[n - 1, n*(n - 1)/2 - m]*(-1)^n - U[n - 1, m], 0]
    U[1, m_] := U[1, m] = If[m == 0, 1, 0]
    Q[n_, m_] := U[n, m - 2] - 2*U[n, m - 1] + U[n, m]
    nu[n_]:=(n-1)*n/2+2-n
    a[n_, m_] := a[n, m] = If[(m < 0) || (nu[n] < m), 0, a[n - 1, m - n + 1] - a[n - 1, m] - a[n - 1, nu[n - 1]]*Q[n - 1, m]]
    a[1, m_] := a[1, m] = If[m == 1, 1, 0]
    Table[Table[a[n, m], {m, 0, nu[n]}], {n, 1, 20}]
    Table[a[n, nu[n]], {n, 1, 50}]

Formula

nu(n) = (n*(n-3)+4)/2
Q(n,m) = 2*A231599(n,m-1)-A231599(n,m-2)-A231599(n,m)
a(n, m) = a(n - 1, m - n + 1) - a(n - 1, m) - a(n - 1, nu(n - 1))*Q(n - 1, m) if (m < 0) or (nu(n) < m)
a(1,m)=1 if m=1 and 0 otherwise.
a(n,nu(n))= A000010(n)

A280665 Recursive 1-parameter sequence a(n) allowing calculation of the Möbius function.

Original entry on oeis.org

1, 0, 0, -1, 0, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, -1, 2, -1, 0, 0, 0, 0, 0, 0, 0, 0, -1, 2, -1, 0, 1, -2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, -2, 0, 1, 1, -1, 1, -1, -2, 3, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 1, 1, 1, -2, -1, 0, -1, 3, -1, 1, -1, 0, 1, -2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, -2, 0, 0, 2, 2, -3, -1, 0, 0, 1, 1, -2, 2, -1, 1, -1
Offset: 1

Author

Gevorg Hmayakyan, Jan 06 2017

Keywords

Comments

This sequence is generated from A266378 by excluding the second recursion parameter.

Examples

			Möbius(2) = a(c(1)+2) and because the c(1)=2 => a(c(1)+2)= a(4). l(4)=2, K(4)=1 so l(4)-2<K(4) and l(4)*(l(4)-1)/2>=K(4) and a(4)=u(4)-v(4)-x(4)
p(4)=c(l(4)-2)=c(0)=0
u(4)=a(p(4)+K(4)+1)=a(2)=0
v(4)=a(p(4)+K(4)-l(4)+2)=a(1)=1
x(4)=a(p(4)+l(4)-1)*T(l(4)-1,l(4)*(l(4)-1)/2-K(4))=a(1)*T(1,0)=0, as T(1,0)=0.
a(4)=u(4)-v(4)-x(4)=0-1-0=-1.
		

Crossrefs

Programs

  • Maple
    l := n->floor((1/3)*(81+81*n+3*sqrt(1104+1458*n+729*n^2))^(1/3)-5/(81+81*n+3*sqrt(1104+1458*n+729*n^2))^(1/3)):
    c := n->(1/6)*n*(n^2+3*n+8):
    K := n->n-1-c(l(n)-1):
    A := (n, z)->z*(product(z^i-1, i = 1 .. n-1)):
    T := (n, k)->coeff(eval(A(n, z)), z, k):
    p := n->c(l(n)-2):
    u := n->a(p(n)+K(n)+1):
    v := n->a(p(n)+K(n)-l(n)+2):
    x := n->a(p(n)+l(n)-1)*T(l(n)-1, (1/2)*l(n)*(l(n)-1)-K(n)):
    a := proc (n) option remember; if K(n) <= l(n)-2 or (1/2)*l(n)*(l(n)-1) < K(n) then 0 else u(n)-v(n)-x(n) end if end proc:
    a(2) := 0:
    a(1) := 1:

Formula

l(n) = floor((1/3)*(81+81*n+3*sqrt(729*n^2+1458*n+1104))^(1/3)-5/(81+81*n+3*sqrt(729*n^2+1458*n+1104))^(1/3))
c(n) = n*(n^2+3*n+8)/6 = A003600(n)
K(n) = n - 1 - c(l(n) - 1)
T(n,m) are coefficients of A008302
p(n) = c(l(n)-2)
u(n) = a(p(n)+K(n)+1)
v(n) = a(p(n)+K(n)-l(n)+2)
x(n) = a(p(n)+l(n)-1)*T(l(n)-1,l(n)*(l(n)-1)/2-K(n))
a(1) = 1
a(2) = 0
if (l(n)-2 >= K(n) or (1/2)*l(n)*(l(n)-1) < K(n)) then a(n) = 0 else a(n) = u(n)-v(n)-x(n)
Möbius(n) = a(c(n-1)+n)
A100198(n-2) = a(c(n-1)-n), for n>3.

A279817 a(1) = -1; for n>1, Sum_{d|n} a(n-d+1) = 0.

Original entry on oeis.org

-1, 1, 1, 0, 1, 0, 1, -1, 0, 1, 1, -2, 1, 1, -1, 1, 1, -3, 1, -3, 1, 2, 1, -6, 0, 0, 0, 0, 1, -2, 1, -2, -1, 5, -1, -4, 1, 3, 0, 3, 1, -3, 1, -7, -3, 10, 1, -9, 0, -10, 2, -4, 1, -7, 2, 6, -1, 4, 1, -25, 1, 2, -2, 4, -1, -11, 1, 6, -1, 13, 1, -20, 1, -3, -4, 0
Offset: 1

Author

Gevorg Hmayakyan, Dec 19 2016

Keywords

Examples

			When n is any prime p, we have Sum_{d|p} a(p-d+1) = 0, so a(p-1+1) + a(p-p+1) = 0, hence a(p)=1.
For n=4, we have a(4-1+1) + a(4-2+1) + a(4-4+1) = 0, so a(4) + a(3) + a(1) = 0, hence a(4)=0.
		

Programs

  • Maple
    a := proc (n) option remember; -add(a(n-d+1), d = `minus`(numtheory:-divisors(n), {1})) end proc; a(1) := -1; seq(simplify(a(i)), i = 1 .. 1000)

Formula

For primes p and q:
a(p) = 1.
If p^2 - p + 1 is prime then a(p^2) = 0.
If p*q - p + 1 and p*q - q + 1 are primes then a(p*q) = -1.