login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A224979 Number of primes of the form p-q+1 where q is any prime < p = prime(n). 2
0, 1, 1, 2, 2, 3, 4, 4, 6, 6, 4, 3, 8, 6, 10, 10, 12, 5, 4, 12, 9, 8, 16, 18, 6, 16, 10, 16, 12, 20, 6, 18, 16, 14, 24, 8, 9, 10, 26, 22, 28, 12, 22, 13, 26, 16, 12, 14, 24, 18, 30, 36, 16, 32, 28, 32, 38, 14, 13, 32, 16, 38, 16, 34, 17, 30, 12, 18, 32, 26 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,4

LINKS

Harvey P. Dale, Table of n, a(n) for n = 1..1000

EXAMPLE

For n=5, p=11, there are a(5)=2 solutions: 11-5+1=7 and 11-7+1=5.

MATHEMATICA

Table[p = Prime[n]; c = 0; i = 1; While[i < n, If[PrimeQ[p - Prime[i] + 1], c = c + 1]; i++]; c, {n, 70}]

Table[Count[Prime[n]-Prime[Range[n-1]]+1, _?PrimeQ], {n, 70}] (* Harvey P. Dale, Jan 08 2015 *)

PROG

(PARI) a(n)=my(p=prime(n), s); forprime(q=2, p-1, s+=isprime(p-q+1)); s \\ Charles R Greathouse IV, Apr 22 2013

CROSSREFS

Cf. A224748, A224908.

Sequence in context: A206922 A276775 A271169 * A211317 A126246 A173633

Adjacent sequences:  A224976 A224977 A224978 * A224980 A224981 A224982

KEYWORD

nonn

AUTHOR

Jayanta Basu, Apr 22 2013

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 November 18 17:45 EST 2019. Contains 329287 sequences. (Running on oeis4.)