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

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.

A333826 a(1)=1; for n>1, a(n) = the greatest common divisor (GCD) of n and the sum of all previous terms if the GCD is not already in the sequence; otherwise a(n) = a(n-1) + n.

Original entry on oeis.org

1, 3, 6, 2, 7, 13, 20, 4, 13, 23, 34, 46, 59, 73, 88, 8, 25, 43, 62, 10, 31, 53, 76, 100, 125, 151, 178, 206, 235, 15, 46, 78, 111, 145, 5, 41, 78, 116, 155, 195, 236, 278, 321, 365, 410, 456, 503, 551, 600, 50, 101, 153, 206, 260, 315, 371, 428, 486, 545, 605, 666, 728, 791, 855, 920, 986, 1053
Offset: 1

Views

Author

Scott R. Shannon, Sep 03 2020

Keywords

Comments

This is a variation of A337490; here we start with an offset of 1, so a(1) = 1. See that sequence for further details.
In the first 4212 terms the sequence decreases 69 times while 45 terms are repeated, the first being 13 at n=9 and the last 399876 at n=4212. After n(4166)=84 the sequence does not decrease again for n up to at least 100 million. The lowest numbers that have not appeared in that range are 30,37,47,48,49,51. The 100 millionth term is 4999999941527298.

Examples

			a(2) = 3 as the sum of all previous terms is a(1) = 1, and the GCD of 1 and 2 is 1. However 1 has already appeared so a(2) = a(1) + n = 1 + 2 = 3.
a(4) = 2 as the sum of all previous terms is a(1)+a(2)+a(3) = 10, and the GCD of 10 and 4 is 2, and as 2 has not previous appeared a(4) = 2.
a(8) = 4 as the sum of all previous terms is a(1)+...+a(7) = 52, and the GCD of 52 and 8 is 4, and as 4 has not previous appeared a(8) = 4.
		

Crossrefs

Cf. A337490 (same sequence rules but starting a(0)=1), A333980, A165430, A064814, A082299, A005132, A336957.

Programs

  • PARI
    lista(nn) = {my(va = vector(nn), s=0); va[1] = 1; s += va[1]; for (n=2, nn, my(g = gcd(n, s)); if (#select(x->(x==g), va), va[n] = va[n-1]+n, va[n] = g); s += va[n];); va;} \\ Michel Marcus, Sep 05 2020

A339557 a(0) = 0, a(1) = 1; for n > 1, a(n) = a(n-1) - n if a(n) is nonnegative, not already in the sequence, and gcd(a(n-1),n) > 1 or gcd(a(n-2),n) = 1. Otherwise a(n) = a(n-1) + n.

Original entry on oeis.org

0, 1, 3, 6, 2, 7, 13, 20, 12, 21, 31, 42, 30, 17, 31, 16, 32, 15, 33, 14, 34, 55, 77, 54, 78, 53, 79, 52, 24, 53, 83, 114, 82, 115, 149, 184, 148, 111, 149, 188, 228, 187, 229, 186, 142, 187, 233, 280, 232, 281, 331, 382, 330, 277, 331, 276, 220, 277, 335, 394, 334, 273, 335, 398, 462, 397
Offset: 0

Views

Author

Scott R. Shannon, Dec 08 2020

Keywords

Comments

This sequence is a variation of the Recamán sequence A005132 where the same rules apply except an additional restriction is added whereby a(n) = a(n-1) - n can occur only if gcd(a(n-1),n) > 1 or gcd(a(n-2),n) = 1, where gcd is the greatest common divisor. This additional restriction is inspired by the selection rules of A336957 and A098550.
The sequence shows large variations in its values; the bifurcated pattern typical of the Recamán sequence is present but there are regions where the terms rapidly spike up to huge values only to return to smaller values quickly again. For example after 37 million terms a value of ~1.6*10^12 is reached, but just after 41 million terms values below 10000 are again present. See the linked images.
It is unclear if all values are eventually visited; numerous small values like 4 and 5 have not occurred after 100 million terms.

Examples

			a(4) = 2. As gcd(a(3),4) = gcd(6,4) = 2 > 1, and as 6 - 4 = 2 has not occurred previously, a(4) = 2.
a(10) = 31. a(9) = 21, and 21 - 10 = 11 has not occurred previously. However as gcd(a(9),10) = gcd(21,10) = 1, and gcd(a(8),10) = gcd(12,10) = 2 > 1, both additional criteria for subtraction fail, thus a(10) = a(9) + 10 = 21 + 10 = 31. This is the first term which differs from the standard Recamán sequence A005132.
		

Crossrefs

Programs

  • Mathematica
    Block[{a = {0, 1}, k = 1}, Do[AppendTo[a, If[And[# > 0, FreeQ[a, #], Or[GCD[a[[-1]], i] > 1, GCD[a[[-2]], i] == 1 ]], #, a[[-1]] + i] &[a[[-1]] - i]], {i, 2, 10^4}]; a] (* Michael De Vlieger, Dec 09 2020 *)

A263118 Indices of the primitive friendly pairs in the sequence of friendly pairs (A050973, A050972) ordered by smallest maximal element.

Original entry on oeis.org

1, 3, 4, 5, 6, 10, 11, 18, 20, 29, 33, 70, 115, 116, 133, 136, 155, 156, 157, 212, 255, 360, 414, 468, 470, 477, 518, 519, 578, 771, 787, 830, 971, 1039, 1046, 1121, 1687, 1793, 2983, 3092, 3359, 3360, 3570, 4084, 4190, 4255, 5281, 7032, 7141, 7167, 8248, 8385, 8386, 8630, 8890
Offset: 1

Views

Author

Michel Marcus, Oct 10 2015

Keywords

Comments

Friends x and y are primitive friendly if and only if they have no common prime factor with the same multiplicity, that is, if A165430(x, y) = 1.

Examples

			The first pair (6, 28) is primitive since 6=2*3 and 28=2^2*7; their only common prime factor, 2, appears with different exponents, so 1 is a term.
The second pair (30, 140) is not primitive since 30=5*6 and 140=5*28; the prime factor 5 appears in each with the same exponent, so 2 is not a term.
		

Crossrefs

Programs

  • PARI
    udivs(n) = {my(d = divisors(n)); select(x->(gcd(x, n/x)==1), d);}
    ugcd(x,y) = vecmax(setintersect(udivs(x), udivs(y)));
    lista(vp, vg) = {for (n=1, #vp, if (ugcd(vp[n], vg[n])==1, print1(n, ", ")););} \\ where vp and vg are A050972 and A050973

Formula

A233039(n) = A050973(a(n)).

A263152 a(n) is the greatest common unitary divisor of the friendly pairs, A050972(n) and A050973(n).

Original entry on oeis.org

1, 5, 1, 1, 1, 1, 11, 13, 17, 1, 1, 19, 3, 23, 3, 25, 29, 1, 31, 1, 37, 41, 5, 43, 47, 7, 53, 3, 1, 55, 7, 2, 1, 59, 61, 9, 65, 67, 71, 9, 73, 11, 79, 83, 85, 11, 5, 5, 89, 11, 13, 95, 97, 101, 103, 13, 11, 107, 109, 113, 115, 4, 121, 17, 7, 125, 13, 127, 131
Offset: 1

Views

Author

Michel Marcus, Oct 11 2015

Keywords

Comments

Dividing both A050972(n) and A050973(n) by a "greater than 1" divisor of a(n), if any, will give a smaller friendly pair.
If a(n) is greater than 1, dividing both A050972(n) and A050973(n) will give a primitive friendly pair.

Examples

			The greatest common unitary divisor of the first friendly pair (6, 28) is 1, hence a(1) = 1.
		

Crossrefs

Cf. A165430 (greatest common unitary divisor).

Programs

  • PARI
    udivs(n) = {my(d = divisors(n)); select(x->(gcd(x, n/x)==1), d);}
    ugcd(x,y) = vecmax(setintersect(udivs(x), udivs(y)));
    lista(vp, vg) = {for (n=1, #vp, print1(ugcd(vp[n], vg[n])", ")); } \\ where vp and vg are A050972 and A050973

Formula

a(n) = A165430(A050972(n), A050973(n)).
a(A263118(n)) = 1, the primitive friendly pairs.

A275258 Toth's partial sum over the number of divisors of the greatest unitary divisor.

Original entry on oeis.org

1, 3, 4, 6, 6, 11, 8, 11, 11, 16, 12, 21, 14, 21, 23, 20, 18, 29, 20, 32, 30, 31, 24, 39, 27, 36, 30, 42, 30, 57, 32, 37, 45, 46, 47, 56, 38, 51, 52, 59, 42, 77, 44, 62, 63, 61, 48, 71, 51, 69, 67, 72, 54, 77, 70, 78, 74, 76, 60, 113, 62, 81, 83
Offset: 1

Views

Author

R. J. Mathar, Jul 21 2016

Keywords

Crossrefs

Programs

  • Maple
    A275258 := proc(n)
        local a,d ;
        a := 0 ;
        for  d in A077610(n) do
            a := a+A005361(d)*A275257(n/d,d) ;
        end do:
        a ;
    end proc:
    seq(A275258(n),n=1..80) ;
  • Mathematica
    beta[n_] := Times @@ Transpose[FactorInteger[n]][[2]]; phi[x_, n_] := Sum[Boole[ GCD[k, n] == 1 ], {k, 1, x}]; a[n_] := DivisorSum[n, beta[#] * phi[n/#, #] &, GCD[#, n/#] == 1 &]; Array[a, 100] (* Amiram Eldar, Sep 22 2019 *)

Formula

a(n) = Sum_{k=1..n} A000005( A165430(n,k) ).
Sum_{k=1..n} a(k) = c * n^2 / 2 + O(n * log(n)^2), where c = A065486. - Amiram Eldar, Dec 22 2023

A321613 Partial products of the unitary totient function (A047994): a(n) = Product_{k=1..n} uphi(k).

Original entry on oeis.org

1, 1, 2, 6, 24, 48, 288, 2016, 16128, 64512, 645120, 3870720, 46448640, 278691840, 2229534720, 33443020800, 535088332800, 4280706662400, 77052719923200, 924632639078400, 11095591668940800, 110955916689408000, 2441030167166976000, 34174422340337664000
Offset: 1

Views

Author

Amiram Eldar, Dec 19 2018

Keywords

Comments

a(n) is also the determinant of the symmetric n X n matrix M defined by M(i,j) = ugcd(i,j) for 1 <= i,j <= n, where ugcd(i,j) in the greatest common unitary divisor of i and j (A165430).
The unitary version of A001088.

Examples

			a(4) = uphi(1) * uphi(2) * uphi(3) * uphi(4) = 1 * 1 * 2 * 3 = 6.
		

Crossrefs

Programs

  • Mathematica
    uphi[1] = 1; uphi[n_] := Times @@ (-1 + Power @@@ FactorInteger[n]); FoldList[ Times, uphi /@ Range[50]]
  • PARI
    uphi(n) = my(f=factor(n)~); prod(i=1, #f, f[1, i]^f[2, i]-1); \\ A047994
    a(n) = prod(k=1, n, uphi(k)); \\ Michel Marcus, Dec 19 2018

A333716 a(0)=1; for n>0, a(n) is the greatest common divisor (GCD) of n and the sum of the previous terms back to the last GCD term, if the GCD is not already in the sequence; otherwise a(n) = a(n-1) + n.

Original entry on oeis.org

1, 2, 4, 7, 11, 5, 11, 18, 26, 3, 13, 24, 36, 49, 63, 78, 94, 111, 129, 148, 168, 189, 211, 234, 258, 283, 309, 336, 364, 393, 423, 454, 486, 519, 553, 588, 624, 661, 699, 738, 778, 819, 861, 43, 87, 132, 178, 225, 273, 322, 10, 61, 113, 166, 220, 275, 331, 388, 446, 505, 565
Offset: 0

Views

Author

Scott R. Shannon, Sep 03 2020

Keywords

Comments

This sequence is similar to A337490 except that here when a GCD term is added to the sequence the sum of previous terms is reset to the value of that GCD. Subsequent terms calculate the sum of previous terms back to this last GCD value. See the examples below.
Unlike A337490 this sequence shows numerous drops in value as the sum used when calculating the GCD with n is constantly being reset back to a smaller value anytime a unique GCD value greater than 1 is found. In the first one million terms the sequence drops in value 1516 times, the largest drop occurring from a(738133) = 45463489818 to a(738134) = 738134.

Examples

			a(4) = 11 as the sum of the previous terms is a(0)+...+a(3) = 14, and the GCD of 14 and 4 is 2. However 2 has already appeared so a(4) = a(3) + n = 7 + 4 = 11.
a(5) = 5 as the sum of all previous terms is a(0)+...+a(4) = 25, and the GCD of 25 and 5 is 5, and as 5 has not previously appeared a(5) = 5. As this term adds a GCD value to the sequence, the running sum of previous terms is now set to 5.
a(6) = 11 as the sum of previous terms is now just a(5) = 5, and as the GCD of 5 and 6 is 1, which already appears in the sequence, a(6) = a(5) + 6 = 5 + 6 = 11.
a(9) = 3 as the sum of previous terms back to the last GCD term is a(5)+...+a(8) = 60, and the GCD of 60 and 9 is 3, and as 3 has not previously appeared, a(9) = 3. As this term adds a GCD value to the sequence, the running sum of previous terms is now set to 3.
		

Crossrefs

Programs

  • Mathematica
    Block[{k = 0}, Nest[Append[#, If[FreeQ[#1, #3], Set[k, #2]; #3, #1[[-1]] + #2]] & @@ {#1, #2, GCD[Total@ #1[[k + 1 ;; #2]], #2]} & @@ {#, Length@ #} &, {1}, 60]] (* Michael De Vlieger, Sep 20 2020 *)

A384244 Triangle in which the n-th row gives the numbers k from 1 to n such that the greatest common unitary divisor of k and n is 1.

Original entry on oeis.org

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

Views

Author

Amiram Eldar, May 23 2025

Keywords

Examples

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

Crossrefs

The bi-unitary analog of A038566.
Cf. A116550 (row lengths), A200723 (row sums), A077610, A089912, A165430, A225174, A064379 (infinitary analog), A384046 (unitary analog).

Programs

  • Mathematica
    udiv[n_] := Select[Divisors[n], CoprimeQ[#, n/#] &];
    ugcd[n_, m_] := Max[Intersection[udiv[n], udiv[m]]];
    row[n_] := Select[Range[n], ugcd[n, #] == 1 &]; Array[row, 15] // Flatten
  • PARI
    udiv(n) = select(x -> gcd(x, n/x) == 1, divisors(n));
    ugcd(n, m) = vecmax(setintersect(udiv(n), udiv(m)));
    row(n) = select(x -> ugcd(n, x) == 1, vector(n, i, i));
Previous Showing 11-19 of 19 results.