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-4 of 4 results.

A081518 Final term in row n of A081520.

Original entry on oeis.org

1, 2, 6, 6, 20, 8, 42, 14, 24, 15, 110, 16, 156, 22, 30, 30, 272, 26, 342, 32, 48, 38, 506, 34, 120, 46, 78, 48, 812, 39, 930, 62, 81, 62, 110, 52, 1332, 70, 99, 65, 1640, 57, 1806, 78, 95, 86, 2162, 70, 336, 82, 135, 94, 2756, 80, 198, 96, 152, 110, 3422, 81, 3660, 118
Offset: 1

Views

Author

Amarnath Murthy, Mar 27 2003

Keywords

Comments

a(p) = p(p-1) if p is a prime.
a(p^k) = p (p^k - 1) if p is a prime and k >= 1. - Robert Israel, May 21 2015

Crossrefs

Programs

  • Maple
    A:= n -> select(t->igcd(t,n)>1,[$1..n^2])[n-1]:
    1, seq(A(n),n=2..100); # Robert Israel, May 21 2015
  • Mathematica
    Table[Join[{1}, Select[Range[n^2], GCD[n, #] > 1 &, n - 1]][[-1]], {n, 1, 60}](* Ivan Neretin, May 21 2015 *)

Extensions

More terms from Ryan Propper, Nov 05 2005

A081519 Sum of terms in row n of A081520.

Original entry on oeis.org

1, 3, 10, 13, 51, 24, 148, 57, 109, 77, 606, 100, 1015, 161, 226, 241, 2313, 231, 3250, 318, 493, 425, 5820, 415, 1501, 605, 1054, 664, 11775, 593, 14416, 993, 1344, 1061, 1896, 946, 24643, 1337, 1931, 1302, 33621, 1204, 38830, 1737, 2124, 1985, 50808
Offset: 1

Views

Author

Amarnath Murthy, Mar 27 2003

Keywords

Comments

a(p) = p^2*(p-1)/2 + 1, p is prime.
a(p^k) = p^(k+1)*(p^k-1)/2 + 1 if p is prime and k >= 1. - Robert Israel, May 21 2015

Crossrefs

Programs

  • Maple
    A:= proc(n) local L;
      L:= select(t->igcd(t,n)>1,[$1..n^2])[1 .. n-1];
      1+convert(L,`+`)
    end proc:
    seq(A(n),n=1..100); # Robert Israel, May 21 2015
  • Mathematica
    Table[Plus @@ Join[{1}, Select[Range[n^2], GCD[n, #] > 1 &, n - 1]], {n, 1, 47}](* Ivan Neretin, May 21 2015 *)

Extensions

More terms from Ryan Propper, Nov 05 2005

A121998 Table, n-th row gives numbers between 1 and n that have a common factor with n.

Original entry on oeis.org

2, 3, 2, 4, 5, 2, 3, 4, 6, 7, 2, 4, 6, 8, 3, 6, 9, 2, 4, 5, 6, 8, 10, 11, 2, 3, 4, 6, 8, 9, 10, 12, 13, 2, 4, 6, 7, 8, 10, 12, 14, 3, 5, 6, 9, 10, 12, 15, 2, 4, 6, 8, 10, 12, 14, 16, 17, 2, 3, 4, 6, 8, 9, 10, 12, 14, 15, 16, 18, 19, 2, 4, 5, 6, 8, 10, 12, 14, 15, 16, 18, 20, 3, 6, 7, 9, 12, 14, 15
Offset: 2

Views

Author

Keywords

Comments

Row n contains numbers m <= n such that gcd(m,n) > 1, i.e., numbers m in the cototient of n. - Michael De Vlieger, Mar 13 2018

Examples

			2;
3;
2,4;
5;
2,3,4,6;
7;
...
		

Crossrefs

Cf. A051953 (row lengths), A038566, A081520, A133995 (nondivisors in the cototient of n).

Programs

  • Mathematica
    Table[Select[Range@ n, ! CoprimeQ[#, n] &], {n, 20}] // Flatten (* Michael De Vlieger, Mar 13 2018 *)

A297934 Triangular array T(n, k), read by rows: least common prime factor of n and k, or 0 if n and k are coprime.

Original entry on oeis.org

0, 2, 0, 0, 0, 0, 2, 3, 2, 0, 0, 0, 0, 0, 0, 2, 0, 2, 0, 2, 0, 0, 3, 0, 0, 3, 0, 0, 2, 0, 2, 5, 2, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 2, 0, 2, 0, 2, 3, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 2, 0, 2, 7, 2, 0, 2, 0, 2, 0, 0, 3, 0, 5, 3, 0, 0, 3, 5
Offset: 3

Views

Author

Felix Fröhlich, Jan 09 2018

Keywords

Comments

n is prime (A000040) if and only if Sum_{i=2..n-1} T(n, i) = 0.
n is a prime power (A025475) if and only if for any two x, y such that both T(n, x), T(n, y) > 0 also T(n, x) = T(n, y).

Examples

			============================================================
. n \ k |  2   3   4   5   6   7   8   9  10  11  12  13  14
--------|---------------------------------------------------
.   3   |  0
.   4   |  2   0
.   5   |  0   0   0
.   6   |  2   3   2   0
.   7   |  0   0   0   0   0
.   8   |  2   0   2   0   2   0
.   9   |  0   3   0   0   3   0   0
.  10   |  2   0   2   5   2   0   2   0
.  11   |  0   0   0   0   0   0   0   0   0
.  12   |  2   3   2   0   2   0   2   3   2   0
.  13   |  0   0   0   0   0   0   0   0   0   0   0
.  14   |  2   0   2   0   2   7   2   0   2   0   2   0
.  15   |  0   3   0   5   3   0   0   3   5   0   3   0   0
		

Crossrefs

Programs

  • Mathematica
    Table[If[CoprimeQ[n, k], 0, First@ Intersection[FactorInteger[n][[All, 1]], FactorInteger[k][[All, 1]] ]], {n, 3, 15}, {k, 2, n - 1}] // Flatten (* Michael De Vlieger, Jan 23 2018 *)
  • PARI
    t(n, k) = if(gcd(n, k) > 1, my(f=factor(n)[, 1]~, g=factor(k)[, 1]~); return(vecmin(setintersect(f, g)))); 0
    trianglerows(n) = for(x=3, n+2, for(y=2, x-1, print1(t(x, y), ", ")); print(""))
    trianglerows(13) \\ print upper 13 rows of triangle

Extensions

Value of T(12, 6) and PARI program corrected by Felix Fröhlich, Jan 23 2018
Showing 1-4 of 4 results.