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 11-20 of 21 results. Next

A342935 Number of ordered triples (x, y, z) with gcd(x, y, z) = 1 and 1 <= {x, y, z} <= 2^n.

Original entry on oeis.org

1, 7, 55, 439, 3433, 27541, 218773, 1749223, 13964245, 111725197, 893433661, 7147232467, 57169672861, 457364647435, 3658819119307, 29270432746633, 234161501271463, 1873293863661469, 14986321908515773, 119890565631185995, 959124025074311215, 7672992332048493361
Offset: 0

Views

Author

Karl-Heinz Hofmann, Mar 29 2021

Keywords

Examples

			For n=3, the size of the division cube matrix is 8 X 8 X 8:
.
                            :   : : : : : : : :
.
                        z = 4 | 1 2 3 4 5 6 7 8
                        ------+----------------------
                          1  /| o o o o o o o o    8
                          2 / | o . o . o . o .    4      64 Sum (z = 1)
                          3/  | o o o o o o o o    8      /
                          /                 o .    4    48  Sum (z = 2)
                  z = 5 |/1 2 3 4 5 6 7 8     o    8    /
                  ------+----------------------    4  60  Sum (z = 3)
                    1  /| o o o o o o o o    8     8  /
                    2 / | o o o o o o o o    8     4 /
                    3/  | o o o o o o o o    8    --/
                    /                 o o    8    48  Sum (z = 4)
            z = 6 |/1 2 3 4 5 6 7 8     o    7    /
            ------+----------------------    8   /
              1  /| o o o o o o o o    8     8  /
              2 / | o . o . o . o .    4     8 /
              3/  | o o o o o o o o    6    --/
              /                 o .    4    63  Sum (z = 5)
      z = 7 |/1 2 3 4 5 6 7 8     o    8    /
      ------+----------------------    3   /
        1  /| o o o o o o o o    8     8  /
        2 / | o o o o o o o o    8     4 /
        3/  | o o o o o o o o    8    --/
        /                 o o    8    45  Sum (z = 6)
z = 8 |/1 2 3 4 5 6 7 8     o    8    /
------+----------------------    8   /
  1   | o o o o o o o o    8     7  /
  2   | o . o . o . o .    4     8 /
  3   | o o o o o o o o    8    --/
  4   | o . o . o . o .    4    63  Sum (z = 7)
  5   | o o o o o o o o    8    /
  6   | o . o . o . o .    4   /
  7   | o o o o o o o o    8  /
  8   | o . o . o . o .    4 /
                          --/
                          48  Sum (z = 8)
                           |
                         ---
                         439  Cube Sum (z = 1..8)
		

Crossrefs

Programs

  • Mathematica
    Array[Sum[MoebiusMu[k]*Floor[(2^#)/k]^3, {k, 2^# + 1}] &, 22, 0] (* Michael De Vlieger, Apr 05 2021 *)
  • Python
    from labmath import mobius
    def A342935(n): return sum(mobius(k)*(2**n//k)**3 for k in range(1, 2**n+1))

Formula

Lim_{n->infinity} a(n)/2^(3*n) = 1/zeta(3) = A088453 = 1/Apéry's constant.
a(n) = A071778(2^n).

Extensions

Edited by N. J. A. Sloane, Jun 13 2021

A343193 Number of ordered quadruples (w, x, y, z) with gcd(w, x, y, z) = 1 and 1 <= {w, x, y, z} <= 10^n.

Original entry on oeis.org

1, 9279, 92434863, 923988964495, 9239427676877311, 92393887177379735327, 923938441006918271400831, 9239384074081430755652624559, 92393840333765561759423951663423, 923938402972369921481535120722882015
Offset: 0

Views

Author

Karl-Heinz Hofmann, Apr 07 2021

Keywords

Examples

			(1,2,2,3) is counted, but (2,4,4,6) is not, because gcd = 2.
For n=1, the size of the division tesseract matrix is 10 X 10 X 10 X 10:
.
              o------------x(w=10)------------o
             /|.                            ./ |
            / |.                           ./  |
           /  |.                          ./   |
          /   |.                         ./    |
         /    |.                      z(w=10)  |
        /     |.                      . /      |
       /      |.                     . /       |
      /       |.                   .  /     y(w=10)
     o------------------------------.o         |
    |\        /|¯¯¯¯¯¯x(w=1)¯¯¯¯¯¯/. |         |
    | w      / |                 /.| |         |
    |  \ z(w=1)|                /. | |         |
    |   \  /   |y(w=1)         /.  | |         |
    |    \/-------------------/.   | |         |
    |     |                   |    | |         |        w | sums
    |     |  Cube at w = 1    |    | |         |      ----+-----
    |     |   10 X 10 X 10    | _ _| |---------o        1 | 1000
    |     |    contains       |    / |         /        2 |  875
    |     |      1000         |   /  |        /         3 |  973
    |     |    completely     |  /   |       /          4 |  875
    |     | reduced fractions | /    |      /           5 |  992
    |     |                   |/     |     /            6 |  849
    |     /------------------- \     |    /             7 |  999
    |    /                      \    |   /              8 |  875
    |   w                        w   |  /               9 |  973
    |  /                          \  | /               10 |  868
    | /                            \ |/               ----+-----
    o -------------------------------o       sum for a(1) | 9279
		

References

  • Joachim von zur Gathen and Jürgen Gerhard, Modern Computer Algebra, Cambridge University Press, Second Edition 2003, pp. 53-54.

Crossrefs

Related counts of k-tuples:
triples: A071778, A342935, A342841;
quadruples: A082540, A343527, A343193;
5-tuples: A343282;
6-tuples: A343978, A344038. - N. J. A. Sloane, Jun 13 2021

Programs

  • Python
    from labmath import mobius
    def A343193(n): return sum(mobius(k)*(10**n//k)**4 for k in range(1, 10**n+1))

Formula

Lim_{n->infinity} a(n)/10^(4*n) = 1/zeta(4) = A215267 = 90/Pi^4.
a(n) = A082540(10^n).

Extensions

Edited by N. J. A. Sloane, Jun 13 2021

A343527 Number of ordered quadruples (w, x, y, z) with gcd(w, x, y, z) = 1 and 1 <= {w, x, y, z} <= 2^n.

Original entry on oeis.org

1, 15, 239, 3823, 60735, 972191, 15517679, 248252879, 3969108895, 63506982943, 1015951568815, 16255093526239, 260068569617727, 4161109496115135, 66577084386669199, 1065232436999055375, 17043668344393625999, 272698739815301095247, 4363176901343767529551, 69810828455823683068415, 1116973047989955380768527
Offset: 0

Views

Author

Karl-Heinz Hofmann, Apr 18 2021

Keywords

Examples

			.
For n=3, the size of the gris is 8 X 8 X 8 X 8:
.
              o------------x(w=8)-------------o
             /|.                            ./ |
            / |.                           ./  |
           /  |.                          ./   |
          /   |.                         ./    |
         /    |.                      z(w=8)   |
        /     |.                      . /      |
       /      |.                     . /       |
      /       |.                   .  /     y(w=8)
     o------------------------------.o         |
    |\        /|¯¯¯¯¯¯x(w=1)¯¯¯¯¯¯/. |         |
    | w      / |                 /.| |         |
    |  \ z(w=1)|                /. | |         |
    |   \  /   |y(w=1)         /.  | |         |
    |    \/-------------------/.   | |         |
    |     |                   |    | |         |        w | sums
    |     |  Cube at w = 1    |    | |         |      ----+-----
    |     |    8 X 8 X 8      | _ _| |---------o        1 |  512
    |     |    contains       |    / |         /        2 |  448
    |     |       512         |   /  |        /         3 |  504
    |     |    completely     |  /   |       /          4 |  448
    |     | reduced fractions | /    |      /           5 |  511
    |     |                   |/     |     /            6 |  441
    |     /------------------- \     |    /             7 |  511
    |    /                      \    |   /              8 |  448
    |   w                        w   |  /             ----+-----
    |  /                          \  | /     sum for a(3) | 3823
    | /                            \ |/
    o -------------------------------o
		

Crossrefs

Programs

  • Python
    from labmath import mobius
    def A343527(n): return sum(mobius(k)*(2**n//k)**4 for k in range(1, 2**n+1))

Formula

Lim_{n->infinity} a(n)/2^(4*n) = 1/zeta(4) = A215267 = 90/Pi^4.
a(n) = A082540(2^n).

Extensions

Edited by N. J. A. Sloane, Jun 13 2021

A344527 Square array T(n,k), n >= 1, k >= 1, read by antidiagonals, where T(n,k) is the number of ordered k-tuples (x_1, x_2, ..., x_k) with gcd(x_1, x_2, ..., x_k) = 1 (1 <= {x_1, x_2, ..., x_k} <= n).

Original entry on oeis.org

1, 1, 1, 1, 3, 1, 1, 7, 7, 1, 1, 15, 25, 11, 1, 1, 31, 79, 55, 19, 1, 1, 63, 241, 239, 115, 23, 1, 1, 127, 727, 991, 607, 181, 35, 1, 1, 255, 2185, 4031, 3091, 1199, 307, 43, 1, 1, 511, 6559, 16255, 15559, 7501, 2303, 439, 55, 1, 1, 1023, 19681, 65279, 77995, 45863, 16531, 3823, 637, 63, 1
Offset: 1

Views

Author

Seiichi Manyama, May 22 2021

Keywords

Examples

			G.f. of column 3: (1/(1 - x)) * Sum_{i>=1} mu(i) * (x^i + 4*x^(2*i) + x^(3*i))/(1 - x^i)^3.
Square array begins:
  1,  1,   1,    1,    1,     1, ...
  1,  3,   7,   15,   31,    63, ...
  1,  7,  25,   79,  241,   727, ...
  1, 11,  55,  239,  991,  4031, ...
  1, 19, 115,  607, 3091, 15559, ...
  1, 23, 181, 1199, 7501, 45863, ...
		

Crossrefs

Columns k=1..6 give A000012, A018805, A071778, A082540, A082544, A343978.
T(n,n) gives A332468.

Programs

  • Mathematica
    T[n_, k_] := Sum[MoebiusMu[j] * Quotient[n, j]^k, {j, 1, n}]; Table[T[k, n - k + 1], {n, 1, 11}, {k, 1, n}] // Flatten (* Amiram Eldar, May 22 2021 *)
  • PARI
    T(n, k) = sum(j=1, n, moebius(j)*(n\j)^k);
    
  • PARI
    T(n, k) = n^k-sum(j=2, n, T(n\j, k));
    
  • Python
    from functools import lru_cache
    from itertools import count, islice
    @lru_cache(maxsize=None)
    def A344527_T(n,k):
        if n == 0:
            return 0
        c, j, k1 = 1, 2, n//2
        while k1 > 1:
            j2 = n//k1 + 1
            c += (j2-j)*A344527_T(k1,k)
            j, k1 = j2, n//j2
        return n*(n**(k-1)-1)-c+j
    def A344527_gen(): # generator of terms
        return (A344527_T(k+1, n-k) for n in count(1) for k in range(n))
    A344527_list = list(islice(A344527_gen(),30)) # Chai Wah Wu, Nov 02 2023

Formula

G.f. of column k: (1/(1 - x)) * Sum_{i>=1} mu(i) * ( Sum_{j=1..k} A008292(k, j) * x^(i*j) )/(1 - x^i)^k.
T(n,k) = Sum_{j=1..n} mu(j) * floor(n/j)^k.
T(n,k) = n^k - Sum_{j=2..n} T(floor(n/j),k).

A015616 Number of triples (i,j,k) with 1 <= i < j < k <= n and gcd(i,j,k) = 1.

Original entry on oeis.org

0, 0, 1, 4, 10, 19, 34, 52, 79, 109, 154, 196, 262, 325, 409, 493, 613, 712, 865, 997, 1171, 1336, 1567, 1747, 2017, 2251, 2548, 2818, 3196, 3472, 3907, 4267, 4717, 5125, 5665, 6079, 6709, 7222, 7858, 8410, 9190, 9748, 10609, 11299, 12127
Offset: 1

Views

Author

Keywords

Examples

			For n=6, the a(6) = 19 solutions are the binomial(6,3) = (6*5*4)/(1*2*3) = 20 possible triples minus the triple (2,4,6) with GCD=2.
		

Crossrefs

Programs

  • Maple
    f:=proc(n) local i,j,k,t1,t2,t3; t1:=0; for i from 1 to n-2 do for j from i+1 to n-1 do t2:=gcd(i,j); for k from j+1 to n do t3:=gcd(t2,k); if t3 = 1 then t1:=t1+1; fi; od: od: od: t1; end;
    # program based on Moebius transform, partial sums of A000741:
    with(numtheory):
    b:= proc(n) option remember;
          add(mobius(n/d)*(d-2)*(d-1)/2, d=divisors(n))
        end:
    a:= proc(n) option remember;
          b(n) +`if`(n=1, 0, a(n-1))
        end:
    seq(a(n), n=1..100);  # Alois P. Heinz, Feb 08 2011
  • Mathematica
    a[n_] := (cnt = 0; Do[cnt += Boole[GCD[i, j, k] == 1], {i, 1, n-2}, {j, i+1, n-1}, {k, j+1, n}]; cnt); Table[a[n], {n, 1, 45}] (* Jean-François Alcover, Mar 05 2013 *)
  • PARI
    print1(c=0);for(k=1,99,for(j=1,k-1, gcd(j,k)==1 && (c+=j-1) && next; for(i=1,j-1, gcd([i,j,k])>1 || c++)); print1(", "c))
    
  • Python
    from functools import lru_cache
    @lru_cache(maxsize=None)
    def A015616(n):
        if n <= 1:
            return 0
        c, j = n*(n-1)*(n-2)//6, 2
        k1 = n//j
        while k1 > 1:
            j2 = n//k1 + 1
            c -= (j2-j)*A015616(k1)
            j, k1 = j2, n//j2
        return c # Chai Wah Wu, Mar 30 2021

Formula

a(n) = (A071778(n) - 3*A018805(n) + 2)/6. - Vladeta Jovovic, Dec 01 2004
a(n) = Sum_{i=1..n} A000741(i). - Alois P. Heinz, Feb 08 2011
For n > 1, a(n) = n(n-1)(n-2)/6 - Sum_{j=2..n} a(floor(n/j)) = A000292(n-2) - Sum_{j=2..n} a(floor(n/j)). - Chai Wah Wu, Mar 30 2021

A343282 Number of ordered 5-tuples (v,w, x, y, z) with gcd(v, w, x, y, z) = 1 and 1 <= {v, w, x, y, z} <= 10^n.

Original entry on oeis.org

1, 96601, 9645718621, 964407482028001, 96438925911789115351, 9643875373658964992585011, 964387358678775616636890654841, 96438734235127451288511508421855851, 9643873406165059293451290072800801506621
Offset: 0

Views

Author

Karl-Heinz Hofmann, Apr 10 2021

Keywords

References

  • Joachim von zur Gathen and Jürgen Gerhard, Modern Computer Algebra, Cambridge University Press, Second Edition 2003, pp. 53-54.

Crossrefs

Related counts of k-tuples:
triples: A071778, A342935, A342841;
quadruples: A082540, A343527, A343193;
5-tuples: A343282;
6-tuples: A343978, A344038. - N. J. A. Sloane, Jun 13 2021

Programs

  • Python
    from labmath import mobius
    def A343282(n): return sum(mobius(k)*(10**n//k)**5 for k in range(1, 10**n+1))

Formula

Lim_{n->infinity} a(n)/10^(5*n) = 1/zeta(5) = A343308.
a(n) = A082544(10^n). - Chai Wah Wu, Apr 11 2021

Extensions

Edited by N. J. A. Sloane, Jun 13 2021

A344038 Number of ordered 6-tuples (a,b,c,d,e,f) with gcd(a,b,c,d,e,f)=1 (1<= {a,b,c,d,e,f} <= 10^n).

Original entry on oeis.org

1, 983583, 983029267047, 982960635742968103, 982953384128772770413831, 982952672223441253533233827367, 982952600027678075050509511271466303, 982952593055042000417993486008754893529583, 982952592342881094406730790044111038427637071855
Offset: 0

Views

Author

Karl-Heinz Hofmann, May 07 2021

Keywords

Crossrefs

Related counts of k-tuples:
triples: A071778, A342935, A342841;
quadruples: A082540, A343527, A343193;
5-tuples: A343282;
6-tuples: A343978, A344038. - N. J. A. Sloane, Jun 13 2021

Programs

  • PARI
    a(n)={sum(k=1, 10^n+1, moebius(k)*(10^n\k)^6)} \\ Andrew Howroyd, May 08 2021
  • Python
    from labmath import mobius
    def A344038(n): return sum(mobius(k)*(10**n//k)**6 for k in range(1, 10**n+1))
    

Formula

Lim_{n->infinity} a(n)/10^(6*n) = 1/zeta(6) = A343359 = 945/Pi^4.
a(n) = A343978(10^n).

Extensions

Edited by N. J. A. Sloane, Jun 13 2021

A332468 a(n) = Sum_{k=1..n} mu(k) * floor(n/k)^n.

Original entry on oeis.org

1, 3, 25, 239, 3091, 45863, 821227, 16711423, 387138661, 9990174303, 285262663291, 8913906888703, 302861978789371, 11111328334033327, 437889112287422401, 18446462446101903615, 827238009323454485641, 39346257879101283645743, 1978418304199236175597105
Offset: 1

Views

Author

Ilya Gutkovskiy, Feb 13 2020

Keywords

Crossrefs

Programs

  • Magma
    [&+[MoebiusMu(k)*Floor(n/k)^n:k in [1..n]]:n in [1..20]]; // Marius A. Burtea, Feb 13 2020
    
  • Mathematica
    Table[Sum[MoebiusMu[k] Floor[n/k]^n, {k, 1, n}], {n, 1, 19}]
    b[n_, k_] := b[n, k] = n^k - Sum[b[Floor[n/j], k], {j, 2, n}]; a[n_] := b[n, n]; Table[a[n], {n, 1, 19}]
  • PARI
    a(n)={sum(k=1, n, moebius(k) * floor(n/k)^n)} \\ Andrew Howroyd, Feb 13 2020
    
  • Python
    from functools import lru_cache
    @lru_cache(maxsize=None)
    def A344527_T(n,k):
        if n == 0:
            return 0
        c, j, k1 = 1, 2, n//2
        while k1 > 1:
            j2 = n//k1 + 1
            c += (j2-j)*A344527_T(k1,k)
            j, k1 = j2, n//j2
        return n*(n**(k-1)-1)-c+j
    def A332468(n): return A344527_T(n,n) # Chai Wah Wu, Nov 02 2023

Formula

a(n) ~ n^n. - Vaclav Kotesovec, May 28 2021

A344596 a(n) = Sum_{k=1..n} mu(k) * (floor(n/k)^3 - floor((n-1)/k)^3).

Original entry on oeis.org

1, 6, 18, 30, 60, 66, 126, 132, 198, 204, 330, 276, 468, 414, 552, 552, 816, 630, 1026, 840, 1116, 1050, 1518, 1128, 1740, 1476, 1890, 1692, 2436, 1704, 2790, 2256, 2820, 2544, 3384, 2556, 3996, 3186, 3960, 3408, 4920, 3420, 5418, 4260, 5112, 4686, 6486, 4560, 6930, 5340, 6816
Offset: 1

Views

Author

Seiichi Manyama, May 24 2021

Keywords

Crossrefs

Essentially 6*A102309 and 6*A326419.

Programs

  • Mathematica
    a[n_] := Sum[MoebiusMu[k] * First @ Differences @ (Quotient[{n - 1, n}, k]^3), {k, 1, n}]; Array[a, 50] (* Amiram Eldar, May 24 2021 *)
  • PARI
    a(n) = sum(k=1, n, moebius(k)*((n\k)^3-((n-1)\k)^3));
    
  • PARI
    a(n) = if(n<2, n, 3*sumdiv(n, d, moebius(n/d)*(d-1)*d));
    
  • PARI
    my(N=66, x='x+O('x^N)); Vec(sum(k=1, N, moebius(k)*x^k*(1+4*x^k+x^(2*k))/(1-x^k)^3))
    
  • PARI
    my(N=66, x='x+O('x^N)); Vec(x+6*sum(k=1, N, moebius(k)*x^(2*k)/(1-x^k)^3))
    
  • Python
    from sympy import mobius, divisors
    def A344596(n): return 3*sum(mobius(n//d)*d*(d-1) for d in divisors(n,generator=True)) if n>1 else 1 # Chai Wah Wu, May 09 2025

Formula

Sum_{k=1..n} a(k) * floor(n/k) = n^3.
Sum_{k=1..n} a(k) = A071778(n).
a(n) = 3 * Sum_{d|n} mu(n/d) * (d-1) * d for n > 1.
G.f.: Sum_{k >= 1} mu(k) * x^k * (1 + 4*x^k + x^(2*k))/(1 - x^k)^3.
G.f.: x + 6 * Sum_{k>=1} mu(k) * x^(2*k)/(1 - x^k)^3.
a(2^k) = 3*2^(k-2)*(3*2^k-2) for k>0. - Chai Wah Wu, May 10 2025

A101467 Number of distinct n-term ratios x_1 : x_2 : ... : x_n where each x_i is in the range [1-10].

Original entry on oeis.org

10, 63, 841, 9279, 96601, 983583, 9919561, 99602559, 998026681, 9990174303, 99950992681, 999755323839, 9998777694361, 99993891685023, 999969468040201, 9999847368997119, 99999236931275641, 999996184915051743, 9999980925350886121, 99999904629080526399
Offset: 1

Views

Author

Su Jianning (sujianning(AT)yahoo.com.cn), Jan 21 2005

Keywords

Comments

Number of elements of {1,...,10}^n with gcd 1. - Robert Israel, Nov 28 2014

Examples

			For n=2: Consider the ratios 1:1, 1:2, ..., 1:10, 2:1, 2:2, ..., 2:10, ..., 10:1, 10:2, ..., 10:10. We get 63 different ratios from the 100 numbers list above after removing duplication. So a(2) = 63, and this is A018805(10).
		

Crossrefs

Cf. A018805 (2 terms), A071778 (3 terms), A082540 (4 terms), A082544 (5 terms).

Programs

  • Maple
    1, seq(10^n - 5^n - 3^n - 2^n + 1, n=2..20); # Robert Israel, Nov 28 2014
  • PARI
    Vec(x*(2700*x^5-5460*x^4+3579*x^3-1028*x^2+147*x-10)/((x-1)*(2*x-1)*(3*x-1)*(5*x-1)*(10*x-1)) + O(x^100)) \\ Colin Barker, Nov 28 2014

Formula

a(1) = 10; for n>1, a(n) = 10^n - 5^n - 3^n - 2^n + 1.
G.f.: x*(2700*x^5-5460*x^4+3579*x^3-1028*x^2+147*x-10) / ((x-1)*(2*x-1)*(3*x-1)*(5*x-1)*(10*x-1)). - Colin Barker, Nov 28 2014
a(n+4) = -300*a(n)+340*a(n+1)-131*a(n+2)+20*a(n+3)+72 for n >= 2. - Robert Israel, Dec 02 2014
a(n) = 21*a(n-1) - 151*a(n-2) + 471*a(n-3) - 640*a(n-4) + 300*a(n-5) for n > 6. - Chai Wah Wu, Apr 15 2021
Previous Showing 11-20 of 21 results. Next