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

A352483 Numerator of 1/d - 1/n = (n-d)/(n*d) where d is the number of divisors of n (A000005).

Original entry on oeis.org

0, 0, 1, 1, 3, 1, 5, 1, 2, 3, 9, 1, 11, 5, 11, 11, 15, 1, 17, 7, 17, 9, 21, 1, 22, 11, 23, 11, 27, 11, 29, 13, 29, 15, 31, 1, 35, 17, 35, 1, 39, 17, 41, 19, 13, 21, 45, 19, 46, 11, 47, 23, 51, 23, 51, 3, 53, 27, 57, 1, 59, 29, 19, 57, 61, 29, 65, 31, 65, 31, 69, 5, 71, 35, 23, 35, 73
Offset: 1

Views

Author

Michel Marcus, Mar 18 2022

Keywords

Crossrefs

Cf. A000005, A049820, A065091, A146566, A352482 (denominator).

Programs

  • Mathematica
    a[n_] := Numerator[1/DivisorSigma[0, n] - 1/n]; Array[a, 100] (* Amiram Eldar, Apr 13 2022 *)
  • PARI
    a(n) = my(d=numdiv(n)); denominator(n*d/(n-d));
    
  • PARI
    apply( {A352483(n)=numerator(1/numdiv(n)-1/n)}, [3..99]) \\ M. F. Hasler, Apr 07 2022

Formula

From Bernard Schott, Mar 23 2022: (Start)
a(n) = 1 iff n is in A146566.
a(n) = n - 2 iff n is an odd prime (A065091). (End)
From M. F. Hasler, Apr 06 2022: (Start)
More generally, explaining the "rays" visible in the graph:
a(n) = n - d with d = 2^w if n is the product of w distinct odd primes, and with d = e+1 if n = p^e, prime p not dividing e+1.
a(n) = n/2 - d with d = 3 if n = 4*p, prime p > 3, and with d = 2^w if n = 2*k where k is the product of w distinct odd primes.
a(n) = n/3 - 2^w if n = 3*p^2 with prime p > 3, w = 1, or if n = 9*k where k is the product of w distinct primes > 3.
a(n) = n/5 - d with d = 2 if n = 5^4*p, odd prime p <> 5, or with d = 4 if n = 3^4*5*p, prime p > 5, not p == 4 (mod 5).
a(n) = n/6 - d with d = 2 if n = 18*p, or with d = 4 if n = 18*p^3 or 18*p*q, primes q > p > 3.
a(n) = (p - 1)/2^m if n = 8*p, where m = max { m <= 3 : 2^m divides p-1 } = min {valuation(p-1, 2), 3}.
a(n) = (n - 12)/9 if n = 3*p^2*q, p and q distinct primes > 3 and q == 1 (mod 3). (End)

Extensions

Definition changed to include indices 1 and 2 by M. F. Hasler, Apr 07 2022

A352482 Denominator of (n-d)/n*d where d = A000005(n) is the number of divisors of n.

Original entry on oeis.org

1, 1, 6, 12, 10, 12, 14, 8, 9, 20, 22, 12, 26, 28, 60, 80, 34, 9, 38, 60, 84, 44, 46, 12, 75, 52, 108, 84, 58, 120, 62, 96, 132, 68, 140, 12, 74, 76, 156, 10, 82, 168, 86, 132, 90, 92, 94, 240, 147, 75, 204, 156, 106, 216, 220, 28, 228, 116, 118, 15, 122, 124, 126, 448, 260, 264, 134
Offset: 1

Views

Author

Michel Marcus, Mar 18 2022

Keywords

Comments

The terms are of course the denominators of the fraction "in smallest terms", otherwise said: a(n) = n*d/gcd(n*d, n - d), which is unambiguous also for n = 1 and n = 2 where n - d = 0.

Examples

			The number n = 1 has d = 1 divisors, so (n-d)/(n*d) = 0/1 has denominator a(1) = 1.
The number n = 2 has d = 2 divisors, so (n-d)/(n*d) = 0/4 = 0/1 has denominator a(2) =  1 when written in smallest terms.
The number n = 3 has d = 2 divisors, so (n-d)/(n*d) = 1/6 has denominator a(3) =  6.
The number n = 4 has d = 3 divisors, so (n-d)/(n*d) = 1/12 has denominator a(4) = 12.
The number n = 6 has d = 4 divisors, so (n-d)/(n*d) = 2/24 = 1/12 has denominator a(6) = 12.
		

Crossrefs

Cf. A000005, A049820, A146566, A352483 (numerator).

Programs

  • Mathematica
    a[n_] := Numerator[n*(d = DivisorSigma[0, n])/(n - d)]; Array[a, 100, 3] (* Amiram Eldar, Mar 18 2022 *)
  • PARI
    A352482(n,d=numdiv(n))=denominator((n-d)/(n*d))

Extensions

Edited and extended to offset 1 by M. F. Hasler, Apr 17 2022

A152492 a(n) = number of integers of the form (n*k)^2/(k^2 - n^2).

Original entry on oeis.org

0, 0, 1, 1, 0, 2, 0, 1, 1, 1, 0, 8, 0, 0, 4, 1, 0, 2, 0, 4, 3, 0, 0, 9, 0, 0, 1, 2, 0, 7, 0, 1, 2, 0, 1, 8, 0, 0, 1, 4, 0, 5, 0, 1, 5, 0, 0, 9, 0, 1, 1, 1, 0, 2, 1, 4, 1, 0, 0, 23, 0, 0, 3, 1, 1, 4, 0, 1, 1, 2, 0, 10, 0, 0, 4, 1, 0, 4, 0, 4, 1, 0, 0, 17, 0, 0, 1, 1, 0, 8
Offset: 1

Views

Author

Ctibor O. Zizka, Dec 06 2008

Keywords

Comments

k needs to be checked only up through n^2+1 since beyond this n^2 < (n*k)^2/(k^2 - n^2) < n^2 + 1 and thus can't be an integer. - Micah Manary, Aug 27 2022

Crossrefs

Programs

  • PARI
    a(n) = sum(k=1, n^2+1, if (k!=n, denominator((n*k)^2/(k^2 - n^2))==1)); \\ Michel Marcus, Oct 28 2022

Extensions

More terms from Micah Manary, Aug 07 2022

A351913 Least k such that A352483(k) = n, or -1 if no such k exists.

Original entry on oeis.org

3, 9, 5, 204, 7, 876, 20, 140, 11, 492, 13, 776, 32, 904, 17, 441, 19, 23364, 44, 2178, 23, 25, 27, 1544, 216, 3756, 29, 460, 31, 1928, 35, 2056, 280, 1644, 37, 5196, 117, 162, 41, 1089, 43, 2696, 92, 2824, 47, 49, 51, 6924, 153, 812, 53, 7524, 57, 3464, 116, 1521, 59, 940, 61
Offset: 1

Views

Author

Michel Marcus, Mar 18 2022

Keywords

Comments

What is the value of a(102)?
Conjecture: a(102) and all "Unknown" values in the a-file equal -1. - Paolo Xausa, Aug 16 2022

Crossrefs

Programs

  • Mathematica
    a[n_] := Module[{k = 3}, While[Denominator[k*(d = DivisorSigma[0, k])/(k - d)] != n, k++]; k]; Array[a, 60] (* Amiram Eldar, Mar 18 2022 *)
  • PARI
    f(n) = my(d=numdiv(n)); denominator(n*d/(n-d)); \\ A352483
    a(n) = {my(k=3); while (f(k) != n, k++); k;}
    
  • Python
    from math import gcd
    from sympy import divisor_count
    from itertools import count, islice
    def f(n): d = divisor_count(n); g = gcd(n-d, n*d); return (n-d)//g
    def agen():
        n, adict = 1, dict()
        for k in count(1):
            fk = f(k)
            if fk not in adict: adict[fk] = k
            while n in adict: yield adict[n]; n += 1
    print(list(islice(agen(), 60))) # Michael S. Branicky, Jul 23 2022

Formula

a(n) = n+2 iff n > 0 is a term of A040976. - Bernard Schott, Mar 24 2022

A153193 a(n) is the number of integers of the form n*(n+1)*k / (k - n*(n+1)) where k is an integer >= 1.

Original entry on oeis.org

4, 13, 22, 22, 40, 40, 31, 52, 67, 40, 67, 67, 40, 121, 121, 40, 67, 67, 67, 202, 121, 40, 94, 157, 67, 94, 157, 67, 121, 121, 49, 148, 121, 121, 337, 112, 40, 121, 283, 94, 121, 121, 67, 337, 202, 40, 121, 202, 112, 202, 202, 67, 94, 283, 283, 283, 121, 40
Offset: 1

Views

Author

Ctibor O. Zizka, Dec 20 2008

Keywords

Comments

1/n - 1/(n+1) - 1/k = 1/c where c is an integer, k >= 1.

Examples

			The a(1)=4 integers of the form n*(n+1)*k/(k - n*(n+1)) = 1*(1+1)*k/(k - 1*(1+1)) = 2*k/(k-2) occur at
  k=1: 2*1/(1-2) = -2,
  k=3: 2*3/(3-2) =  6,
  k=4: 2*4/(4-2) =  4, and
  k=6: 2*6/(6-2) =  3.
		

Crossrefs

Programs

  • Maple
    f:= proc(n) local D;
       D:= numtheory:-divisors((n*(n+1))^2);
       nops(D) + nops(select(`<=`,D,n*(n+1)-1))
    end proc:
    map(f, [$1..100]); # Robert Israel, Oct 21 2024

Extensions

a(13)-a(58) from Jon E. Schoenfield, Mar 15 2022

A353012 Numbers N such that gcd(N - d, N*d) >= d^2, where d = A000005(N) is the number of divisors of N.

Original entry on oeis.org

1, 2, 136, 156, 328, 444, 584, 600, 712, 732, 776, 876, 904, 1096, 1164, 1176, 1308, 1544, 1864, 1884, 1928, 2056, 2172, 2248, 2316, 2504, 2601, 2696, 2748, 2824, 2892, 2904, 3208, 3240, 3249, 3272, 3324, 3464, 3592, 3656, 3756, 4044, 4056, 4168, 4188, 4476, 4552, 4616
Offset: 1

Views

Author

M. F. Hasler, Apr 15 2022

Keywords

Comments

As d^2 | N-d we have N = k*d^2 + d for some k >= 0 and d > 1. So gcd(k*d^2 + d - d, (N*d^2 + d)*d) = gcd(k*d^2, k*d^3 + d^2) = gcd(k*d^2, d^2) = d^2. So for any N such that d^2 | gcd(N - d, N*d) we have gcd(N - d, N*d) = d^2. - David A. Corneth, Apr 20 2022
Since gcd(N - d, N*d) is never larger than d^2 (if N = n*g, d = f*g with gcd(n,f) = 1, then gcd(N - d, N*d) = g*gcd(n-f,n*f*g) = g*gcd(n-f, f*f*g) <= g*g, since by assumption, no factor of f divides n), so one can also replace "=" by ">=" in the definition.

Examples

			N = 1 is in the sequence because d(N) = 1, gcd(1 - 1, 1*1) = 1 = d^2.
N = 2 is in the sequence because d(N) = 2, gcd(2 - 2, 2*2) = 4 = d^2.
N = 136 = 8*17 is in the sequence because d(N) = 4*2 = 8, gcd(8*17 - 8, 8*17*8) = gcd(8*16, 8*8*17) = 8*8 = d^2. Similarly for N = 8*p with any prime p = 8*k + 1.
N = 156 = 2^2*3*13 is in the sequence because d(n) = 3*2*2 = 12, gcd(12*13 - 12, 12*13*12) = gcd(12*12, 12*12*13) = 12*12 = d^2. Similarly for any N = 12*p with prime p = 12*k + 1.
More generally, when N = m*p^k with p^k == 1 (mod m) and m = (k+1)*d(m), then d(N) = d(m)*(k+1) = m and gcd(n - d, n*d) = gcd(m*p^k - m, m*p^k*m) = m*gcd(p^k - 1, p^k*m) = m^2. This holds for m = 8 and 12 with k = 1, for m = 9, 18 and 24 with k = 2, etc: see sequence A033950 for the m-values.
		

Crossrefs

Cf. A000005 (number of divisors), A352483 (numerator of (n-d)/(n*d)), A352482 (denominator), A049820 (n - d), A146566 (n*d is divisible by n-d), A033950 (refactorable or tau numbers: d(n) | n, supersequence of this).

Programs

  • Mathematica
    Select[Range[4650], GCD[#1 - #2, #1 #2] == #2^2 & @@ {#, DivisorSigma[0, #]} &] (* Michael De Vlieger, Apr 21 2022 *)
  • PARI
    select( {is(n, d=numdiv(n))=gcd(n-d,d^2)==d^2}, [1..10^4])

Formula

For all m in A033950, the sequence contains all numbers m*p^k with k = m/d(m) - 1, and p^k == 1 (mod m), in particular 8*A007519 and 12*A068228 (k = 1, m = 8 and 12), 9*A129805^2, 18*A129805^2 and 24*A215848^2 (k = 2, m = 9, 18 and 24, A^2 = {x^2, x in A}), etc.
Showing 1-6 of 6 results.