login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A060253 Numbers n such that difference between n-th prime and n-th composite number is prime. 2
1, 2, 3, 4, 7, 9, 10, 11, 13, 14, 19, 24, 25, 32, 34, 37, 60, 64, 65, 67, 71, 75, 79, 83, 87, 95, 104, 105, 111, 115, 124, 130, 132, 133, 138, 145, 152, 153, 161, 163, 166, 174, 182, 187, 188, 190, 212, 213, 217, 220, 243, 246, 251, 255, 257, 264, 275, 279, 281 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
LINKS
FORMULA
Values of n such that A000040(n)-A002808(n)=p(n)-c(n) is a prime number.
EXAMPLE
n=10: p(10)=29, c(10)=18, c(10)-p(10)=11, so 10=a(7) is here.
MATHEMATICA
f[ n_Integer ] := Block[ {k = n + PrimePi[ n ] + 1}, While[ k - PrimePi[ k ] - 1 != n, k++ ]; k ]; Select[ Range[ 500 ], PrimeQ[ Prime[ # ] - f[ # ] ] & ]
Module[{nn=2000, pr, cm, len, th}, pr=Prime[Range[PrimePi[nn]]]; cm=Select[ Range[ nn], CompositeQ]; len=Min[Length[pr], Length[cm]]; th=Thread[{Take[ pr, len], Take[ cm, len]}]; Position[th, _?(PrimeQ[Abs[#[[1]]-#[[2]]]]&)]]// Quiet//Flatten (* Harvey P. Dale, Jun 29 2020 *)
CROSSREFS
Numbers n such that A038529(n) is prime. Cf. A000040, A002808.
Sequence in context: A047548 A095378 A141489 * A066276 A047340 A270711
KEYWORD
easy,nonn
AUTHOR
Robert G. Wilson v, Mar 22 2001
STATUS
approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 23 20:33 EDT 2024. Contains 371916 sequences. (Running on oeis4.)