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 16 results. Next

A100449 Number of ordered pairs (i,j) with |i| + |j| <= n and gcd(i,j) <= 1.

Original entry on oeis.org

1, 5, 9, 17, 25, 41, 49, 73, 89, 113, 129, 169, 185, 233, 257, 289, 321, 385, 409, 481, 513, 561, 601, 689, 721, 801, 849, 921, 969, 1081, 1113, 1233, 1297, 1377, 1441, 1537, 1585, 1729, 1801, 1897, 1961, 2121, 2169, 2337, 2417, 2513, 2601, 2785, 2849, 3017
Offset: 0

Views

Author

N. J. A. Sloane, Nov 21 2004

Keywords

Comments

Note that gcd(0,m) = m for any m.
I would also like to get the sequences of the numbers of distinct sums i+j (also distinct products i*j) over all ordered pairs (i,j) with |i| + |j| <= n; also over all ordered pairs (i,j) with |i| + |j| <= n and gcd(i,j) <= 1.
From Robert Price, May 10 2013: (Start)
List of sequences that address these extensions:
Distinct sums i+j with or without the GCD qualifier results in a(n)=2n+1 (A005408).
Distinct products i*j without the GCD qualifier is given by A225523.
Distinct products i*j with the GCD qualifier is given by A225526.
With the restriction i,j >= 0 ...
Distinct sums or products equal to n is trivial and always equals one (A000012).
Distinct sums <=n with or without the GCD qualifier results in a(n)=n (A001477).
Distinct products <=n without the GCD qualifier is given by A225527.
Distinct products <=n with the GCD qualifier is given by A225529.
Ordered pairs with the sum = n without the GCD qualifier is a(n)=n+1.
Ordered pairs with the sum = n with the GCD qualifier is A225530.
Ordered pairs with the sum <=n without the GCD qualifier is A000217(n+1).
Ordered pairs with the sum <=n with the GCD qualifier is A225531.
(End)
This sequence (A100449) without the GCD qualifier results in A001844. - Robert Price, Jun 04 2013

Crossrefs

Programs

  • Maple
    f:=proc(n) local i,j,k,t1,t2,t3; t1:=0; for i from -n to n do for j from -n to n do if abs(i) + abs(j) <= n then t2:=gcd(i,j); if t2 <= 1 then t1:=t1+1; fi; fi; od: od: t1; end;
    # second Maple program:
    b:= proc(n) b(n):= numtheory[phi](n)+`if`(n=0, 0, b(n-1)) end:
    a:= n-> 1+4*b(n):
    seq(a(n), n=0..50);  # Alois P. Heinz, Mar 01 2013
  • Mathematica
    f[n_] := Length[ Union[ Flatten[ Table[ If[ Abs[i] + Abs[j] <= n && GCD[i, j] <= 1, {i, j}, {0, 0}], {i, -n, n}, {j, -n, n}], 1]]]; Table[ f[n], {n, 0, 49}] (* Robert G. Wilson v, Dec 14 2004 *)
  • PARI
    a(n) = 1+4*sum(k=1, n, eulerphi(k) ); \\ Joerg Arndt, May 10 2013
    
  • Python
    from functools import lru_cache
    @lru_cache(maxsize=None)
    def A100449(n):
        if n == 0:
            return 1
        c, j = 0, 2
        k1 = n//j
        while k1 > 1:
            j2 = n//k1 + 1
            c += (j2-j)*((A100449(k1)-3)//2)
            j, k1 = j2, n//j2
        return 2*(n*(n-1)-c+j)+1 # Chai Wah Wu, Mar 29 2021

Formula

a(n) = 1 + 4*Sum(phi(k), k=1..n) = 1 + 4*A002088(n). - Vladeta Jovovic, Nov 25 2004

Extensions

More terms from Vladeta Jovovic, Nov 25 2004

A226357 Number of ordered triples (i,j,k) with |i|,|j|,|k|,|i*j*k| <= n and gcd(i,j,k) <= 1.

Original entry on oeis.org

1, 27, 75, 147, 243, 363, 483, 651, 819, 1011, 1179, 1443, 1683, 1995, 2211, 2475, 2763, 3171, 3459, 3915, 4251, 4611, 4923, 5475, 5883, 6411, 6771, 7275, 7707, 8403, 8811, 9555, 10059, 10611, 11067, 11715, 12291, 13179, 13683, 14331, 14931, 15915, 16419
Offset: 0

Views

Author

Robert Price, Jun 04 2013

Keywords

Comments

Note that gcd(0,m) = m for any m.

Crossrefs

|i| + |j| + |k| <= n instead of |i*j*k| <= n: A100450.
This sequence (A226357) without the GCD qualifier: A226359.
Distinct sums i+j+k with the GCD qualifier: A222947.
Distinct sums i+j+k without the GCD qualifier: A222945.
Distinct products i*j*k with or without the GCD qualifier is 2n+1: A005408.
With the further restriction i,j,k >= 0 ...
Distinct sums i+j+k <= n with the GCD qualifier: A223133.
Distinct sums i+j+k <= n without the GCD qualifier: A223134.
Distinct products i*j*k with or without the GCD qualifier is n+1: A000217(n+1).
Distinct sums i+j+k with i*j*k = n with the GCD qualifier: A223135.
Distinct sums i+j+k with i*j*k = n without the GCD qualifier: A226378.
Distinct products i*j*k with i*j*k = n with or without the GCD qualifier is trivial and always 1: A000012.
Ordered triples with the product <= n with the GCD qualifier: A226001.
Ordered triples with the product <= n without the GCD qualifier: A226600.
Ordered triples with the product = n with the GCD qualifier: A226602.
Ordered triples with the product = n without the GCD qualifier: A007425.

Programs

  • Mathematica
    f[n_] := Length[Complement[Union[Flatten[Table[If[Abs[i*j*k] <=  n && GCD[i, j, k] <= 1, {i, j, k}], {i, -n, n}, {j, -n, n}, {k, -n, n}], 2]], {Null}]]; Table[f[n], {n, 0, 100}]

A226359 Number of ordered triples (i,j,k) with |i|, |j|, |k|, |i*j*k| <= n.

Original entry on oeis.org

1, 27, 93, 183, 321, 459, 669, 855, 1121, 1379, 1685, 1967, 2393, 2723, 3125, 3551, 4049, 4475, 5045, 5519, 6137, 6707, 7301, 7871, 8681, 9323, 10013, 10735, 11545, 12259, 13189, 13951, 14881, 15739, 16621, 17527, 18673, 19579, 20557, 21559, 22753, 23755
Offset: 0

Views

Author

Robert Price, Jun 04 2013

Keywords

Crossrefs

Programs

  • Mathematica
    f[n_]:=Length[Complement[Union[Flatten[Table[If[Abs[i*j*k] <=  n, {i, j, k}], {i, -n, n}, {j, -n, n}, {k, -n, n}], 2]], {Null}]]; Table[f[n], {n, 0, 100}]
  • PARI
    a(n)=12*n^2+6*n+1+8*sum(i=1, n, n\i*numdiv(i)) \\ Charles R Greathouse IV, Jun 04 2013

A226602 Number of ordered triples (i,j,k) with i*j*k = n, i,j,k >= 0 and gcd(i,j,k) <= 1.

Original entry on oeis.org

1, 1, 3, 3, 6, 3, 9, 3, 9, 6, 9, 3, 18, 3, 9, 9, 12, 3, 18, 3, 18, 9, 9, 3, 27, 6, 9, 9, 18, 3, 27, 3, 15, 9, 9, 9, 36, 3, 9, 9, 27, 3, 27, 3, 18, 18, 9, 3, 36, 6, 18, 9, 18, 3, 27, 9, 27, 9, 9, 3, 54, 3, 9, 18, 18, 9, 27, 3, 18, 9, 27, 3, 54, 3, 9, 18, 18
Offset: 0

Views

Author

Robert Price, Jun 13 2013

Keywords

Comments

Note that gcd(0,m) = m for any m.
a(n) is the number of cubefree divisors summed over the divisors of n. In other words, a(n) = Sum_{d|n} A073184(d). - Geoffrey Critzer, Mar 20 2015

Crossrefs

Programs

  • Maple
    with(numtheory):
    b:= proc(n, t, g) option remember; `if`(t=0,
          `if`(igcd(n, g)=1, 1, 0), add(b(n/d, t-1,
          igcd(g, d)), d=divisors(n)))
        end:
    a:= n-> `if`(n=0, 1, b(n, 2, 0)):
    seq(a(n), n=0..100);  # Alois P. Heinz, Mar 20 2015
  • Mathematica
    f[n_] := Length[Complement[Union[Flatten[Table[If[i*j*k == n && GCD[i, j, k] <= 1, {i, j, k}], {i, 0,n}, {j, 0, n}, {k, 0, n}], 2]], {Null}]]; Table[f[n], {n, 0, 100}]
    a[0] = a[1] = 1; a[n_] := Times @@ (3 * Last[#] & /@ FactorInteger[n]); Array[a, 100, 0] (* Amiram Eldar, Sep 14 2020 *)
  • Python
    from math import prod
    from sympy import factorint
    def A226602(n): return prod(3*e for e in factorint(n).values()) if n else 1 # Chai Wah Wu, Dec 26 2022

Formula

From Geoffrey Critzer, Mar 20 2015: (Start)
If n = p_1^e_1*p_2^e_2*...*p_r^e_r then a(n) = Product_{i=1..r} 3*e_i.
Dirichlet g.f.: zeta(s)^3/zeta(3*s). (End)
From Werner Schulte, May 13 2018: (Start)
Multiplicative with a(p^e) = 3*e, p prime and e>0.
Dirichlet inverse b(n), n>0, is multiplicative with b(1) = 1, and for p prime and e>0: b(p^e)=0 if e mod 3 = 0 otherwise b(p^e)=3*(-1)^(e mod 3).
Dirichlet convolution with A007427(n) yields A212793(n).
Dirichlet convolution with A008836(n) yields A092520(n).
Equals Dirichlet convolution of A034444(n) and A056624(n).
Equals Dirichlet convolution of A000005(n) and A212793(n). (End)
Sum_{k=1..n} a(k) ~ n/(2*Zeta(3)) * (log(n)^2 + 2*log(n) * (-1 + 3*gamma - 3*Zeta'(3)/Zeta(3)) + 2 + 6*gamma^2 - 6*sg1 + 6*Zeta'(3)/Zeta(3) + 18*Zeta'(3)^2/Zeta(3)^2 - 6*gamma*(1 + 3*Zeta'(3)/Zeta(3)) - 9*Zeta''(3)/Zeta(3)), where gamma is the Euler-Mascheroni constant A001620 and sg1 is the first Stieltjes constant (see A082633). - Vaclav Kotesovec, Feb 07 2019
a(n) = A005361(n) * A074816(n). - Vaclav Kotesovec, Feb 27 2023

A213207 Number of distinct products i*j*k over all triples (i,j,k) with |i| + |j| + |k| <= n.

Original entry on oeis.org

1, 1, 1, 3, 5, 9, 13, 19, 25, 35, 43, 55, 65, 79, 91, 111, 127, 149, 167, 193, 217, 249, 273, 311, 339, 383, 419, 463, 501, 551, 591, 643, 693, 751, 799, 869, 925, 995, 1057, 1133, 1199, 1281, 1347, 1439, 1515, 1615, 1697, 1801, 1883, 2001, 2101, 2219, 2313
Offset: 0

Views

Author

Robert Price, Mar 01 2013

Keywords

Comments

This sequence is in reply to an extension request made in A100450.

Crossrefs

Programs

  • Maple
    h:= proc() true end:
    b:= proc(n) local c, i, j, p;
          c:=0;
          for i to iquo(n, 3) do
            for j from i to iquo(n-i, 2) do p:= i*j*(n-i-j);
              if h(p) then h(p):= false; c:=c+1 fi
            od
          od; c
        end:
    a:= proc(n) a(n):= `if`(n=0, 1, a(n-1) +2*b(n)) end:
    seq(a(n), n=0..60);  # Alois P. Heinz, Mar 02 2013
  • Mathematica
    f[n_] := Length[ Union[ Flatten[ Table[ If[ Abs[i] + Abs[j] + Abs[k] <= n, {i*j*k}, {0}], {i, -n, n}, {j, -n, n}, {k, -n, n}], 2]]]; Table[ f[n], {n, 0, 100}]

A213208 Number of distinct products i*j*k over all triples (i,j,k) with |i| + |j| + |k| <= n and gcd(i,j,k) <= 1.

Original entry on oeis.org

1, 1, 1, 3, 5, 9, 11, 19, 23, 33, 39, 51, 57, 75, 87, 103, 117, 143, 155, 187, 207, 235, 259, 297, 319, 363, 395, 441, 473, 525, 555, 615, 659, 721, 765, 831, 875, 959, 1017, 1091, 1147, 1239, 1291, 1397, 1467, 1553, 1631, 1743, 1813, 1937, 2023, 2141, 2233, 2379, 2465
Offset: 0

Views

Author

Robert Price, Mar 01 2013

Keywords

Comments

This sequence is in reply to an extension request made in A100450.
Note that gcd(0,m) = m for any m.

Crossrefs

Programs

  • Maple
    h:= proc() true end:
    b:= proc(n) local c, i, j, p;
          c:=0;
          for i to iquo(n, 3) do
            for j from i to iquo(n-i, 2) do
              if igcd(i, j, n-i-j)=1 then p:= i*j*(n-i-j);
                if h(p) then h(p):= false; c:=c+1 fi
              fi
            od
          od; c
        end:
    a:= proc(n) a(n):= `if`(n=0, 1, a(n-1) +2*b(n)) end:
    seq(a(n), n=0..60);  # Alois P. Heinz, Mar 01 2013
  • Mathematica
    f[n_] := Length[ Union[ Flatten[ Table[ If[ Abs[i] + Abs[j] + Abs[k] <= n&& GCD[i, j, k] <= 1, i*j*k, 0], {i, -n, n}, {j, -n, n}, {k, -n, n}], 2]]]; Table[ f[n], {n, 0, 100}]

A213212 Number of distinct products i*j*k over all triples (i,j,k) with i,j,k >= 0 and i+j+k <= n and gcd(i,j,k) <= 1.

Original entry on oeis.org

1, 1, 1, 2, 3, 5, 6, 10, 12, 17, 20, 26, 29, 38, 44, 52, 59, 72, 78, 94, 104, 118, 130, 149, 160, 182, 198, 221, 237, 263, 278, 308, 330, 361, 383, 416, 438, 480, 509, 546, 574, 620, 646, 699, 734, 777, 816, 872, 907, 969, 1012, 1071, 1117, 1190, 1233, 1307, 1361
Offset: 0

Views

Author

Robert Price, Mar 02 2013

Keywords

Comments

This sequence is in reply to an extension request made in A100450.
Note that gcd(0,m) = m for any m.

Crossrefs

Programs

  • Maple
    h:= proc() true end:
    b:= proc(n) local c, i, j, p;
          c:=0;
          for i to iquo(n, 3) do
            for j from i to iquo(n-i, 2) do
              if igcd(i, j, n-i-j)=1 then p:= i*j*(n-i-j);
                if h(p) then h(p):= false; c:=c+1 fi
              fi
            od
          od; c
        end:
    a:= proc(n) a(n):= `if`(n=0, 1, a(n-1) +b(n)) end:
    seq(a(n), n=0..60);  # Alois P. Heinz, Mar 02 2013
  • Mathematica
    f[n_] := Length[ Union[ Flatten[ Table[ If[ i+j+k <= n&& GCD[i, j, k] <= 1, i*j*k, 0], {i, 0, n}, {j, 0, n}, {k, 0, n}], 2]]]; Table[ f[n], {n, 0, 200}]

Formula

a(n) = (A213208(n) + 1)/2.

A213213 Number of distinct products i*j*k over all triples (i,j,k) with i,j,k>=0 and i+j+k <= n.

Original entry on oeis.org

1, 1, 1, 2, 3, 5, 7, 10, 13, 18, 22, 28, 33, 40, 46, 56, 64, 75, 84, 97, 109, 125, 137, 156, 170, 192, 210, 232, 251, 276, 296, 322, 347, 376, 400, 435, 463, 498, 529, 567, 600, 641, 674, 720, 758, 808, 849, 901, 942, 1001, 1051, 1110, 1157, 1225, 1275
Offset: 0

Views

Author

Robert Price, Mar 02 2013

Keywords

Comments

This sequence is in reply to an extension request made in A100450.

Crossrefs

Programs

  • Maple
    h:= proc() true end:
    b:= proc(n) local c, i, j, p;
          c:=0;
          for i to iquo(n, 3) do
            for j from i to iquo(n-i, 2) do p:= i*j*(n-i-j);
              if h(p) then h(p):= false; c:=c+1 fi
            od
          od; c
        end:
    a:= proc(n) a(n):= `if`(n=0, 1, a(n-1) +b(n)) end:
    seq(a(n), n=0..60);  # Alois P. Heinz, Mar 02 2013
  • Mathematica
    f[n_] := Length[ Union[ Flatten[ Table[ If[ i+j+k <= n, i*j*k, 0], {i, 0, n}, {j, 0, n}, {k, 0, n}], 2]]]; Table[ f[n], {n, 0, 200}]

Formula

a(n) = (A213207(n)+1)/2.

A225531 Number of ordered pairs (i, j) with i, j >= 0, i + j <= n and gcd(i, j) <= 1.

Original entry on oeis.org

1, 3, 4, 6, 8, 12, 14, 20, 24, 30, 34, 44, 48, 60, 66, 74, 82, 98, 104, 122, 130, 142, 152, 174, 182, 202, 214, 232, 244, 272, 280, 310, 326, 346, 362, 386, 398, 434, 452, 476, 492, 532, 544, 586, 606, 630, 652, 698, 714, 756, 776
Offset: 0

Views

Author

Robert Price, May 09 2013

Keywords

Comments

This sequence is in reply to an extension request made in A100449.
Note that gcd(0,m) = m for any m.

Crossrefs

Programs

  • Mathematica
    f[n_] := Length[Complement[Union[Flatten[Table[If[i + j <= n && GCD[i, j] <= 1, {i, j}], {i, 0, n}, {j, 0, n}], 1]], {Null}]]; Table[f[n], {n, 0, 100}]
  • PARI
    alist(N) = my(c=2); vector(N, i, if(1==i, 1, c+=eulerphi(i-1))); \\ Ruud H.G. van Tol, Jul 09 2024

A225530 Number of ordered pairs (i,j) with i,j >= 0, i + j = n and gcd(i,j) <= 1.

Original entry on oeis.org

1, 2, 1, 2, 2, 4, 2, 6, 4, 6, 4, 10, 4, 12, 6, 8, 8, 16, 6, 18, 8, 12, 10, 22, 8, 20, 12, 18, 12, 28, 8, 30, 16, 20, 16, 24, 12, 36, 18, 24, 16, 40, 12, 42, 20, 24, 22, 46, 16, 42, 20, 32, 24, 52, 18, 40, 24, 36, 28, 58, 16, 60, 30, 36, 32, 48, 20, 66
Offset: 0

Views

Author

Robert Price, May 09 2013

Keywords

Comments

This sequence is in reply to an extension request made in A100449.
Note that gcd(0,m) = m for any m.
Apparently a(n) = A000010(n), n >= 2. - R. J. Mathar, May 11 2013

Crossrefs

Programs

  • Mathematica
    f[n_]:=Length[Complement[Union[Flatten[Table[If[i+j==n&&GCD[i, j]<=1, {i,j}], {i, 0, n}, {j, 0, n}], 1]], {Null}]]; Table[f[n], {n, 0, 100}]
Showing 1-10 of 16 results. Next