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.

Showing 1-10 of 13 results. Next

A130071 Triangle, A007444(k) in each column interspersed with k zeros.

Original entry on oeis.org

2, 2, 1, 2, 0, 3, 2, 1, 0, 4, 2, 0, 0, 0, 9, 2, 1, 3, 0, 0, 7, 2, 0, 0, 0, 0, 0, 15, 2, 1, 0, 4, 0, 0, 0, 12, 2, 0, 3, 0, 0, 0, 0, 0, 18, 2, 1, 0, 0, 9, 0, 0, 0, 0, 17
Offset: 1

Views

Author

Gary W. Adamson, May 05 2007

Keywords

Comments

Row sums = the primes. T(n,k) = 0 if k does not divide n. If k divides n, extract A007444(k) which become the nonzero terms of row n, sum = n-th prime. Example: The factors of 6 are (1, 2, 3 and 6) = k's for A007444(k) = (2 + 1 + 3 + 7) = p(6) = 13. A007444 = the Moebius transform of the primes, (2, 1, 3, 4, 9, 7, 15, 12, ...), as the right diagonal of A130071.

Examples

			First few rows of the triangle:
  2;
  2,  1;
  2,  0,  3;
  2,  1,  0,  4;
  2,  0,  0,  0,  9;
  2,  1,  3,  0,  0,  7;
  2,  0,  0,  0,  0,  0, 15;
  2,  1,  0,  4,  0,  0,  0, 12;
  2,  0,  3,  0,  0,  0,  0,  0, 18;
  2,  1,  0,  0,  9,  0,  0,  0,  0, 17;
  ...
		

Crossrefs

Formula

Given the Moebius transform of the primes, A007444: (2, 1, 3, 4, 9, 7, 15, ...), the k-th term (k= 1,2,3,...) of this sequence generates the k-th column of A130071, interspersed with (k-1) zeros.

A030013 Moebius transform of {1, primes}.

Original entry on oeis.org

1, 1, 2, 3, 6, 7, 12, 12, 16, 15, 28, 17, 36, 27, 34, 30, 52, 32, 60, 41, 56, 43, 78, 40, 82, 59, 82, 59, 106, 43, 112, 80, 100, 83, 120, 70, 150, 95, 124, 88, 172, 73, 180, 115, 134, 117, 198, 98, 210, 122, 174, 133, 238, 100, 216, 142, 200, 161, 270, 107, 280, 169, 206, 180
Offset: 1

Views

Author

Keywords

Crossrefs

Cf. A008578 ({1, primes}), A007444 (Moebius transform of primes), A008683.

Programs

  • PARI
    a(n) = sumdiv(n, d, if (d==1, 1, prime(d-1))*moebius(n/d)); \\ Michel Marcus, Nov 04 2018

Extensions

Offset 1 and more terms from Michel Marcus, Nov 04 2018

A062774 Inverse Moebius transform of PrimePi function.

Original entry on oeis.org

0, 1, 2, 3, 3, 6, 4, 7, 6, 8, 5, 13, 6, 11, 11, 13, 7, 17, 8, 18, 14, 14, 9, 26, 12, 16, 15, 22, 10, 29, 11, 24, 18, 19, 18, 35, 12, 21, 20, 34, 13, 37, 14, 30, 29, 24, 15, 47, 19, 32, 24, 33, 16, 42, 24, 42, 26, 27, 17, 61, 18, 30, 36, 42, 27, 48, 19, 40, 30, 48, 20, 68, 21, 34
Offset: 1

Views

Author

Labos Elemer, Jul 18 2001

Keywords

Examples

			n = 12: divisors = D(12) = {1,2,3,4,6,12}, pi(D(12)) = {0,1,2,2,3,5} of which the sum is 0+1+2+2+3+5 = 13 so a(12) = 13; a(p(n)) = 0+n = n, for n-th prime p(n).
		

Crossrefs

Programs

  • PARI
    { for (n=1, 1000, d=divisors(n); write("b062774.txt", n, " ", sum(k=1, length(d), primepi(d[k]))) ) } \\ Harry J. Smith, Aug 10 2009

Formula

a(n) = Sum_{d|n} pi(d).
G.f.: Sum_{k>=1} pi(k)*x^k/(1 - x^k), where pi(k) is the number of primes <= k (A000720). - Ilya Gutkovskiy, Jan 16 2017
a(n) = Sum_{d|n} omega(d!). - Wesley Ivan Hurt, May 23 2021

Extensions

Offset changed from 0 to 1 by Harry J. Smith, Aug 10 2009

A127638 A054525 * A127640, where A127640 = infinite lower triangular matrix with the sequence of primes in the main diagonal and the rest zeros.

Original entry on oeis.org

2, -2, 3, -2, 0, 5, 0, -3, 0, 7, -2, 0, 0, 0, 11, 2, -3, -5, 0, 0, 13, -2, 0, 0, 0, 0, 0, 17, 0, 0, 0, -7, 0, 0, 0, 19, 0, 0, -5, 0, 0, 0, 0, 0, 23, 2, -3, 0, 0, -11, 0, 0, 0, 0, 29, -2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 31, 0, 3, 0, -7, 0, -13, 0, 0, 0, 0, 0, 37, -2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 41, 2, -3, 0, 0, 0, 0, -17, 0, 0, 0, 0, 0, 0, 43, 2, 0, -5, 0, -11, 0, 0
Offset: 1

Views

Author

Gary W. Adamson, Jan 21 2007

Keywords

Comments

Right diagonal = primes: (2, 3, 5, 7, ...). Row sums = the Mobius transform of primes, A007444: (2, 1, 3, 4, 9, 7, ...).

Examples

			First few rows of the triangle:
   2;
  -2,  3;
  -2,  0,  5;
   0, -3,  0, 7;
  -2,  0,  0, 0, 11;
   2, -3, -5, 0,  0, 13;
  ...
		

Crossrefs

Programs

  • Maple
    A054525 := proc(n,k) if n mod k = 0 then numtheory[mobius](n/k) ; else 0 ; fi ; end: A127648 := proc(n,k) A054525(n,k)*ithprime(k) ; end: for n from 1 to 16 do for k from 1 to n do printf("%d,", A127648(n,k)) ; od ; od ; # R. J. Mathar, Mar 14 2007

Extensions

More terms from R. J. Mathar, Mar 14 2007

A333450 a(n) = Sum_{k=1..n} mu(k) * prime(floor(n/k)).

Original entry on oeis.org

2, 1, 1, 2, 4, 5, 7, 7, 9, 12, 12, 15, 17, 16, 16, 20, 24, 22, 26, 23, 21, 26, 28, 28, 32, 33, 31, 32, 32, 29, 41, 39, 43, 40, 44, 40, 44, 45, 45, 47, 51, 52, 60, 55, 53, 52, 62, 64, 64, 56, 54, 55, 55, 65, 67, 69, 69, 70, 74, 73, 73, 70, 80, 80, 76, 69, 81, 84, 90, 81, 83, 87, 93, 94
Offset: 1

Views

Author

Ilya Gutkovskiy, Mar 21 2020

Keywords

Crossrefs

Programs

  • Mathematica
    Table[Sum[MoebiusMu[k] Prime[Floor[n/k]], {k, 1, n}], {n, 1, 74}]
    g[1] = 2; g[n_] := Prime[n] - Prime[n - 1]; a[n_] := Sum[Sum[MoebiusMu[k/d] g[d], {d, Divisors[k]}], {k, 1, n}]; Table[a[n], {n, 1, 74}]
  • PARI
    a(n) = sum(k=1, n, moebius(k)*prime(n\k)); \\ Michel Marcus, Mar 22 2020
    
  • Python
    from functools import lru_cache
    from sympy import prime
    @lru_cache(maxsize=None)
    def A333450(n):
        c, j = 2*(n+1)-prime(n), 2
        k1 = n//j
        while k1 > 1:
            j2 = n//k1 + 1
            c += (j2-j)*A333450(k1)
            j, k1 = j2, n//j2
        return 2*j-c # Chai Wah Wu, Mar 31 2021

Formula

Sum_{k=1..n} a(floor(n/k)) = prime(n).

A130070 Moebius transform of A130069.

Original entry on oeis.org

2, 1, 2, 3, 0, 2, 4, 1, 0, 2, 9, 0, 0, 0, 2, 7, 3, 1, 0, 0, 2, 15, 0, 0, 0, 0, 0, 2, 12, 4, 0, 1, 0, 0, 0, 2, 18, 0, 3, 0, 0, 0, 0, 0, 2, 17, 9, 0, 0, 1, 0, 0, 0, 0, 2
Offset: 1

Views

Author

Gary W. Adamson, May 05 2007

Keywords

Comments

Row sums = the primes, A000040: (2, 3, 5, 7, ...). Left column = A007444, the Moebius transform of the primes: (2, 1, 3, 4, 9, 7, 15, ...). A130071 = triangle with reversal of nonzero terms.

Examples

			First few rows of the triangle:
   2;
   1, 2;
   3, 0, 2;
   4, 1, 0, 2;
   9, 0, 0, 0, 2;
   7, 3, 1, 0, 0, 2;
  15, 0, 0, 0, 0, 0, 2;
  12, 4, 0, 1, 0, 0, 0, 2;
  18, 0, 3, 0, 0, 0, 0, 0, 2;
  17, 9, 0, 0, 1, 0, 0, 0, 0, 2;
  ...
		

Crossrefs

Formula

A333177 a(n) = Sum_{d|n, gcd(d, n/d) = 1} (-1)^omega(n/d) * prime(d).

Original entry on oeis.org

2, 1, 3, 5, 9, 7, 15, 17, 21, 17, 29, 27, 39, 25, 33, 51, 57, 37, 65, 55, 53, 47, 81, 67, 95, 59, 101, 85, 107, 41, 125, 129, 103, 79, 123, 123, 155, 95, 123, 145, 177, 75, 189, 157, 165, 115, 209, 167, 225, 131, 171, 193, 239, 147, 217, 229, 199, 161, 275, 147
Offset: 1

Views

Author

Ilya Gutkovskiy, Mar 10 2020

Keywords

Crossrefs

Programs

  • Mathematica
    a[n_] := Sum[If[GCD[n/d, d] == 1, (-1)^PrimeNu[n/d] Prime[d], 0], {d, Divisors[n]}]; Table[a[n], {n, 1, 60}]
  • PARI
    a(n) = sumdiv(n, d, if (gcd(d, n/d) ==1, (-1)^omega(n/d) * prime(d))); \\ Michel Marcus, Mar 10 2020

Formula

Sum_{d|n, gcd(d, n/d) = 1} a(d) = prime(n).

A361707 Moebius transform applied twice to primes.

Original entry on oeis.org

2, -1, 1, 3, 7, 5, 13, 8, 15, 9, 27, 10, 37, 11, 23, 22, 55, 8, 63, 18, 37, 19, 79, 12, 77, 21, 62, 32, 105, -5, 123, 44, 73, 23, 101, 23, 153, 31, 83, 44, 175, 7, 187, 60, 84, 35, 207, 38, 195, 20, 113, 72, 237, 18, 181, 76, 133, 55, 273, 34, 279, 41, 148, 102, 217
Offset: 1

Views

Author

Ilya Gutkovskiy, Mar 21 2023

Keywords

Crossrefs

Programs

  • Maple
    a:= (proc(p) proc(n) uses numtheory;
           add(p(d)*mobius(n/d), d=divisors(n))
         end end@@2)(ithprime):
    seq(a(n), n=1..100);  # Alois P. Heinz, Mar 23 2023
  • Mathematica
    A007427[n_] := Sum[MoebiusMu[n/d] MoebiusMu[d], {d, Divisors[n]}]; a[n_] := Sum[A007427[n/d] Prime[d], {d, Divisors[n]}]; Table[a[n], {n, 1, 65}]
  • PARI
    A007427(n) = if( n<1, 0, direuler(p=2, n, (1 - 'x)^2)[n]) \\ from Michael Somos, Nov 15 2002
    A361707(n)=sumdiv(n, d, A007427(n/d) * prime(d)) \\ Winston de Greef, Mar 23 2023

Formula

a(n) = Sum_{d|n} A007427(n/d) * prime(d).

A361709 Moebius transform of nonprimes.

Original entry on oeis.org

1, 3, 5, 4, 8, 1, 11, 6, 9, 4, 17, 6, 20, 7, 10, 11, 25, 8, 27, 10, 15, 12, 33, 9, 27, 14, 24, 14, 41, 12, 44, 21, 25, 20, 30, 14, 51, 23, 29, 20, 56, 15, 59, 25, 30, 27, 64, 20, 56, 26, 39, 30, 73, 24, 50, 31, 45, 35, 80, 18, 83, 37, 45, 41, 59, 26, 90, 39, 54, 30
Offset: 1

Views

Author

Ilya Gutkovskiy, Mar 21 2023

Keywords

Crossrefs

Programs

  • Mathematica
    With[{np = Select[Range[100], !PrimeQ[#] &]}, Table[DivisorSum[n, MoebiusMu[n/#]*np[[#]] &], {n, Length[np]}]] (* Paolo Xausa, Aug 21 2025 *)

Formula

a(n) = Sum_{d|n} mu(n/d) * A018252(d).

A062778 Values of Moebius-transform of PrimePi function.

Original entry on oeis.org

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

Views

Author

Labos Elemer, Jul 18 2001

Keywords

Examples

			n=12, divisors = D(12) = {1,2,3,4,6,12}, pi(12/divisors) = {5,3,2,2,1,0}, mu(divisors) = {1,-1,-1,0,1,0}, Sum = 5*1 - 3*1 - 2*1 + 0 + 1*1 + 0 = 1, thus a(12)=1; for p=prime(n), pi(p/divisor) = {n,0}, mu({1,p})={1,-1}, Sum = 1*n + 0 = n, so a(prime(n)) = n.
		

Crossrefs

Programs

  • Mathematica
    f[n_] := Block[{d = Divisors@n}, Plus @@ (MoebiusMu /@ (n/d)*PrimePi /@ d)]; Array[f, 94] (* Robert G. Wilson v, Dec 07 2005 *)
  • PARI
    { for (n=1, 1000, d=divisors(n); write("b062778.txt", n, " ", sum(k=1, length(d), primepi(n/d[k]) * moebius(d[k]))) ) } \\ Harry J. Smith, Aug 10 2009
    
  • PARI
    a(n) = sumdiv(n, d, primepi(d)*moebius(n/d)); \\ Michel Marcus, Nov 05 2018

Formula

a(n) = Sum_{d|n} pi(n/d)*mu(d).
Showing 1-10 of 13 results. Next