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.

Previous Showing 21-30 of 30 results.

A327666 a(n) = Sum_{k = 1..n} (-1)^(Omega(k) - omega(k)), where Omega(k) counts prime factors of k with multiplicity and omega(k) counts distinct prime factors.

Original entry on oeis.org

1, 2, 3, 2, 3, 4, 5, 6, 5, 6, 7, 6, 7, 8, 9, 8, 9, 8, 9, 8, 9, 10, 11, 12, 11, 12, 13, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 26, 25, 26, 27, 26, 25, 24, 25, 24, 25, 26, 27, 28, 29, 30, 31, 30, 31, 32, 31, 30, 31, 32, 33, 32, 33, 34
Offset: 1

Views

Author

Ilya Gutkovskiy, Sep 21 2019

Keywords

Comments

Partial sums of A162511.

Examples

			Omega(1) = omega(1) = 0. The difference is 0, so (-1)^0 = 1, so a(1) = 1.
Omega(2) = omega(2) = 1. The difference is 0, so (-1)^0 = 1, which is added to a(1) to give a(2) = 2.
Omega(3) = omega(3) = 1. The difference is 0, so (-1)^0 = 1, which is added to a(2) to give a(3) = 3.
Omega(4) = 2 but omega(4) = 1. The difference is 1, so (-1)^1 = -1, which is added to a(3) to give a(4) = 2.
		

Crossrefs

Programs

  • Mathematica
    Table[Sum[(-1)^(PrimeOmega[k] - PrimeNu[k]), {k, n}], {n, 70}]
    f[p_, e_] := (-1)^(e - 1); Accumulate @ Table[Times @@ f @@@ FactorInteger[n], {n, 1, 100}] (* Amiram Eldar, Sep 18 2022 *)
  • PARI
    seq(n)={my(v=vector(n)); v[1]=1; for(k=2, n, v[k] = v[k-1] + (-1)^(bigomega(k)-omega(k))); v} \\ Andrew Howroyd, Sep 23 2019
    
  • Python
    from functools import reduce
    from sympy import factorint
    def A327666(n): return sum(-1 if reduce(lambda a,b:~(a^b), factorint(i).values(),0)&1 else 1 for i in range(1,n+1)) # Chai Wah Wu, Jan 01 2023

Formula

a(1) = 1, a(n) = a(n - 1) + (-1)^(Omega(n) - omega(n)) for n > 1.
a(n) ~ c * n, where c = A307868. - Amiram Eldar, Sep 18 2022

A172357 n such that the Liouville function lambda(n) take successively, from n, the values 1,-1,1,-1,1,-1.

Original entry on oeis.org

58, 185, 194, 274, 287, 342, 344, 382, 493, 566, 667, 856, 858, 926, 1012, 1014, 1157, 1165, 1230, 1232, 1234, 1267, 1318, 1385, 1393, 1418, 1482, 1484, 1679, 1681, 1795, 1841, 1915, 1917, 2060, 2062, 2064, 2232, 2340, 2342, 2567, 2569, 2627, 2805, 3013
Offset: 1

Views

Author

Michel Lagneau, Feb 01 2010

Keywords

Crossrefs

Programs

  • Maple
    with(numtheory): for n from 1 to 4300 do;if (-1)^bigomega(n)=1 and (-1)^bigomega(n+1) = -1 and (-1)^bigomega(n+2) = 1 and (-1)^bigomega(n+3) = -1 and (-1)^bigomega(n+4) = 1 and (-1)^bigomega(n+5) = -1 then print(n); else fi ; od;
  • Mathematica
    Transpose[Transpose[#][[1]]&/@Select[Partition[Table[{n, LiouvilleLambda[ n]},{n,3100}],6,1],Transpose[#][[2]]=={1,-1,1,-1,1,-1}&]][[1]] (* Harvey P. Dale, May 19 2012 *)
  • PARI
    lambda(n)=(-1)^bigomega(n);
    for(n=1,1e4,if(lambda(n)==1&lambda(n+1)==-1&lambda(n+2)==1&&lambda(n+3)==-1&lambda(n+4)==1&&lambda(n+5)==-1,print1(n", "))) /* Charles R Greathouse IV, Jun 13 2011 */

A174050 Primes of the form x^2 + y^2 such that L(x)* L(y) = 1, where L is the Liouville lambda-function A008836.

Original entry on oeis.org

2, 13, 17, 29, 37, 53, 73, 89, 97, 101, 113, 173, 181, 193, 197, 233, 241, 257, 277, 293, 313, 337, 349, 353, 373, 409, 421, 433, 449, 457, 521, 541, 569, 577, 593, 613, 641, 661, 673, 677, 709, 733, 757, 761, 809, 821, 853, 881, 929, 1021, 1033, 1049, 1069
Offset: 1

Views

Author

Michel Lagneau, Mar 06 2010

Keywords

Comments

One contribution to the set of solutions is from (x,y) where x and y are both prime, see A045637.
Another set of solutions is contributed if (x,y) are both in A026424.

Examples

			2 is in the sequence because 2 = 1 + 1 and L(1)*L(1)= (1) *(1) = 1.
13 is in the sequence because 13 = 2^2 + 3^2 and L(2)*L(3)= (-1)*(-1) = 1.
193 is in the sequence because 193 = 12^2 + 7^2 and L(12)*L(7)= (-1)*(-1) = 1.
		

Crossrefs

Programs

  • Maple
    isA174050 := proc(n)
            local x,y ;
            if not isprime(n) then
                    return false;
            end if;
            for x from 1 do
                    if x^2 > n then
                            return false;
                    end if;
                    if issqr(n-x^2) then
                            y := sqrt(n-x^2) ;
                            if A008836(x) * A008836(y) = 1 then
                                    return true;
                            end if;
                    end if;
            end do:
    end proc:
    for n from 1 to 1100 do
            if isA174050(n) then
                    printf("%d,\n",n) ;
            end if;
    end do: # R. J. Mathar, Jul 09 2012
  • Mathematica
    lambdaQ[{x_, y_}] := LiouvilleLambda[x]*LiouvilleLambda[y] == 1; Select[ Prime /@ Range[200], Or @@ lambdaQ /@ PowersRepresentations[#, 2, 2] &] (* Jean-François Alcover, Jul 30 2013 *)

A174351 a(n) = lambda(Fibonacci(n)).

Original entry on oeis.org

1, 1, -1, -1, -1, -1, -1, 1, 1, 1, -1, 1, -1, 1, -1, -1, -1, -1, 1, 1, -1, 1, -1, -1, -1, 1, 1, 1, -1, -1, 1, 1, -1, 1, -1, 1, -1, -1, -1, 1, 1, -1, -1, -1, -1, -1, -1, 1, -1, 1, -1, 1, 1, 1, 1, -1, -1, -1, 1, 1, 1, -1, -1, 1, -1, -1, -1, -1, -1, -1, 1, 1, 1, 1, 1, -1, 1, 1, 1, -1, -1, -1
Offset: 1

Views

Author

Michel Lagneau, Mar 16 2010

Keywords

Examples

			L(Fibonacci(1))= L(Fibonacci(2))= L(1)= 1.
L(Fibonacci(3))= L(2) = -1.
L(Fibonacci(12))= L(144)= 1.
		

Crossrefs

Programs

Formula

a(n) = A008836(A000045(n)).

Extensions

Examples edited by Harvey P. Dale, Dec 02 2022

A174856 Square array read by antidiagonals up. Redheffer type matrix. T(1,1)=1 and T(n,1) = A049240.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1
Offset: 1

Views

Author

Mats Granvik, Mar 31 2010

Keywords

Comments

The first column is equal to 0 when n is a square greater than 1. The rest of the array is equal to A143104. The determinant of this array is A002819.

Examples

			The array begins:
  1,1,1,1,1,1,1,1,1,1
  1,1,0,0,0,0,0,0,0,0
  1,0,1,0,0,0,0,0,0,0
  0,1,0,1,0,0,0,0,0,0
  1,0,0,0,1,0,0,0,0,0
  1,1,1,0,0,1,0,0,0,0
  1,0,0,0,0,0,1,0,0,0
  1,1,0,1,0,0,0,1,0,0
  0,0,1,0,0,0,0,0,1,0
  1,1,0,0,1,0,0,0,0,1
		

Crossrefs

Programs

  • Mathematica
    t[1, 1] = 1; t[n_, 1] := Boole[!IntegerQ[Sqrt[n]]]; t[n_, k_] := Boole[n == 1 || Mod[n, k] == 0]; Table[t[n - k + 1, k], {n, 1, 14}, {k, 1, n}] // Flatten (* Jean-François Alcover, Dec 05 2013 *)

A212818 Numbers up to 10^n with an even number of not necessarily distinct prime factors, or positive Liouville function.

Original entry on oeis.org

1, 5, 49, 493, 4953, 49856, 499735, 4999579, 49998058, 499987392, 4999941987, 49999828888, 499999738687, 4999999516711
Offset: 0

Views

Author

Martin Renner, May 28 2012

Keywords

Examples

			a(1) = 5 since up to 10 there are the five numbers 1, 4, 6, 9, 10 with an even number of prime factors, or positive Liouville function.
		

Crossrefs

Cf. A055037 (goes up to n rather than 10^n), A002819, A008836, A028260, A065043, A090410.

Programs

  • Maple
    zg:=0: zu:=0: G:=[]: U:=[]: k:=0:
    for i from 1 to 10^8 do if numtheory[bigomega](i) mod 2 = 0 then zg:=zg+1: else zu:=zu+1: fi: if i=10^k then G:=[op(G),zg]: U:=[op(U),zu]: k:=k+1: fi: od:
    print(G);
  • Mathematica
    Table[Length[Select[Range[10^n], EvenQ[PrimeOmega[#]] &]], {n, 0, 5}] (* Alonso del Arte, May 28 2012 *)
    Table[Count[LiouvilleLambda[Range[10^n]], 1], {n, 0, 5}] (* Ray Chandler, May 30 2012 *)

Formula

a(n) = A011557(n) - A212819(n).
a(n) = (10^n)/2 + A090410(n)/2. - Donovan Johnson, May 30 2012
a(n) = A055037(10^n). - Ray Chandler, May 30 2012

Extensions

a(9)-a(13) from Donovan Johnson, May 30 2012

A212819 Numbers up to 10^n with an odd number of prime factors, or negative Liouville function.

Original entry on oeis.org

0, 5, 51, 507, 5047, 50144, 500265, 5000421, 50001942, 500012608, 5000058013, 50000171112, 500000261313, 5000000483289
Offset: 0

Views

Author

Martin Renner, May 28 2012

Keywords

Examples

			a(1) = 5 since up to 10 there are the five numbers 2, 3, 5, 7, 8 with an odd number of prime factors or negative Liouville function.
		

Crossrefs

Programs

  • Maple
    zg:=0: zu:=0: G:=[]: U:=[]: k:=0:
    for i from 1 to 10^8 do if numtheory[bigomega](i) mod 2 = 0 then zg:=zg+1: else zu:=zu+1: fi: if i=10^k then G:=[op(G),zg]: U:=[op(U),zu]: k:=k+1: fi: od:
    print(U);
  • Mathematica
    Table[Count[LiouvilleLambda[Range[10^n]], -1], {n, 0, 5}] (* Ray Chandler, May 30 2012 *)

Formula

a(n) = A011557(n) - A212818(n).
a(n) = (10^n)/2 - A090410(n)/2. - Donovan Johnson, May 30 2012
a(n) = A055038(10^n). - Ray Chandler, May 30 2012

Extensions

a(9)-a(13) from Donovan Johnson, May 30 2012

A332510 a(n) = Sum_{k=1..n} lambda(floor(n/k)), where lambda = A008836.

Original entry on oeis.org

1, 0, 1, 2, 1, 2, 1, 2, 5, 2, 1, 4, 5, 4, 3, 4, 3, 6, 7, 6, 7, 4, 3, 8, 7, 6, 7, 8, 9, 8, 9, 10, 11, 8, 5, 10, 9, 10, 11, 10, 9, 12, 13, 12, 13, 12, 11, 16, 17, 12, 13, 12, 13, 16, 13, 14, 15, 14, 13, 16, 15, 16, 17, 20, 19, 18, 19, 18, 19, 14, 15, 22, 23, 22, 19, 22, 21, 20, 21, 20, 23, 20, 19, 26, 23
Offset: 1

Views

Author

Ilya Gutkovskiy, Feb 14 2020

Keywords

Crossrefs

Programs

  • Mathematica
    Table[Sum[LiouvilleLambda[Floor[n/k]], {k, 1, n}], {n, 1, 85}]
    Table[Floor[Sqrt[n]] - Sum[DivisorSum[k, LiouvilleLambda[# - 1] &, # > 1 &], {k, 1, n}], {n, 1, 85}]
    nmax = 85; CoefficientList[Series[(1/(1 - x)) ((EllipticTheta[3, 0, x] - 1)/2 - Sum[LiouvilleLambda[k - 1] x^k/(1 - x^k), {k, 2, nmax}]), {x, 0, nmax}], x] // Rest
  • PARI
    a(n) = sum(k=1, n, (-1)^bigomega(n\k)); \\ Michel Marcus, Feb 14 2020

Formula

G.f.: (1/(1 - x)) * ((theta_3(x) - 1) / 2 - Sum_{k>=2} lambda(k-1) * x^k / (1 - x^k)).
a(n) = floor(sqrt(n)) - Sum_{k=1..n} Sum_{d|k, d > 1} lambda(d-1).
Sum_{k=1..n} mu(k) * a(floor(n/k)) = lambda(n).

A346202 a(n) = L(n)^2, where L is Liouville's function.

Original entry on oeis.org

1, 0, 1, 0, 1, 0, 1, 4, 1, 0, 1, 4, 9, 4, 1, 0, 1, 4, 9, 16, 9, 4, 9, 4, 1, 0, 1, 4, 9, 16, 25, 36, 25, 16, 9, 4, 9, 4, 1, 0, 1, 4, 9, 16, 25, 16, 25, 36, 25, 36, 25, 36, 49, 36, 25, 16, 9, 4, 9, 4, 9, 4, 9, 4, 1, 4, 9, 16, 9, 16, 25, 36, 49, 36, 49, 64, 49
Offset: 1

Views

Author

Mats Granvik, Jul 10 2021

Keywords

Comments

The Riemann Hypothesis is equivalent to the statement that, for every fixed eps > 0, lim_{n->oo} (L(n) / n^(eps + 1/2)) = 0.

References

  • Peter Borwein, Stephen Choi, Brendan Rooney, and Andrea Weirathmueller, The Riemann Hypothesis: A Resource for the Afficionado and Virtuoso Alike, 2007, page 6, Theorem 1.2.

Crossrefs

Cf. A002819, A008836, A028488 (positions of zeros).

Programs

  • Maple
    L:= proc(n) option remember; `if`(n<1, 0,
         (-1)^numtheory[bigomega](n)+L(n-1))
        end:
    a:= n-> L(n)^2:
    seq(a(n), n=1..77);  # Alois P. Heinz, Jul 28 2021
  • Mathematica
    Table[Sum[LiouvilleLambda[n], {n, 1, nn}]^2, {nn, 1, 77}]
  • PARI
    a008836(n) = (-1)^bigomega(n) \\ after Charles R Greathouse IV in A008836
    a(n) = sum(i=1, n, sum(j=1, n, a008836(i)*a008836(j))) \\ Felix Fröhlich, Jul 10 2021
    
  • Python
    from functools import reduce
    from operator import ixor
    from sympy import factorint
    def A346202(n): return sum(-1 if reduce(ixor, factorint(i).values(),0)&1 else 1 for i in range(1,n+1))**2 # Chai Wah Wu, Dec 20 2022

Formula

a(n) = Sum_{i=1..n} Sum_{j=1..n} A008836(i)*A008836(j).
a(n) = A002819(n)^2. - Ilya Gutkovskiy, Jul 10 2021

A175702 Convolution square of the Liouville sequence A008836.

Original entry on oeis.org

1, -2, -1, 4, -3, 2, -1, -4, 9, -2, -5, 0, 1, 6, 3, -8, -3, 2, 7, -4, 1, -2, -1, 12, 1, -10, -5, -8, 13, 10, -1, -12, 1, 6, 3, 0, -7, 6, 11, -8, -3, -6, -1, -4, -3, 2, 7, 12, 21, -14, -5, -16, -7, 22, -5, -8, -3, 2, 19, 16, -7, -10, 7, -4, -3, -22, -9, -12, 13, 10, 7, 12, 5, 10, -9
Offset: 1

Views

Author

Michel Lagneau, Aug 10 2010

Keywords

Crossrefs

Programs

  • Maple
    with(numtheory): T:=array(1..200):for p from 1 to 200 do: T[p] :=(-1)^bigomega(p): od :for n from 1 to 100 do: printf(`%d, `, sum (T[k]*T[n+1-k],k=1..n)):od:

Formula

a(n)= Sum_{k=1..n} lambda(k)*lambda(n+1-k).

Extensions

Definition slightly rephrased, keyword:sign added - R. J. Mathar, Aug 19 2010
Previous Showing 21-30 of 30 results.