Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A115766
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A115766 Distance from the n-th prime to the nearest semiprime. +0
2
2, 1, 1, 1, 1, 1, 2, 2, 1, 3, 2, 1, 2, 3, 1, 2, 1, 1, 2, 2, 1, 2, 1, 2, 2, 5, 3, 1, 2, 2, 2, 2, 3, 2, 3, 4, 1, 2, 1, 4, 1, 2, 3, 1, 3, 2, 2, 2, 1, 3, 2, 2, 4, 2, 2, 1, 2, 3, 1, 3, 4, 2, 2, 2, 1, 2, 2, 2, 1, 3, 2, 1, 2, 2, 2, 1, 2, 1, 2, 2, 2, 1, 4, 4, 2, 2, 2, 1, 3, 3, 1, 1, 2, 2, 2, 1, 2, 2, 3, 1, 2, 2, 1, 3, 2 (list; graph; listen)
OFFSET

1,1

COMMENT

This is a very slow-growing function. For the first 10^8 primes, the largest value is 45, which occurs for the prime 981270947.

EXAMPLE

a(10)=3 because 29 is the 10th prime and the nearest semiprime is 26.

MATHEMATICA

SemiPrimeQ[n_] := (2==Plus@@(Transpose[FactorInteger[n]][[2]])); Join[{2}, Table[p=Prime[i]; j=1; While[ !SemiPrimeQ[p+j] && !SemiPrimeQ[p-j], j++ ]; j, {i, 2, 150}]]

CROSSREFS

Cf. A001358 (semiprimes).

Sequence in context: A083382 A025900 A118383 this_sequence A108339 A138559 A073454

Adjacent sequences: A115763 A115764 A115765 this_sequence A115767 A115768 A115769

KEYWORD

easy,nonn

AUTHOR

T. D. Noe (noe(AT)sspectra.com), Jan 30 2006

page 1

Search completed in 0.002 seconds

Lookup | Welcome | Find friends | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
More pages | Superseeker | Maintained by N. J. A. Sloane (njas@research.att.com)

Last modified November 18 20:14 EST 2008. Contains 147244 sequences.


AT&T Labs Research