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 31-40 of 52 results. Next

A169582 Complement of A169581.

Original entry on oeis.org

3, 6, 8, 10, 15, 17, 18, 19, 21, 28, 30, 32, 34, 36, 39, 42, 45, 47, 49, 50, 51, 53, 55, 66, 68, 69, 70, 72, 74, 75, 76, 78, 91, 93, 95, 97, 98, 99, 101, 103, 105, 108, 110, 111, 114, 115, 117, 120, 122, 124, 126, 128, 130, 132, 134, 136, 153, 155, 156, 157, 159, 161
Offset: 1

Views

Author

Reinhard Zumkeller, Dec 02 2009

Keywords

Comments

A054521(a(n)) = 0;
GCD(A002260(a(n)),A002024(a(n))) = A050873(a(n)) > 1.

A181569 Greatest common divisor of n! and n+1.

Original entry on oeis.org

1, 1, 2, 1, 6, 1, 8, 9, 10, 1, 12, 1, 14, 15, 16, 1, 18, 1, 20, 21, 22, 1, 24, 25, 26, 27, 28, 1, 30, 1, 32, 33, 34, 35, 36, 1, 38, 39, 40, 1, 42, 1, 44, 45, 46, 1, 48, 49, 50, 51, 52, 1, 54, 55, 56, 57, 58, 1, 60, 1, 62, 63, 64, 65, 66, 1, 68, 69, 70, 1, 72, 1, 74, 75, 76, 77, 78, 1
Offset: 1

Views

Author

Reinhard Zumkeller, Oct 31 2010

Keywords

Comments

From Wilson's theorem, it follows that a(n) = 1 when n + 1 is prime, a(n) > 1 otherwise. - Alonso del Arte, Feb 25 2014

Examples

			a(6) = 1 because 6! and 7 are coprime.
a(7) = 8 because 7! = 5040 and gcd(5040, 8) = 8.
a(8) = 9 because 8! = 40320 and gcd(40320, 9) = 9.
		

Crossrefs

Programs

Formula

a(n) = A050873(A000142(n), n + 1);
a(A006093(n)) = 1;
for n > 3: a(n) = (n + 1) / (n*A010051(n+1) + 1).
a(n) = (n+1)/A014973(n+1). - Michel Marcus, Aug 14 2015

A245717 Triangle read by rows: T(n,k) = gcd(n,k^2), 1 <= k <= n.

Original entry on oeis.org

1, 1, 2, 1, 1, 3, 1, 4, 1, 4, 1, 1, 1, 1, 5, 1, 2, 3, 2, 1, 6, 1, 1, 1, 1, 1, 1, 7, 1, 4, 1, 8, 1, 4, 1, 8, 1, 1, 9, 1, 1, 9, 1, 1, 9, 1, 2, 1, 2, 5, 2, 1, 2, 1, 10, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 11, 1, 4, 3, 4, 1, 12, 1, 4, 3, 4, 1, 12, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 13
Offset: 1

Views

Author

Reinhard Zumkeller, Jul 30 2014

Keywords

Examples

			First rows and their sums (A078430):
.    1:   1                                           1
.    2:   1, 2                                        3
.    3:   1, 1, 3                                     5
.    4:   1, 4, 1, 4                                 10
.    5:   1, 1, 1, 1, 5                               9
.    6:   1, 2, 3, 2, 1,  6                          15
.    7:   1, 1, 1, 1, 1,  1, 7                       13
.    8:   1, 4, 1, 8, 1,  4, 1, 8                    28
.    9:   1, 1, 9, 1, 1,  9, 1, 1, 9                 33
.   10:   1, 2, 1, 2, 5,  2, 1, 2, 1, 10             27
.   11:   1, 1, 1, 1, 1,  1, 1, 1, 1,  1, 11         21
.   12:   1, 4, 3, 4, 1, 12, 1, 4, 3,  4,  1, 12     50
		

Crossrefs

Cf. A050873, A002024, A133819, A078430 (row sums).

Programs

  • Haskell
    a245717 n k = a245717_tabl !! (n-1) !! (k-1)
    a245717_row n = a245717_tabl !! (n-1)
    a245717_tabl = zipWith (zipWith gcd) a002024_tabl a133819_tabl
    
  • Mathematica
    Table[GCD[n,k^2],{n,15},{k,n}]//Flatten (* Harvey P. Dale, Nov 05 2022 *)
  • PARI
    row(n) = vector(n, k, gcd(n, k^2)); \\ Michel Marcus, Jan 24 2022

A339312 Sum over all partitions of n of the GCD of the number of parts and the number of distinct parts.

Original entry on oeis.org

0, 1, 2, 4, 6, 10, 17, 23, 33, 47, 71, 92, 129, 169, 235, 299, 408, 525, 691, 885, 1147, 1427, 1832, 2312, 2878, 3635, 4519, 5631, 7002, 8637, 10514, 13055, 15864, 19396, 23530, 28702, 34746, 42210, 50671, 61224, 73506, 88394, 105447, 126398, 150588, 179075
Offset: 0

Views

Author

Alois P. Heinz, Dec 02 2020

Keywords

Crossrefs

Programs

  • Maple
    b:= proc(n, i, p, d) option remember; `if`(n=0, igcd(p, d),
          add(b(n-i*j, i-1, p+j, d+signum(j)), j=`if`(i>1, 0..n/i, n)))
        end:
    a:= n-> b(n$2, 0$2):
    seq(a(n), n=0..50);
  • Mathematica
    b[n_, i_, p_, d_] := b[n, i, p, d] = If[n == 0, GCD[p, d],
         Sum[b[n - i*j, i - 1, p + j, d + Sign[j]],
         {j, If[i > 1, Range[0, n/i], {n}]}]];
    a[n_] := b[n, n, 0, 0];
    a /@ Range[0, 50] (* Jean-François Alcover, Mar 09 2021, after Alois P. Heinz *)

A342449 a(n) = Sum_{k=1..n} gcd(k,n)^k.

Original entry on oeis.org

1, 5, 29, 262, 3129, 46705, 823549, 16777544, 387421251, 10000003469, 285311670621, 8916100581446, 302875106592265, 11112006826387025, 437893890391180013, 18446744073743123788, 827240261886336764193, 39346408075299116257065
Offset: 1

Views

Author

Seiichi Manyama, Mar 13 2021

Keywords

Crossrefs

Programs

  • Mathematica
    a[n_] := Sum[GCD[k, n]^k, {k, 1, n}]; Array[a, 20] (* Amiram Eldar, Mar 13 2021 *)
  • PARI
    a(n) = sum(k=1, n, gcd(k, n)^k);

Formula

If p is prime, a(p) = p-1 + p^p = A231712(p).

A345416 Table read by upward antidiagonals: Given m, n >= 1, write gcd(m,n) as d = u*m+v*n where u, v are minimal; T(m,n) = v.

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, Jun 19 2021

Keywords

Comments

The gcd is given in A003989, and u is given in A345415. Minimal means minimize u^2+v^2. We follow Maple, PARI, etc., in setting u=0 and v=1 when m=n. If we ignore the diagonal, the v table is the transpose of the u table.

Examples

			The gcd table (A003989) begins:
[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
[1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2]
[1, 1, 3, 1, 1, 3, 1, 1, 3, 1, 1, 3, 1, 1, 3, 1]
[1, 2, 1, 4, 1, 2, 1, 4, 1, 2, 1, 4, 1, 2, 1, 4]
[1, 1, 1, 1, 5, 1, 1, 1, 1, 5, 1, 1, 1, 1, 5, 1]
[1, 2, 3, 2, 1, 6, 1, 2, 3, 2, 1, 6, 1, 2, 3, 2]
[1, 1, 1, 1, 1, 1, 7, 1, 1, 1, 1, 1, 1, 7, 1, 1]
[1, 2, 1, 4, 1, 2, 1, 8, 1, 2, 1, 4, 1, 2, 1, 8]
[1, 1, 3, 1, 1, 3, 1, 1, 9, 1, 1, 3, 1, 1, 3, 1]
[1, 2, 1, 2, 5, 2, 1, 2, 1, 10, 1, 2, 1, 2, 5, 2]
[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 11, 1, 1, 1, 1, 1]
[1, 2, 3, 4, 1, 6, 1, 4, 3, 2, 1, 12, 1, 2, 3, 4]
...
The u table (A345415) begins:
[0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
[0, 0, -1, 1, -2, 1, -3, 1, -4, 1, -5, 1, -6, 1, -7, 1]
[0, 1, 0, -1, 2, 1, -2, 3, 1, -3, 4, 1, -4, 5, 1, -5]
[0, 0, 1, 0, -1, -1, 2, 1, -2, -2, 3, 1, -3, -3, 4, 1]
[0, 1, -1, 1, 0, -1, 3, -3, 2, 1, -2, 5, -5, 3, 1, -3]
[0, 0, 0, 1, 1, 0, -1, -1, -1, 2, 2, 1, -2, -2, -2, 3]
[0, 1, 1, -1, -2, 1, 0, -1, 4, 3, -3, -5, 2, 1, -2, 7]
[0, 0, -1, 0, 2, 1, 1, 0, -1, -1, -4, -1, 5, 2, 2, 1]
[0, 1, 0, 1, -1, 1, -3, 1, 0, -1, 5, -1, 3, -3, 2, -7]
[0, 0, 1, 1, 0, -1, -2, 1, 1, 0, -1, -1, 4, 3, -1, -3]
[0, 1, -1, -1, 1, -1, 2, 3, -4, 1, 0, -1, 6, -5, -4, 3]
[0, 0, 0, 0, -2, 0, 3, 1, 1, 1, 1, 0, -1, -1, -1, -1]
...
The v table (this entry) begins:
[1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
[1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0]
[1, -1, 1, 1, -1, 0, 1, -1, 0, 1, -1, 0, 1, -1, 0, 1]
[1, 1, -1, 1, 1, 1, -1, 0, 1, 1, -1, 0, 1, 1, -1, 0]
[1, -2, 2, -1, 1, 1, -2, 2, -1, 0, 1, -2, 2, -1, 0, 1]
[1, 1, 1, -1, -1, 1, 1, 1, 1, -1, -1, 0, 1, 1, 1, -1]
[1, -3, -2, 2, 3, -1, 1, 1, -3, -2, 2, 3, -1, 0, 1, -3]
[1, 1, 3, 1, -3, -1, -1, 1, 1, 1, 3, 1, -3, -1, -1, 0]
[1, -4, 1, -2, 2, -1, 4, -1, 1, 1, -4, 1, -2, 2, -1, 4]
[1, 1, -3, -2, 1, 2, 3, -1, -1, 1, 1, 1, -3, -2, 1, 2]
[1, -5, 4, 3, -2, 2, -3, -4, 5, -1, 1, 1, -5, 4, 3, -2]
[1, 1, 1, 1, 5, 1, -5, -1, -1, -1, -1, 1, 1, 1, 1, 1]
...
		

Crossrefs

Programs

  • Maple
    mygcd:=proc(a,b) local d,s,t; d := igcdex(a,b,`s`,`t`); [a,b,d,s,t]; end;
    gcd_rowv:=(m,M)->[seq(mygcd(m,n)[5],n=1..M)];
    for m from 1 to 12 do lprint(gcd_rowv(m,16)); od;
  • Mathematica
    T[m_, n_] := Module[{u, v}, MinimalBy[{u, v} /. Solve[u^2 + v^2 <= 26 && u*m + v*n == GCD[m, n], {u, v}, Integers], #.#&][[1, 2]]];
    Table[T[m - n + 1, n], {m, 1, 13}, {n, 1, m}] // Flatten (* Jean-François Alcover, Mar 27 2023 *)

A347104 Dirichlet g.f.: primezeta(s-1) * zeta(s-1) / zeta(s).

Original entry on oeis.org

0, 2, 3, 2, 5, 7, 7, 4, 6, 13, 11, 10, 13, 19, 22, 8, 17, 18, 19, 18, 32, 31, 23, 20, 20, 37, 18, 26, 29, 38, 31, 16, 52, 49, 58, 24, 37, 55, 62, 36, 41, 56, 43, 42, 54, 67, 47, 40, 42, 60, 82, 50, 53, 54, 94, 52, 92, 85, 59, 60, 61, 91, 78, 32, 112, 92, 67, 66, 112, 106, 71, 48, 73, 109, 100
Offset: 1

Views

Author

Ilya Gutkovskiy, Aug 18 2021

Keywords

Comments

a(n) is the sum of the prime terms in row n of A050873.
Moebius transform of A328260.

Crossrefs

Programs

  • Mathematica
    Table[DivisorSum[n, MoebiusMu[n/#] # PrimeNu[#] &], {n, 1, 75}]
    Table[DivisorSum[n, # EulerPhi[n/#] &, PrimeQ[#] &], {n, 1, 75}]
    Table[Sum[Boole[PrimeQ[GCD[n, k]]] GCD[n, k], {k, 1, n}], {n, 1, 75}]
  • PARI
    a(n) = sumdiv(n, d, moebius(n/d)*d*omega(d)); \\ Michel Marcus, Aug 18 2021

Formula

a(n) = Sum_{d|n} mu(n/d) * d * omega(d).
a(n) = Sum_{p|n, p prime} p * phi(n/p).
a(n) = Sum_{k=1..n} A010051(gcd(n,k)) * gcd(n,k).

A374434 Triangle read by rows: T(n, k) = Product_{p in PF(n) symmetric difference PF(k)} p, where PF(a) is the set of the prime factors of a.

Original entry on oeis.org

1, 1, 1, 2, 2, 1, 3, 3, 6, 1, 2, 2, 1, 6, 1, 5, 5, 10, 15, 10, 1, 6, 6, 3, 2, 3, 30, 1, 7, 7, 14, 21, 14, 35, 42, 1, 2, 2, 1, 6, 1, 10, 3, 14, 1, 3, 3, 6, 1, 6, 15, 2, 21, 6, 1, 10, 10, 5, 30, 5, 2, 15, 70, 5, 30, 1, 11, 11, 22, 33, 22, 55, 66, 77, 22, 33, 110, 1
Offset: 0

Views

Author

Peter Luschny, Jul 10 2024

Keywords

Examples

			  [ 0]  1;
  [ 1]  1,  1;
  [ 2]  2,  2,  1;
  [ 3]  3,  3,  6,  1;
  [ 4]  2,  2,  1,  6,  1;
  [ 5]  5,  5, 10, 15, 10,  1;
  [ 6]  6,  6,  3,  2,  3, 30,  1;
  [ 7]  7,  7, 14, 21, 14, 35, 42,  1;
  [ 8]  2,  2,  1,  6,  1, 10,  3, 14,  1;
  [ 9]  3,  3,  6,  1,  6, 15,  2, 21,  6,  1;
  [10] 10, 10,  5, 30,  5,  2, 15, 70,  5, 30,   1;
  [11] 11, 11, 22, 33, 22, 55, 66, 77, 22, 33, 110, 1;
		

Crossrefs

Family: A374433 (intersection), this sequence (symmetric difference), A374435 (difference), A374436 (union).
Cf. A007947 (column 0), A000034 (central terms), A050873 (gcd).

Programs

  • Maple
    PF := n -> ifelse(n = 0, {}, NumberTheory:-PrimeFactors(n)):
    A374434 := (n, k) -> mul(symmdiff(PF(n), PF(k))):
    seq(print(seq(A374434(n, k), k = 0..n)), n = 0..11);
  • Mathematica
    nn = 12; Do[Set[s[i], FactorInteger[i][[All, 1]]], {i, 0, nn}]; s[0] = {1}; Table[Times @@ SymmetricDifference[s[k], s[n]], {n, 0, nn}, {k, 0, n}] // Flatten (* Michael De Vlieger, Jul 11 2024 *)
  • Python
    # Function A374434 defined in A374433.
    for n in range(11): print([A374434(n, k) for k in range(n + 1)])

Formula

From Michael De Vlieger, Jul 11 2024: (Start)
T(0,0) = T(n,0) = rad(n)/rad(0) = 1 where rad = A007947;
T(n,k) = rad(k*n)/rad(gcd(k,n))
= A007947(k*n)/A007947(S(n,k)) where S = A050873
= A374436(n,k)/A374433(n,k). (End)

A345418 Table read by upward antidiagonals: Given m, n >= 1, write gcd(prime(m),prime(n)) as d = u*prime(m)+v*prime(n) where u, v are minimal; T(m,n) = v.

Original entry on oeis.org

1, -1, 1, -2, 1, 1, -3, 2, -1, 1, -5, -2, 1, 1, 1, -6, 4, 3, -2, -1, 1, -8, -4, -2, 1, 1, 1, 1, -9, 6, -5, -3, 2, 2, -1, 1, -11, -6, 7, 2, 1, -1, -2, 1, 1, -14, 8, 4, 5, 6, -5, -2, -1, -1, 1, -15, 10, -9, -8, -3, 1, 2, 3, 2, -1, 1, -18, -10, 6, 10, 7, 4, -3, -4, -3, -1, 1, 1
Offset: 1

Views

Author

N. J. A. Sloane, Jun 19 2021

Keywords

Comments

The gcd is 1 unless m=n when it is m; u is given in A345417. Minimal means minimize u^2+v^2. We follow Maple, PARI, etc., in setting u=0 and v=1 when m=n. If we ignore the diagonal, the v table is the transpose of the u table.

Examples

			The u table (A345417) begins:
[0, -1, -2, -3, -5, -6, -8, -9, -11, -14, -15, -18, -20, -21, -23, -26]
[1,  0,  2, -2,  4, -4,  6, -6,   8,  10, -10, -12,  14, -14,  16,  18]
[1, -1,  0,  3, -2, -5,  7,  4,  -9,   6,  -6,  15,  -8, -17,  19, -21]
[1,  1, -2,  0, -3,  2,  5, -8,  10,  -4,   9,  16,   6,  -6, -20, -15]
[1, -1,  1,  2,  0,  6, -3,  7,  -2,   8, -14, -10,  15,   4, -17, -24]
[1,  1,  2, -1, -5,  0,  4,  3,  -7,   9,  12, -17,  19,  10, -18,  -4]
[1, -1, -2, -2,  2, -3,  0,  9,  -4,  12,  11, -13, -12,  -5, -11,  25]
[1,  1, -1,  3, -4, -2, -8,  0,  -6,  -3, -13,   2,  13,  -9,   5,  14]
[1, -1,  2, -3,  1,  4,  3,  5,   0,  -5,  -4,  -8, -16,  15,  -2, -23]
[1, -1, -1,  1, -3, -4, -7,  2,   4,   0,  15, -14,  17,   3,  13,  11]
[1,  1,  1, -2,  5, -5, -6,  8,   3, -14,   0,   6,   4, -18,  -3,  12]
[1,  1, -2, -3,  3,  6,  6, -1,   5,  11,  -5,   0,  10,   7,  14, -10]
...
The v table (this entry) begins:
[  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]
[ -2,   2,  1, -2,   1,   2,  -2,  -1,  2,  -1,   1, -2,   1,  2,  -2,  2]
[ -3,  -2,  3,  1,   2,  -1,  -2,   3, -3,   1,  -2, -3,  -1,  1,   3,  2]
[ -5,   4, -2, -3,   1,  -5,   2,  -4,  1,  -3,   5,  3,  -4, -1,   4,  5]
[ -6,  -4, -5,  2,   6,   1,  -3,  -2,  4,  -4,  -5,  6,  -6, -3,   5,  1]
[ -8,   6,  7,  5,  -3,   4,   1,  -8,  3,  -7,  -6,  6,   5,  2,   4, -8]
[ -9,  -6,  4, -8,   7,   3,   9,   1,  5,   2,   8, -1,  -6,  4,  -2, -5]
[-11,   8, -9, 10,  -2,  -7,  -4,  -6,  1,   4,   3,  5,   9, -8,   1, 10]
[-14,  10,  6, -4,   8,   9,  12,  -3, -5,   1, -14, 11, -12, -2,  -8, -6]
[-15, -10, -6,  9, -14,  12,  11, -13, -4,  15,   1, -5,  -3, 13,   2, -7]
[-18, -12, 15, 16, -10, -17, -13,   2, -8, -14,   6,  1,  -9, -6, -11,  7]
...
		

Crossrefs

A051194 Triangular array T read by rows: T(n,k) = number of positive integers that divide both n and k.

Original entry on oeis.org

1, 1, 2, 1, 1, 2, 1, 2, 1, 3, 1, 1, 1, 1, 2, 1, 2, 2, 2, 1, 4, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 3, 1, 2, 1, 4, 1, 1, 2, 1, 1, 2, 1, 1, 3, 1, 2, 1, 2, 2, 2, 1, 2, 1, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 2, 3, 1, 4, 1, 3, 2, 2, 1, 6, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2
Offset: 1

Views

Author

Keywords

Comments

The function T(n,k) is defined for all integer n, k but only the values for 1<=k<=n as a triangular array are listed here.

Examples

			Triangle begins:
{1};
{1,2};
{1,1,2};
{1,2,1,3};
{1,1,1,1,2};
{1,2,2,2,1,4};
...
		

Crossrefs

Cf. A050873 (gcd), A000005 (number of divisors), A077478 (as square array).
Sum of numbers in row n matches A000203. Sum of numbers in first n rows matches A024916.

Programs

  • Mathematica
    T[ n_, k_] := Length[Intersection[Divisors @ If[n == 0, 1, n], Divisors @ If[k == 0, 1, k]]] (* Michael Somos, Jul 18 2011 *)
  • PARI
    {T(n, k) = sum( i=1, min( abs(n), abs(k)),(n%i == 0) && (k%i == 0))} /* Michael Somos, Jul 18 2011 */

Formula

T(n,k) = A000005(A050873(n,k)). - Reinhard Zumkeller, Jun 28 2010
T(n,k) = T(k,n) = T(-n,k) = T(n,-k) = T(n,n+k) = T(n+k,k). - Michael Somos, Jul 18 2011
Previous Showing 31-40 of 52 results. Next