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.

A063647 Number of ways to write 1/n as a difference of exactly 2 unit fractions.

Original entry on oeis.org

0, 1, 1, 2, 1, 4, 1, 3, 2, 4, 1, 7, 1, 4, 4, 4, 1, 7, 1, 7, 4, 4, 1, 10, 2, 4, 3, 7, 1, 13, 1, 5, 4, 4, 4, 12, 1, 4, 4, 10, 1, 13, 1, 7, 7, 4, 1, 13, 2, 7, 4, 7, 1, 10, 4, 10, 4, 4, 1, 22, 1, 4, 7, 6, 4, 13, 1, 7, 4, 13, 1, 17, 1, 4, 7, 7, 4, 13, 1, 13, 4, 4, 1, 22, 4, 4, 4, 10, 1, 22, 4, 7, 4, 4, 4
Offset: 1

Views

Author

Henry Bottomley, Jul 23 2001

Keywords

Comments

Also number of ways to write 1/n as sum of exactly two distinct unit fractions. - Thomas L. York, Jan 11 2014
Also number of positive integers m such that 1/n + 1/m is a unit fraction. - Jon E. Schoenfield, Apr 17 2018
If 1/n = 1/b - 1/c then n = bc/(c-b) and 1/n = 1/(2n-b) + 1/(c+2n) (though it is also the case that 1/n = 1/(2n) + 1/(2n) equivalent to b = c = 0).
Also number of divisors of n^2 less than n. - Vladeta Jovovic, Aug 13 2001
Number of elements in the set {(x,y): x|n, y|n, xVladeta Jovovic, May 03 2002
Also number of positive integers of the form k*n/(k+n). - Benoit Cloitre, Jan 04 2002
This is similar to A062799, having the same first 29 terms. But they are different sequences.
If A001221(n) = omega(n) <= 2, then a(n) = A062799(n); if A001221(n) > 2, then a(n) > A062799(n). - Matthew Vandermast, Aug 25 2004
Number of r X s integer-sided rectangles such that r + s = 4n, r < s and (s - r) | (s * r). - Wesley Ivan Hurt, Apr 24 2020
Also number of integer-sided right triangles with 2n as a leg. Equivalent to the even indices of A046079. - Nathaniel C Beckman, May 14 2020; Jun 26 2020
a(n) is the number of positive integers k such that k+n divides k*n. - Thomas Ordowski, Dec 02 2024

Examples

			a(10) = 4 since 1/10 = 1/5 - 1/10 = 1/6 - 1/15 = 1/8 - 1/40 = 1/9 - 1/90.
a(12) = 7: the divisors of 12 are 1, 2, 3, 4, 6 and 12 and the decompositions are (1, 2), (1, 3), (1, 4), (1, 6), (1, 12), (2, 3), (3, 4).
		

Crossrefs

First twenty-nine terms identical to those of A062799.

Programs

  • Magma
    [(NumberOfDivisors(n^2)-1)/2 : n in [1..100]]; // Vincenzo Librandi, Apr 18 2018
  • Mathematica
    Table[(Length[Divisors[n^2]] - 1)/2, {n, 1, 100}]
    (DivisorSigma[0,Range[100]^2]-1)/2 (* Harvey P. Dale, Apr 15 2013 *)
  • PARI
    for(n=1,100,print1(sum(i=1,n^2,if((n*i)%(i+n),0,1)),","))
    
  • PARI
    a(n)=numdiv(n^2)\2 \\ Charles R Greathouse IV, Oct 03 2016
    

Formula

a(n) = (tau(n^2)-1)/2.
a(n) = A018892(n)-1. If n = (p1^a1)(p2^a2)...(pt^at), a(n) = ((2*a1+1)(2*a2+1)...(2*at+1)-1)/2.
If n is prime a(n)=1. Conjecture: (1/n)*Sum_{i=1..n} a(i) = C*log(n)*log(log(n)) + o(log(n)) with C=0.7... [The conjecture is false. See the plot and the asymptotic formula below. - Amiram Eldar, Oct 03 2024]
Bisection of A046079. - Lekraj Beedassy, Jul 09 2004
a(n) = Sum_{i=1..2*n-1} (1 - ceiling(i*(4*n-i)/(4*n-2*i)) + floor(i*(4*n-i)/(4*n-2*i))). - Wesley Ivan Hurt, Apr 24 2020
Sum_{k=1..n} a(k) ~ (n/(2*zeta(2)))*(log(n)^2/2 + log(n)*(3*gamma - 1) + 1 - 3*gamma + 3*gamma^2 - 3*gamma_1 - zeta(2) + (2 - 6*gamma - 2*log(n))*zeta'(2)/zeta(2) + (2*zeta'(2)/zeta(2))^2 - 2*zeta''(2)/zeta(2)), where gamma is Euler's constant (A001620) and gamma_1 is the first Stieltjes constant (A082633). - Amiram Eldar, Oct 03 2024

A347191 Number of divisors of n^2-1.

Original entry on oeis.org

2, 4, 4, 8, 4, 10, 6, 10, 6, 16, 4, 16, 8, 12, 8, 18, 4, 24, 8, 16, 8, 20, 6, 20, 12, 16, 8, 32, 4, 28, 8, 14, 16, 24, 8, 24, 8, 20, 8, 40, 4, 32, 12, 16, 12, 24, 6, 36, 12, 24, 8, 32, 8, 40, 16, 20, 8, 32, 4, 32, 12, 16, 24, 32, 8, 32, 8, 32, 8, 60, 4, 30, 12, 16, 24, 32, 8, 48, 10, 24
Offset: 2

Views

Author

Bernard Schott, Aug 22 2021

Keywords

Comments

Inspired by problem A1885 in Diophante (see link).
As n^2-1 > 0 is never square, all terms are even.
a(n) = 2 iff n = 2.
a(n) = 4 iff n = 3 or iff n is average of twin prime pairs 'n-1' and 'n+1'; i.e. n is a member of ({3} Union A014574) or equivalently n is a term of A129297 \ {0,1,2}.
a(n) = 6 iff n is such that the two adjacent integers of n are a prime and a square of another prime: 8, 10, 24, 48, 168, 360, ... (A347194).

Examples

			a(5) = tau(5^2-1) = tau(24) = 8.
a(18) = tau(18^2-1) = tau(17*19) = 4, 18 is average of twin primes 17 and 19.
		

Crossrefs

Cf. A347192 (records), A347193 (smallest k with a(k) = n), A347194 (a(n)=6).

Programs

  • Maple
    with(numtheory):
    seq(tau(n^2-1), n=2..81);
  • Mathematica
    a[n_] := Length[Divisors[n^2 - 1]]; Table[a[n], {n, 2, 81}] (* Robert P. P. McKone, Aug 22 2021 *)
    Table[DivisorSigma[0, n^2 - 1], {n, 2, 100}] (* Vaclav Kotesovec, Aug 23 2021 *)
  • PARI
    a(n) = numdiv(n^2-1); \\ Michel Marcus, Aug 23 2021
    
  • PARI
    a(n)=my(a=valuation(n-1,2),b=valuation(n+1,2)); numdiv((n-1)>>a)*numdiv((n+1)>>b)*(a+b+1) \\ Charles R Greathouse IV, Sep 17 2021
    
  • PARI
    first(n)=my(v=vector(n-1),x=[1,factor(1)],y=[2,factor(2)]); forfactored(k=3,n+1,  my(e=max(valuation(x[1],2), valuation(k[1],2))); v[k[1]-2]=numdiv(k)*numdiv(x)*(e+2)/(2*e+2); x=y; y=k); v \\ Charles R Greathouse IV, Sep 17 2021
    
  • Python
    from math import prod
    from sympy import factorint
    def a(n):
        ft = factorint(n+1, multiple=True) + factorint(n-1, multiple=True)
        return prod((e + 1) for e in (ft.count(f) for f in set(ft)))
    print([a(n) for n in range(2, 82)]) # Michael S. Branicky, Sep 17 2021

Formula

a(n) = A000005(A005563(n-1)).
a(n) = 2 * A129296(n).
Sum_{k=2..n} a(k) ~ (6/Pi^2) * n*log(n)^2 (Dudek, 2016). - Amiram Eldar, Apr 07 2023

A129297 Nonnegative integers m such that m^2-1 has no divisors d with 1

Original entry on oeis.org

0, 1, 2, 3, 4, 6, 12, 18, 30, 42, 60, 72, 102, 108, 138, 150, 180, 192, 198, 228, 240, 270, 282, 312, 348, 420, 432, 462, 522, 570, 600, 618, 642, 660, 810, 822, 828, 858, 882, 1020, 1032, 1050, 1062, 1092, 1152, 1230, 1278, 1290, 1302, 1320, 1428, 1452, 1482, 1488
Offset: 1

Views

Author

Reinhard Zumkeller, Apr 09 2007

Keywords

Comments

Since m^2-1 = (m+1)(m-1), this sequence is just 0,1,2,3, and the average of twin prime pairs A014574.

Examples

			{1,41,43,1763} is the set of divisors of 42^2-1, therefore 42 is a term, A129296(42) = #{1,41} = 2.
		

Crossrefs

Programs

Formula

A129296(a(n)) = #{1, a(n)-1} = 2;
a(n) = A014574(n-4) for n>4.

A129292 Number of divisors of n^4 - 1 that are not greater than n.

Original entry on oeis.org

1, 1, 2, 2, 4, 2, 6, 4, 5, 3, 8, 3, 10, 4, 6, 4, 12, 4, 13, 4, 11, 6, 14, 3, 10, 6, 12, 6, 17, 3, 16, 7, 10, 9, 13, 4, 18, 7, 11, 4, 22, 3, 26, 8, 9, 7, 23, 5, 18, 7, 13, 6, 25, 4, 24, 8, 21, 6, 18, 3, 18, 10, 12, 14, 16, 4, 26, 8, 17, 7, 31, 5, 30, 6, 11, 13, 26, 7, 25, 6, 16, 10, 35, 4, 18, 11
Offset: 1

Views

Author

Reinhard Zumkeller, Apr 09 2007

Keywords

Comments

a(n) = #{d: d<=n and A123865(n) mod d = 0};
a(n)>1 for n>2, see A129293 for m such that a(m)=2: a(A129293(n))=2.

Examples

			a(100) = #{1,3,9,11,33,73,99} = 7.
		

Crossrefs

Programs

A129294 Number of divisors of n^3 - 1 that are not greater than n.

Original entry on oeis.org

1, 2, 2, 3, 2, 4, 2, 5, 3, 5, 2, 7, 2, 4, 7, 5, 3, 6, 2, 6, 6, 6, 2, 13, 4, 4, 4, 8, 4, 10, 3, 6, 5, 6, 5, 14, 2, 6, 5, 8, 3, 10, 3, 8, 10, 5, 3, 16, 3, 9, 5, 9, 2, 11, 5, 8, 7, 4, 3, 20, 2, 5, 9, 11, 4, 18, 4, 6, 5, 8, 3, 14, 5, 4, 8, 6, 4, 17, 2, 21, 5, 6, 3, 16, 6, 10, 8, 8, 2, 14, 5, 9, 7, 6, 5, 16
Offset: 2

Views

Author

Reinhard Zumkeller, Apr 09 2007

Keywords

Comments

a(n) = #{d: d<=n and A068601(n) mod d = 0};
a(n)>1 for n>2, see A129295 for m such that a(m)=2: a(A129295(n))=2.

Examples

			a(100) = #{1,3,7,9,11,13,21,27,33,37,39,63,77,91,99} = 15.
		

Crossrefs

Programs

Extensions

a(1)=1 removed by Michel Marcus, Aug 01 2018

A347192 Integers k such that the number of divisors of k^2 - 1 (A347191) sets a new record.

Original entry on oeis.org

2, 3, 5, 7, 11, 17, 19, 29, 41, 71, 109, 161, 169, 181, 379, 449, 649, 701, 881, 1079, 1189, 1871, 2449, 3079, 4159, 5851, 11969, 19601, 23561, 23869, 24751, 43471, 82081, 94249, 157249, 222641, 252449, 313039, 627199, 677249, 790399, 1276001, 2308879, 4058209
Offset: 1

Views

Author

Bernard Schott, Sep 16 2021

Keywords

Comments

The first ten terms are the same as A090481 and A189828, then a(11) = 109 while A090481(11) = 179 and A189828(11) = 161.
The first eleven terms are the same as A335325, then a(12) = 161, which is nonprime, while A335325(12) = 181.
The corresponding records obtained are 2, 4, 8, 10, 16, 18, 24, 32, 40, 60, 64, 70, 80, 96, ...

Examples

			tau(71^2-1) = 60 and there is no integer k < 71 such that tau(k^2-1) >= 60, hence 71 is a term and a(10) = 71.
		

Crossrefs

Cf. A090481, A189828, A335325 (similar, with k = p prime).

Programs

  • Mathematica
    s[n_] := DivisorSigma[0, n^2 - 1]; sm = 0; seq = {}; Do[If[(sn = s[n]) > sm, sm = sn; AppendTo[seq, n]], {n, 2, 10^6}]; seq (* Amiram Eldar, Sep 16 2021 *)
    DeleteDuplicates[Table[{k,DivisorSigma[0,k^2-1]},{k,2,4060000}],GreaterEqual[#1[[2]],#2[[2]]]&] [[;;,1]] (* Harvey P. Dale, Dec 04 2023 *)
Showing 1-6 of 6 results.