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!)
A332860 a(n) is the least prime p such that p+prime(n) has exactly n prime factors, counted with multiplicity. 1
3, 3, 3, 17, 37, 83, 271, 557, 1129, 2531, 2017, 21467, 28631, 24533, 73681, 98251, 196549, 589763, 524221, 2621369, 5242807, 14155697, 69205933, 16777127, 83885983, 67108763, 1543503769, 1006632853, 1342177171, 3623878543, 11811159937, 54358179709, 32212254583, 225485782901, 260919263083 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

LINKS

Robert Israel, Table of n, a(n) for n = 1..400

FORMULA

A001222(a(n)+A000040(n)) = n.

EXAMPLE

a(4) = 17 because 17 is prime and 17 + prime(4) = 17 + 7 = 24 = 2^3*3 has 4 prime factors counted with multiplicity, and no smaller prime works.

MAPLE

g:= proc(n, N, pmax)

local Res, k, p;

if n = 0 then return [[]] fi;

Res:= NULL;

p:=1;

do

  p:= nextprime(p);

  if p >= pmax or 2^(n-1)*p > N then return [Res] fi;

  for k from 1 to n while 2^(n-k)*p^k <= N do

    Res:= Res, op(map(t -> [op(t), p$k], procname(n-k, N/p^k, p)));

  od;

od;

end proc:

h:= (n, N) -> sort(map(convert, g(n, N, N/2^(n-1)+1), `*`)):

f:= proc(n) local pn, N, lastN, R, r;

  pn:= ithprime(n);

  N:= 2^n-1;

  do

    lastN:= N;

    N:= 2*N;

    R:= select(`>`, h(n, N), lastN);

    for r in R do if r > pn and isprime(r-pn) then return r-pn fi od;

  od;

end proc:

map(f, [$1..50]);

CROSSREFS

Cf. A000040, A001222.

Sequence in context: A176248 A290159 A083562 * A106542 A342363 A229934

Adjacent sequences:  A332857 A332858 A332859 * A332861 A332862 A332863

KEYWORD

nonn

AUTHOR

J. M. Bergot and Robert Israel, Mar 10 2020

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 June 18 11:58 EDT 2021. Contains 345098 sequences. (Running on oeis4.)