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

A145338 a(n) is the smallest prime p where |d(p-1) - d(p+1)| = n. (d(m) = the number of divisors of m.)

Original entry on oeis.org

7, 2, 11, 197, 23, 37, 47, 401, 59, 1601, 181, 16901, 167, 3137, 179, 577, 419, 1297, 1051, 12101, 359, 739601, 1009, 4357, 1511, 50177, 719, 171610001, 839, 67601, 10657, 9096257, 1439, 240101, 3697, 145540097, 3023, 15877, 2879, 3587237, 2521
Offset: 0

Views

Author

Leroy Quet, Oct 08 2008

Keywords

Comments

a(2n-1) = k^2 + 1, for all positive integers n, where k is some integer; k is even for n >= 2.

Examples

			a(2)=11 because abs(d(10) - d(12)) = 2 while abs(d(p-1) - d(p+1)) < 2 for p=2,3,5 and 7. - _Emeric Deutsch_, Oct 11 2008
		

Crossrefs

Cf. A145337.

Programs

  • Maple
    with(numtheory); a:=proc(n) local j: for j while abs(tau(ithprime(j)-1)-tau(ithprime(j)+1)) <> n do end do: ithprime(j) end proc: seq(a(n), n=0..26); # Emeric Deutsch, Oct 11 2008

Extensions

More terms from R. J. Mathar and Emeric Deutsch, Oct 10 2008
Extended from a(27) onwards by Ray Chandler, Oct 12 2008

A190821 Prime numbers p where d(p-1) = d(p+1) increases to a record.

Original entry on oeis.org

7, 19, 41, 199, 919, 5741, 18089, 41651, 90271, 446081, 1276001, 27033161, 43220449, 53308529, 109245401, 512669249, 663929729, 2266639649, 2560742911, 2969200961, 8505402751, 32540473601, 61573368401, 74335064959, 109494811999
Offset: 1

Views

Author

Juri-Stepan Gerasimov, May 21 2011

Keywords

Comments

a(26) <= 354208192001. - Donovan Johnson, Jun 03 2011

Examples

			a(1) = 7 because 7 is prime and d(6) = 4 = d(8).
		

Crossrefs

Cf. A145337, A190646 (numbers n such that d(n-1)=d(n+1) increases to a record).

Programs

  • Mathematica
    s = Select[Prime@ Range@ 1000000, DivisorSigma[0, # - 1] == DivisorSigma[0, # + 1] &]; t = DivisorSigma[0, # - 1] & /@ s; a = {0}; b = {0}; Do[If[t[[k]] > Max@ b, AppendTo[a, s[[k]]]]; AppendTo[b, t[[k]]], {k, Length@ s}]; a (* Michael De Vlieger, Oct 30 2015 *)
  • PARI
    r=0; forprime(p=2,4e9,t=numdiv(p-1);if(t>r&t==numdiv(p+1),r=t; print1(p", "))) \\ Charles R Greathouse IV, May 27 2011

Extensions

a(14)-a(21) from Charles R Greathouse IV, May 27 2011
a(22) from Charles R Greathouse IV, May 31 2011
a(23)-a(25) from Donovan Johnson, Jun 03 2011
Showing 1-2 of 2 results.