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!)
A241531 a(n) = smallest k>=1 such that 2*prime(n) - k^2 is semiprime (or 0 if there is no such k). 4
0, 0, 1, 2, 1, 1, 1, 2, 5, 1, 2, 3, 5, 1, 1, 7, 5, 1, 1, 1, 1, 4, 5, 1, 3, 1, 1, 1, 1, 3, 1, 3, 3, 2, 3, 1, 3, 5, 5, 5, 7, 1, 1, 2, 1, 2, 3, 1, 1, 2, 7, 3, 1, 1, 3, 3, 1, 2, 1, 3, 1, 7, 5, 5, 2, 1, 6, 5, 3, 1, 3, 1, 4, 1, 3, 7, 5, 1, 3, 1, 5, 1, 7, 1, 3, 13 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,4

LINKS

Table of n, a(n) for n=1..86.

EXAMPLE

Let n=22, then 2*prime(22) = 2*79 = 158. We have 158-1=157, 158-4=154, 158-9=149, 158-16=142, and only the last number is semiprime. So a(22)=4.

PROG

(PARI) a(n) = {k = 1; while ((v = 2*prime(n) - k^2) && (v > 0) && (bigomega(v) != 2), k++); if (v <= 0, 0, k); } \\ Michel Marcus, Apr 25 2014

CROSSREFS

Cf. A001358.

Sequence in context: A061545 A287641 A265312 * A273894 A308035 A221131

Adjacent sequences:  A241528 A241529 A241530 * A241532 A241533 A241534

KEYWORD

nonn

AUTHOR

Vladimir Shevelev, Apr 25 2014

EXTENSIONS

More terms from Michel Marcus, Apr 25 2014

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 July 14 08:33 EDT 2020. Contains 335720 sequences. (Running on oeis4.)