login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A192498 Smallest prime p such that there is a gap of tau(n) between p and the next prime, otherwise 0. 1
2, 3, 3, 0, 3, 7, 3, 7, 0, 7, 3, 23, 3, 7, 7, 0, 3, 23, 3, 23, 7, 7, 3, 89, 0, 7, 7, 23, 3, 89, 3, 23, 7, 7, 7, 0, 3, 7, 7, 89, 3, 89, 3, 23, 23, 7, 3, 139, 0, 23, 7, 23, 3, 89, 7, 89, 7, 7, 3, 199, 3, 7, 23, 0, 7, 89, 3, 23, 7, 89, 3, 199, 3, 7, 23, 23, 7 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

COMMENTS

For n > 1, a(n)=0 if n is a perfect square (see A048691) because then tau(n) is odd.

LINKS

Antti Karttunen, Table of n, a(n) for n = 1..10000

FORMULA

a(1) = 2; and for n > 1, if n = k^2, a(n) = 0, otherwise a(n) = A000230(A000005(n)/2). - Antti Karttunen, May 28 2017

EXAMPLE

a(12) = 23  because 29 - 23 = 6 = tau(12).

MAPLE

A000230 := proc(g) if g = 1 then return 2 ; elif type(g, 'odd') then return 0 ; else for i from 1 do if ithprime(i+1)-ithprime(i) = g then return ithprime(i) ; end if; end do: end if; end proc:

A192498 := proc(n) A000230(numtheory[tau](n)) ; end proc: # R. J. Mathar, Jul 12 2011

PROG

(PARI)

A000230(n) = { my(p=2); forprime(q=3, , if(q-p==2*n, return(p)); p=q); } \\ From Charles R Greathouse IV, Nov 20 2012

A192498(n) = if(1==n, 2, if(issquare(n), 0, A000230(numdiv(n)/2))); \\ Antti Karttunen, May 28 2017

CROSSREFS

Cf. A000005, A000230, A048691.

Sequence in context: A026932 A087401 A332915 * A308178 A127572 A021815

Adjacent sequences:  A192495 A192496 A192497 * A192499 A192500 A192501

KEYWORD

nonn

AUTHOR

Michel Lagneau, Jul 02 2011

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 13 05:41 EDT 2020. Contains 336442 sequences. (Running on oeis4.)