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 41-50 of 52 results. Next

A093057 Triangle T(j,k) read by rows, where T(j,k) = number of matrix elements remaining at fixed position in the in-situ transposition of a rectangular j X k matrix (singleton cycles).

Original entry on oeis.org

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

Views

Author

Hugo Pfoertner, Mar 22 2004

Keywords

Comments

Elements (1,1) and (j,k) which always remain at their old position are not counted. See A093055 for details of storage, another example, references and links.

Examples

			a(8)=T(3,5)=1 because there is one fixed element at position 8 in the transposition from
(1 2 3 4 5)(6 7 8 9 10)(11 12 13 14 15) ->
(1 6 11)(2 7 12)(3 8 13)(4 9 14)(5 10 15). The fixed first and last elements 1 and 15 are not counted.
		

Crossrefs

Cf. A093055 number of non-singleton cycles, A093056 length of longest cycle, A050873 GCD(u, v).

Formula

T(j, k)=gcd(j-1, k-1)-1.

A132726 Triangle read by rows: T(n,k) = length of period in decimal representation of k/n, 1<=k<=n.

Original entry on oeis.org

0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0, 6, 6, 6, 6, 6, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 0, 6, 6, 6, 6, 6, 6, 0, 6, 6, 6, 6, 6, 6, 0
Offset: 1

Views

Author

Reinhard Zumkeller, Aug 27 2007

Keywords

Comments

T(n,1) = A051626(n); T(n,n) = 0;
T(n,k) = T(1,k/A050873(n,k));
T(n,k) = T(n,A132740(k)), 1<=k<=n;
T(A003592(n),k) = 0, 1<=k<=A003592(n).

A136527 Triangle read by rows: T(n,k) = greatest common divisor of n-th and k-th composite number, 1<=k<=n.

Original entry on oeis.org

4, 2, 6, 4, 2, 8, 1, 3, 1, 9, 2, 2, 2, 1, 10, 4, 6, 4, 3, 2, 12, 2, 2, 2, 1, 2, 2, 14, 1, 3, 1, 3, 5, 3, 1, 15, 4, 2, 8, 1, 2, 4, 2, 1, 16, 2, 6, 2, 9, 2, 6, 2, 3, 2, 18, 4, 2, 4, 1, 10, 4, 2, 5, 4, 2, 20, 1, 3, 1, 3, 1, 3, 7, 3, 1, 3, 1, 21, 2, 2, 2, 1, 2, 2, 2, 1, 2, 2, 2, 1, 22, 4, 6, 8, 3, 2, 12, 2, 3, 8, 6, 4, 3, 2, 24
Offset: 1

Views

Author

Reinhard Zumkeller, Jan 03 2008

Keywords

Examples

			4;
2, 6;
4, 2, 8;
1, 3, 1, 9;
2, 2, 2, 1, 10;
...
		

Crossrefs

Programs

  • Mathematica
    nmax = 14;
    A002808 = Select[Range[FindRoot[n == nmax + PrimePi[n] + 1, {n, nmax, 2nmax}][[1, 2]] // Ceiling], CompositeQ];
    T[n_, k_] := GCD[A002808[[n]], A002808[[k]]];
    Table[T[n, k], {n, 1, nmax}, {k, 1, n}] // Flatten (* Jean-François Alcover, Nov 15 2021 *)

Formula

T(n,k) = A050873(A002808(n),A002808(k));
A073783(n) = T(n-1,n) for n>1;
A002808(n) = T(n,n).

A141256 An Okazaki-like composition, see A126759.

Original entry on oeis.org

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

Views

Author

Reinhard Zumkeller, Jun 17 2008

Keywords

Comments

a(5*n) = a(3*n) = a(2*n) = a(n);
for n with GCD(n,30)=1: a(n+30*k)=a(n)+8*k, note: 30=2*3*5,
A000010(30)=8;
for k>1: a(A007775(k-1))=k and a(m)A007775(k-1).

Formula

a(n) = if n=0 then 1 else if GCD(n,30)>1 then a(LPD(n)) else 2*floor(n/30) + (if n mod 30 = 1 then 2 else IP(n)-1), with IP=A049084, LPD=A032742 and GCD=A050873.

A320043 Row sums of the triangle A322550.

Original entry on oeis.org

1, 6, 13, 50, 37, 196, 189, 384, 351, 1210, 601, 2366, 1471, 2156, 2941, 6936, 3277, 10830, 5563, 9022, 9681, 23276, 9897, 26300, 19267, 30030, 23043, 58870, 21087, 76880, 46717, 59296, 57801, 83546, 50281, 156066, 90973, 117968, 90539, 235340, 86179, 284746
Offset: 1

Views

Author

Stefano Spezia, Dec 16 2018

Keywords

Comments

Conjecture: a(n) is not a perfect square except for n = 1, 6 and 96.

Crossrefs

Programs

  • GAP
    List([1..50], n->Sum([1..n], k->(n+1-k)^2*k/GcdInt(n+1-k,k)^3));
    
  • Magma
    [(&+[(n+1-k)^2*k/Gcd(n+1-k,k)^3: k in [1..n]]): n in [1..50]];
    
  • Maple
    a := n -> sum((n+1-k)^2*k/gcd(n+1-k, k)^3, k = 1 .. n): seq(a(n), n = 1 .. 50);
  • Mathematica
    a[n_]:=Sum[(n+1-k)^2*k/GCD[n+1-k,k]^3, {k, 1, n}]; Array[a, 50]
  • Maxima
    a(n):=sum((n+1-k)^2*k/gcd(n+1-k,k)^3, k, 1, n)$ makelist(a(n), n, 1, 50);
    
  • PARI
    a(n) = sum(k=1, n, (n+1-k)^2*k/gcd(n+1-k,k)^3);
    vector(50, n, a(n))

Formula

a(n) = Sum_{k=1..n} (n + 1 - k)^2*k/gcd(n + 1 - k, k)^3.
a(n) = Sum_{k=1..n} A000290(n + 1 - k)*A000027(k)/A000578(A050873(n + 1 - k, k)).

A322482 Table read by downward antidiagonals: T(n,k) is the greatest divisor of n which is a unitary divisor of k.

Original entry on oeis.org

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

Views

Author

Amiram Eldar, Dec 11 2018

Keywords

Comments

This relation was defined by Cohen in 1960.
The common notation for T(n,k) is (n,k)*.
If T(n,k) = 1 then n is said to be semi-prime to k.
In general T(n,k) != T(k,n).
The relation is used to define semi-unitary divisors (A322483).

Examples

			The table starts
  1  1  1  1  1  1  1  1  1  1 ...
  1  2  1  1  1  2  1  1  1  2 ...
  1  1  3  1  1  3  1  1  1  1 ...
  1  2  1  4  1  2  1  1  1  2 ...
  1  1  1  1  5  1  1  1  1  5 ...
  1  2  3  1  1  6  1  1  1  2 ...
  1  1  1  1  1  1  7  1  1  1 ...
  1  2  1  4  1  2  1  8  1  2 ...
  1  1  3  1  1  3  1  1  9  1 ...
  1  2  1  1  5  2  1  1  1 10 ...
  ...
The triangle formed by the antidiagonals starts
  1
  1 1
  1 2 1
  1 1 1 1
  1 1 3 2 1
  1 1 1 1 1 1
  1 2 1 4 1 2 1
  1 1 3 1 1 3 1 1
  1 1 1 2 5 1 1 2 1
  ...
		

References

  • J. Sandor and B. Crstici, Handbook of Number Theory, II, Springer Verlag, 2004, chapter 3.6, pp. 281.

Crossrefs

Cf. A050873 (gcd), A165430 (unitary gcd).

Programs

  • Mathematica
    udiv[n_] := Select[Divisors[n], GCD[#,n/#] == 1 &]; semiuGCD[a_, b_] := Max[ Intersection[Divisors[a], udiv[b]]]; Table[semiuGCD[n, k], {n,1,20}, {k, n-1, 1, -1 }] // Flatten
  • PARI
    udivisors(n) = {my(d=divisors(n)); select(x->(gcd(x, n/x)==1), d);}
    T(n,k) = {my(dn = divisors(n), udk = udivisors(k)); vecmax(setintersect(dn, udk));} \\ Michel Marcus, Dec 14 2018

Formula

T(1,n) = T(n,1) = 1.
T(n,n) = n.

A322550 Table read by ascending antidiagonals: T(n, k) is the minimum number of cubes necessary to fill a right square prism with base area n^2 and height k.

Original entry on oeis.org

1, 4, 2, 9, 1, 3, 16, 18, 12, 4, 25, 4, 1, 2, 5, 36, 50, 48, 36, 20, 6, 49, 9, 75, 1, 45, 3, 7, 64, 98, 4, 100, 80, 2, 28, 8, 81, 16, 147, 18, 1, 12, 63, 4, 9, 100, 162, 192, 196, 180, 150, 112, 72, 36, 10, 121, 25, 9, 4, 245, 1, 175, 2, 3, 5, 11, 144, 242, 300, 324, 320, 294, 252, 200, 144, 90, 44, 12
Offset: 1

Views

Author

Stefano Spezia, Dec 15 2018

Keywords

Examples

			The table T starts in row n = 1 with columns k >= 1 as:
   1     2     3     4     5     6     7     8     9 ...
   4     1    12     2    20     3    28     4    36 ...
   9    18     1    36    45     2    63    72     3 ...
  16     4    48     1    80    12   112     2   144 ...
  25    50    75   100     1   150   175   200   225 ...
  36     9     4    18   180     1   252    36    12 ...
  49    98   147   196   245   294     1   392   441 ...
  64    16   192     4   320    48   448     1   576 ...
  81   162     9   324   405    18   567   648     1 ...
...
The triangle X(n, k) begins
  n\k|   1     2     3     4     5     6     7     8     9
  ---+----------------------------------------------------
   1 |   1
   2 |   4     2
   3 |   9     1     3
   4 |  16    18    12     4
   5 |  25     4     1     2     5
   6 |  36    50    48    36    20     6
   7 |  49     9    75     1    45     3     7
   8 |  64    98     4   100    80     2    28     8
   9 |  81    16   147    18     1    12    63     4     9
...
		

Crossrefs

Cf. A000012 (main diagonal of the table), A000027 (1st row of the table or diagonal of the triangle), A000290 (k=1), A000578, A011379 (superdiagonal of the table), A045991 (subdiagonal of the table), A050873, A119619, A320043 (row sums of the triangle).

Programs

  • GAP
    Flat(List([1..12], n->List([1..n], k->(n+1-k)^2*k/GcdInt(n+1-k,k)^3)));
    
  • Magma
    [[(n+1-k)^2*k/Gcd(n+1-k,k)^3: k in [1..n]]: n in [1..12]]; // triangle output
    
  • Maple
    a := (n, k) -> (n+1-k)^2*k/gcd(n+1-k, k)^3: seq(seq(a(n, k), k = 1 .. n), n = 1 .. 12)
  • Mathematica
    T[n_,k_]:=n^2*k/GCD[n,k]^3; Flatten[Table[T[n-k+1,k], {n, 12}, {k, n}]]
  • Maxima
    sjoin(v, j) := apply(sconcat, rest(join(makelist(j, length(v)), v)))$ display_triangle(n) := for i from 1 thru n do disp(sjoin(makelist((i+1-j)^2*j/gcd(i+1-j,j)^3, j, 1, i), " ")); display_triangle(12);
    
  • PARI
    T(n, k) = (n+1-k)^2*k/gcd(n+1-k,k)^3;
    tabl(nn) = for(i=1, nn, for(j=1, i, print1(T(i, j), ", ")); print);
    tabl(12) \\ triangle output

Formula

T(n, k) = n^2*k/gcd(n, k)^3.
T(n, k) = A000290(n)*k/A000578(A050873(n,k)).
X(n, k) = T(n + 1 - k, k).
X(2*n - 1, n) = A000012(n).
Product_{k=1..n} X(n, k)^(1/3) = A119619(n+1). - Stefano Spezia, Jun 24 2024

A384245 Triangle read by rows: T(n, k) for 1 <= k <= n is the largest divisor of k that is an infinitary divisor of n.

Original entry on oeis.org

1, 1, 2, 1, 1, 3, 1, 1, 1, 4, 1, 1, 1, 1, 5, 1, 2, 3, 2, 1, 6, 1, 1, 1, 1, 1, 1, 7, 1, 2, 1, 4, 1, 2, 1, 8, 1, 1, 1, 1, 1, 1, 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, 1, 3, 4, 1, 3, 1, 4, 3, 1, 1, 12, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 13
Offset: 1

Views

Author

Amiram Eldar, May 23 2025

Keywords

Comments

First differs from A384047 at n = 30.

Examples

			Triangle begins:
  1
  1, 2
  1, 1, 3
  1, 1, 1, 4
  1, 1, 1, 1, 5
  1, 2, 3, 2, 1, 6
  1, 1, 1, 1, 1, 1, 7
  1, 2, 1, 4, 1, 2, 1, 8
  1, 1, 1, 1, 1, 1, 1, 1, 9
  1, 2, 1, 2, 5, 2, 1, 2, 1, 10
		

Crossrefs

Cf. A050873, A064379, A077609, A384047, A384246 (positions of 1's).

Programs

  • Mathematica
    infdivs[n_] := If[n == 1, {1}, Sort@ Flatten@ Outer[Times, Sequence @@ (FactorInteger[n] /. {p_, m_Integer} :> p^Select[Range[0, m], BitOr[m, #] == m &])]];  (* Michael De Vlieger at A077609 *)
    T[n_, k_] := Max[Intersection[infdivs[n], Divisors[k]]];
    Table[T[n, k], {n, 1, 13}, {k, 1, n}] // Flatten
  • PARI
    isidiv(d, f) = {if (d==1, return (1)); for (k=1, #f~, bne = binary(f[k, 2]); bde = binary(valuation(d, f[k, 1])); if (#bde < #bne, bde = concat(vector(#bne-#bde), bde)); for (j=1, #bne, if (! bne[j] && bde[j], return (0)); ); ); return (1); }
    infdivs(n) = {my(f = factor(n), d = divisors(f), idiv = []); for (k=1, #d, if (isidiv(d[k], f), idiv = concat(idiv, d[k])); ); idiv; } \\ Michel Marcus at A077609
    T(n, k) = vecmax(setintersect(infdivs(n), divisors(k)));

A137324 a(n) = Sum_{prime p < n} gcd(n,p).

Original entry on oeis.org

1, 3, 2, 6, 3, 5, 6, 9, 4, 8, 5, 13, 12, 7, 6, 10, 7, 13, 16, 19, 8, 12, 13, 22, 11, 16, 9, 17, 10, 12, 23, 28, 21, 14, 11, 31, 26, 17, 12, 22, 13, 25, 20, 37, 14, 18, 21, 20, 33, 28, 15, 19, 30, 23, 36, 45, 16, 24, 17, 49, 26, 19, 34, 31, 18, 36, 43, 30, 19, 23, 20, 58, 27, 40, 37
Offset: 3

Views

Author

Max Sills, Apr 06 2008

Keywords

Examples

			a(10) = 9 because gcd(10,2) = 2, gcd(10,3) = 1, gcd(10,5) = 5, gcd(10,7) = 1; 2 + 1 + 5 + 1 = 9.
The underlying irregular table of gcd(n,2), gcd(n,3), gcd(n,5), gcd(n,7), etc., for which a(n) provides row sums, is obtained by deleting columns from A050873(n,k) and looks as follows for n=3,4,5,...:
  1
  2 1
  1 1
  2 3 1
  1 1 1
  2 1 1 1
  1 3 1 1
  2 1 5 1
  1 1 1 1
  2 3 1 1 1
  1 1 1 1 1
  2 1 1 7 1 1
  1 3 5 1 1 1
  2 1 1 1 1 1
  1 1 1 1 1 1
  2 3 1 1 1 1 1
  1 1 1 1 1 1 1
  2 1 5 1 1 1 1 1
		

Crossrefs

Programs

  • Magma
    [&+[Gcd(n,p):p in PrimesInInterval(1,n-1)]:n in [3..77]]; // Marius A. Burtea, Aug 07 2019
    
  • Maple
    A137324 := proc(n) local a,i; a :=0 ; for i from 1 to numtheory[pi](n-1) do a := a+gcd(n,ithprime(i)) ; od: a; end: seq(A137324(n),n=3..80) ; # R. J. Mathar, Apr 09 2008
  • Mathematica
    Table[Plus @@ GCD[n, Select[Range[n - 1], PrimeQ[ # ] &]], {n, 3, 70}] (* Stefan Steinerberger, Apr 09 2008 *)
  • PARI
    a(n) = sum(k=1, n-1, gcd(n,k)*isprime(k)); \\ Michel Marcus, Nov 07 2014
    
  • Python
    from math import gcd
    from sympy import primerange
    def a(n): return sum(gcd(n, p) for p in primerange(1, n))
    print([a(n) for n in range(3, 78)]) # Michael S. Branicky, Nov 21 2021

Formula

a(p) = A000720(p) - 1 for prime p. - R. J. Mathar, Apr 09 2008
a(n) = A048865(n) + A105221(n). - Wesley Ivan Hurt, Nov 21 2021

Extensions

Corrected and extended by R. J. Mathar and Stefan Steinerberger, Apr 09 2008

A350900 Triangle read by rows: T(n, k) = Sum_{i=1..n} gcd(i,n) / gcd(gcd(i,k),n) for 1 <= k <= n.

Original entry on oeis.org

1, 3, 2, 5, 5, 3, 8, 5, 8, 4, 9, 9, 9, 9, 5, 15, 10, 9, 10, 15, 6, 13, 13, 13, 13, 13, 13, 7, 20, 12, 20, 9, 20, 12, 20, 8, 21, 21, 11, 21, 21, 11, 21, 21, 9, 27, 18, 27, 18, 15, 18, 27, 18, 27, 10, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 11, 40, 25, 24, 20, 40, 15, 40, 20, 24, 25, 40, 12
Offset: 1

Views

Author

Werner Schulte, Jan 21 2022

Keywords

Comments

Subtriangle (triangle without main diagonal) is symmetrical.
Conjecture: Let f be an arbitrary arithmetic function. Define for n > 0 the sequence a(f; n) = Sum_{i=1..n, k=1..n} f(gcd(i,n)/gcd(gcd(i,k),n)); a(f; n) equals Dirichlet convolution of f(n)*A000010(n) and A057660(n); if f is multiplicative, then a(f; n) is multiplicative; row sums of this triangle use f(n) = n (see formula section).

Examples

			The triangle T(n, k) for 1 <= k <= n starts:
n \k :   1   2   3   4   5   6   7   8   9  10  11  12
======================================================
   1 :   1
   2 :   3   2
   3 :   5   5   3
   4 :   8   5   8   4
   5 :   9   9   9   9   5
   6 :  15  10   9  10  15   6
   7 :  13  13  13  13  13  13   7
   8 :  20  12  20   9  20  12  20   8
   9 :  21  21  11  21  21  11  21  21   9
  10 :  27  18  27  18  15  18  27  18  27  10
  11 :  21  21  21  21  21  21  21  21  21  21  11
  12 :  40  25  24  20  40  15  40  20  24  25  40  12
  etc.
		

Crossrefs

Row sums gives A373059.

Programs

  • PARI
    T(n, k) = sum(i=1, n, gcd(i,n) / gcd(gcd(i,k),n));
    row(n) = vector(n, k, T(n,k)); \\ Michel Marcus, Jan 22 2022

Formula

T(n, 1) = A018804(n); T(n, n) = n.
T(n, k) = T(n, n-k) for 1 <= k < n.
Conjecture: Row sums equal Dirichlet convolution of A002618 and A057660.
Previous Showing 41-50 of 52 results. Next