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

A347193 a(n) is the smallest m such that A347191(m) = 2*n, where A347191(m) = tau(m^2 - 1).

Original entry on oeis.org

2, 3, 8, 5, 7, 15, 33, 11, 17, 23, 513, 19, 13841287200, 31, 73, 29, 650377879817809571042122834560, 49, 131073, 41, 97, 1537, 31381059608, 79, 50626, 10239, 127, 223, 459986536544739960976800, 71, 8193465725814765556554001028792218848, 109, 61953, 163839, 161
Offset: 1

Views

Author

Bernard Schott, Sep 17 2021

Keywords

Comments

Generalization of the questions proposed in Diophante problem A1885 (see links).
When p is prime, as a(p) is the smallest m such that tau(m^2 - 1) = 2*p, hence m^2 - 1 is of the form q * r^(p-1) with q > r primes, so we must solve the Diophantine equation (m-1)*(m+1) = q * r^(p-1) to get the smallest m, when only p is known.
Two cases must be checked:
-> r = 2: if 2^(p-3) + 1 is prime, then m = 2^(p-2) + 1, and
if 2^(p-3) - 1 is prime, then m = 2^(p-2) - 1.
If there is a solution m in the case r = 2, then a(p) is this smallest solution m (see example a(11)); if there is no solution m with r = 2, then try the 2nd case.
-> r odd prime: if r^(p-1) + 2 is prime, then m = r^(p-1) + 1, and
if r^(p-1) - 2 is prime, then m = r^(p-1) - 1 (example a(13)).

Examples

			tau(2^2 - 1) = 2 = 2*1, so a(1) = 2.
tau(3^2 - 1) = 4 = 2*2, so a(2) = 3.
tau(4^2 - 1) = 4 = 2*2, tau(5^2 - 1) = 8 = 2*4 so a(4) = 5.
For a(11): if r = 2, 2^8 + 1 = 257 is prime, while 2^8 - 1 is not prime, hence a(11) = 2^9 + 1 = 513.
For a(13):
  if r = 2, 2^10 +- 1 are not prime, so not possible;
  if r = 3, 3^12 +- 2 are not prime, so not possible;
  if r = 5, 5^12 +- 2 are not prime, so not possible;
  if r = 7, 7^12 - 2 = 13841287199 is prime, while 7^12 + 2 is not prime, then a(13) = 13841287199+1 = 13841287200.
		

Crossrefs

Extensions

a(31)-a(35) from Jinyuan Wang, Sep 23 2021

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 *)

A059907 a(n) = |{m : multiplicative order of n mod m = 2}|.

Original entry on oeis.org

0, 1, 2, 2, 5, 2, 6, 4, 6, 3, 12, 2, 10, 6, 8, 4, 13, 2, 18, 6, 10, 4, 16, 4, 12, 9, 12, 4, 26, 2, 20, 6, 8, 12, 20, 4, 15, 6, 16, 4, 32, 2, 24, 10, 10, 6, 20, 4, 26, 9, 18, 4, 26, 6, 32, 12, 12, 4, 28, 2, 20, 10, 12, 18, 25, 4, 24, 6, 26, 4, 52, 2, 18, 10, 12, 18, 26, 4, 40, 8, 14, 5, 28
Offset: 1

Views

Author

Vladeta Jovovic, Feb 08 2001

Keywords

Comments

The multiplicative order of a mod m, GCD(a,m) = 1, is the smallest natural number d for which a^d = 1 (mod m).

Examples

			a(2) = |{3}| = 1, a(3) = |{4,8}| = 2, a(4) = |{5,15}| = 2, a(5) = |{3,6,8,12,24}| = 5, a(6) = |{7,35}| = 2, a(7) = |{4,8,12,16,24,48}| = 6,...
		

Crossrefs

Programs

  • Maple
    with(numtheory):f := n->tau(n^2-1)-tau(n-1):for n from 1 to 100 do printf(`%d,`,f(n)) od:
  • Mathematica
    a[n_] := Subtract @@ DivisorSigma[0, {n^2-1, n-1}]; a[1] = 0; Array[a, 100] (* Amiram Eldar, Jan 25 2025 *)
  • PARI
    a(n) = if(n == 1, 0, numdiv(n^2-1) - numdiv(n-1)); \\ Amiram Eldar, Jan 25 2025

Formula

a(n) = tau(n^2-1)-tau(n-1), where tau(n) = number of divisors of n A000005. Generally, if b(n, r) = |{m : multiplicative order of n mod m = r}| then b(n, r) = Sum_{d|r} mu(d)*tau(n^(r/d)-1), where mu(n) = Moebius function A008683.

A069062 Numbers k such that k^2-1 and k^2+1 have the same number of positive divisors.

Original entry on oeis.org

2, 3, 12, 30, 42, 60, 68, 102, 108, 112, 123, 128, 162, 168, 198, 200, 212, 213, 252, 294, 302, 312, 318, 333, 336, 338, 372, 387, 447, 448, 450, 462, 498, 502, 522, 542, 578, 592, 598, 600, 606, 612, 648, 672, 678, 708, 717, 752, 762, 795, 808, 810, 812
Offset: 1

Views

Author

Benoit Cloitre, Apr 04 2002

Keywords

Crossrefs

Programs

  • Mathematica
    Select[Range[1000], DivisorSigma[0, #^2 - 1] == DivisorSigma[0, #^2 + 1] &] (* Amiram Eldar, Jun 04 2022 *)
  • PARI
    isok(n) = numdiv(n^2-1) == numdiv(n^2+1); \\ Michel Marcus, Nov 24 2013

A347194 Numbers such that the two adjacent integers are a prime and the square of another prime.

Original entry on oeis.org

8, 10, 24, 48, 168, 360, 840, 1368, 1848, 2208, 3720, 5040, 7920, 10608, 11448, 16128, 17160, 19320, 29928, 36480, 44520, 49728, 54288, 57120, 66048, 85848, 97968, 113568, 128880, 177240, 196248, 201600, 218088, 241080, 273528, 292680, 323760, 344568, 368448, 426408, 458328, 516960, 528528, 537288, 552048, 564000, 573048, 579120
Offset: 1

Views

Author

Bernard Schott, Sep 23 2021

Keywords

Comments

-> Equivalently, numbers k such that tau(k^2-1) = A347191(k) = 6 (see example; used for Maple code).
Proof: tau(k^2-1) = 6 <==> k^2-1 = p^5 or k^2-1 = p*q^2 with p <> q primes; but k^2-p^5 = 1 is impossible, as a consequence of the Catalan-Mihăilescu theorem; now, (k-1)*(k+1) = p*q^2 ==> (k-1 = p and k+1 = q^2) or (k-1 = q^2 and k+1 = p), because k-1 = q and k+1 = p*q is not possible, otherwise 2 = q*(p-1), which would contradict p <> q.
-> There are two possible configurations with p, q primes: (q^2 < a(n) < p) or (p < a(n) < q^2).
The unique configuration q^2 < a(n) < p is for q = 3, a(2) = 10 and p = 11.
All the other configurations, for n = 1 or n >= 3, are of the form p < a(n) < q^2 with p = A049002(n) and q = A062326(n).
-> Note that there is only one integer such that the two adjacent integers are a prime and the square of that prime: it is 3, which lies between 2 and 2^2; in this case, tau(3^2-1) = 4.

Examples

			8 is a term since 8 lies between 7 (prime) and 9 = 3^2 (square of prime); also tau(8^2-1) = tau(63) = 6.
10 is a term since 10 lies between 9 = 3^2 (square of prime) and 11 (prime); also tau(10^2-1) = tau(99) = 6.
24 is a term since 24 lies between 23 (prime) and 25 = 5^2 (square of prime); also tau(24^2-1) = tau(575) = 6.
		

Crossrefs

Subsequence of A163492 (between prime and a perfect square).

Programs

  • Maple
    with(numtheory):
    filter := q-> tau(q^2-1) = 6 : select(filter, [$2..580000]);
  • Mathematica
    q[n_] := Module[{e1 = FactorInteger[n - 1][[;; , 2]], e2 = FactorInteger[n + 1][[;; , 2]]}, (e1 == {1} && e2 == {2}) || (e1 == {2} && e2 == {1})]; Select[Range[4, 600000], q] (* Amiram Eldar, Sep 23 2021 *)
  • PARI
    isok(m) = my(pa, pb); (isprimepower(m-1, &pa)*isprimepower(m+1, &pb) == 2) && (pa != pb); \\ Michel Marcus, Sep 23 2021
    
  • PARI
    upto(n) = { my(res = List()); forprime(i = 3, sqrtint(n-1), if(isprime(i^2 - 2), listput(res, i^2-1); ); if(isprime(i^2 + 2), listput(res, i^2 + 1); ) ); res } \\ David A. Corneth, Sep 23 2021

Formula

For n >= 3: a(n) = A049002(n) + 1 = a(n) = A146981(n) - 1 = (A049002(n) + A146981(n))/2 = A062326(n)^2 - 1.

A373209 Numbers k such that k^2 - 1 and k^2 + 1 have 8 divisors each.

Original entry on oeis.org

68, 112, 128, 162, 200, 212, 252, 294, 318, 336, 338, 372, 448, 450, 498, 502, 542, 578, 592, 598, 612, 648, 672, 678, 708, 752, 762, 808, 812, 852, 878, 888, 938, 952, 992, 996, 1012, 1038, 1098, 1102, 1116, 1122, 1188, 1202, 1212, 1248, 1258, 1328, 1362, 1380
Offset: 1

Views

Author

Jon E. Schoenfield, Jun 21 2024

Keywords

Comments

Among the first 10000 terms (from a(1) = 68 through a(10000) = 697578), k^2 - 1 and k^2 + 1 are each the product of three distinct primes, except for
125 terms for which k^2 + 1 = 5^3 times a prime
6 terms for which k^2 + 1 = 13^3 times a prime
1 terms for which k^2 + 1 = 17^3 times a prime
1 terms for which k^2 + 1 = 29^3 times a prime, and
4 terms for which k^2 - 1 = p^3 * (p^3 +/- 2) (with p = 19, 29, 37, 83, respectively).
The first term for which both k^2 - 1 and k^2 + 1 are of the form p^3 * q is k = 41457661182: k^2 - 1 = 3461^3 * 41457661183, while k^2 + 1 = 5^3 * 13749901365452077097.

Examples

			68 is a term: both 68^2 - 1 = 4623 = 3 * 23 * 67 and 68^2 + 1 = 4625 = 5^3 * 37 have 8 divisors.
		

Crossrefs

Formula

{ k : tau(k^2 - 1) = tau(k^2 + 1) = 8}, where tau() is the number of divisors function, A000005.

A373903 Numbers k such that k^2 - 1 has fewer divisors than k^2 + 1.

Original entry on oeis.org

18, 72, 132, 138, 182, 192, 228, 242, 268, 278, 282, 327, 348, 360, 378, 382, 408, 418, 432, 438, 618, 632, 642, 660, 682, 684, 693, 718, 772, 788, 798, 822, 843, 858, 882, 918, 948, 957, 1032, 1048, 1068, 1092, 1113, 1118, 1143, 1152, 1227, 1228, 1230, 1282, 1292
Offset: 1

Views

Author

Amiram Eldar, Jun 22 2024

Keywords

Comments

Numbers k such that A347191(k) < A193432(k).

Examples

			18 is a term since 18^2 - 1 = 323 has 4 divisors (1, 17, 19 and 323) while 18^2 + 1 = 325 has 6 divisors (1, 5, 13, 25, 65 and 325).
		

Crossrefs

Programs

  • Mathematica
    Select[Range[2, 1300], DivisorSigma[0, #^2 - 1] < DivisorSigma[0, #^2 + 1] &]
  • PARI
    is(k) = k > 1 && numdiv(k^2 - 1) < numdiv(k^2 + 1);

A373213 Numbers k such that k^2 - 1 and k^2 + 1 have 6 divisors each.

Original entry on oeis.org

168, 1368, 97968, 10374840, 16104168, 44049768, 68674368, 100741368, 281803368, 486775968, 1177381968, 1262878368, 1336852968, 2321986968, 2404627368, 3476635368, 4374102768, 5102102040, 5142754368, 5182128168, 5385651768, 6035269968, 9218496168, 10657878168
Offset: 1

Views

Author

Jon E. Schoenfield, Jun 21 2024

Keywords

Comments

Each term is a number of the form k = sqrt(p^2 * q + 1) such that q = p^2 - 2 and k^2 + 1 = r^2 * s, where p, q, r, and s are distinct primes.

Examples

			168 is a term: both 168^2 - 1 = 28223 = 13^2 * 167 and 168^2 + 1 = 28225 = 5^2 * 1129 have 6 divisors.
		

Crossrefs

Formula

{ k : tau(k^2 - 1) = tau(k^2 + 1) = 6}, where tau() is the number of divisors function, A000005.

A373756 Table read by antidiagonals: T(n,k) is the smallest m > 1 such that m^2 - 1 and m^2 + 1 have 2n and 2k divisors, respectively, or -1 if no such m exists.

Original entry on oeis.org

2, 4, -1, 10, 3, -1, 14, 8, 18, -1, 28560, 5, 168, 72, -1, 26, 9, 32, 360, 16068, -1, 25071688922457240, 15, 7, 68, 369465818568, 1620, -1, 56, 728, 332, 28398240, 182, 744768, 1407318, -1, 170, 11, 161245807967271241368, 98, 248872305817685706212070112080, 132, 4175536688568, 642, -1
Offset: 1

Views

Author

Jon E. Schoenfield, Jun 16 2024

Keywords

Comments

m=1 is excluded because m^2 - 1 would be 0.
For all m > 1, both m^2 - 1 and m^2 + 1 are nonsquares, so each has an even number of divisors.
For k=1, m^2 + 1 is a prime, so T(n,1) == 0 (mod 2) for all n.
For n=1, m^2 - 1 = (m-1)*(m+1) is a prime, which occurs only at m=2; 2^2 + 1 = 5 is also a prime, so T(1,1) = 2 and T(1,k) = -1 for k > 1.
For n=2, m^2 - 1 = (m-1)*(m+1) has 4 divisors, so (except for T(2,2) = 3) T(2,k) is the average of a twin prime pair (A014574).
Is T(n,k) > 0 for all n > 1?

Examples

			T(5,1) is the smallest integer m > 1 such that m^2 - 1 and m^2 + 1 have 10 and 2 divisors, respectively; since m^2 - 1 cannot be the 9th power of a prime, this requires that p^4 * q + 1 = m^2 = r - 1, where p, q, and r are distinct primes. The smallest such m is 28560, which gives a solution with p = 13, q = 28559, r = 815673601.
T(5,5) is the smallest integer m > 1 such that m^2 - 1 and m^2 + 1 each have 10 divisors; since neither m^2 - 1 nor m^2 + 1 can be the 9th power of a prime, this is the smallest m such that p^4 * q + 1 = m^2 = r^4 * s - 1, where p, q, r, and s are distinct primes: 22335421^4 * 248872305817685706212070112079 + 1 = 248872305817685706212070112080^2 = 13^4 * 2168601400616633822685176617536070987718973054081571441 - 1.
The first eight antidiagonals of the table are shown below.
.
  n\k|                 1   2   3        4            5      6       7  8
  ---+------------------------------------------------------------------
   1 |                 2  -1  -1       -1           -1     -1      -1 -1
   2 |                 4   3  18       72        16068   1620 1407318
   3 |                10   8 168      360 369465818568 744768
   4 |                14   5  32       68          182
   5 |             28560   9   7 28398240
   6 |                26  15 332
   7 | 25071688922457240 728
   8 |                56
		

Crossrefs

Formula

Define f(m) = tau(m^2 - 1) and g(m) = tau(m^2 + 1), where tau is the number of divisors function (A000005). Then
T(n,k) = min_{ m : f(m) = 2n and g(m) = 2k },
or -1 if no such m exists.
Showing 1-9 of 9 results.