[go: up one dir, main page]

login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Revision History for A339269 (Bold, blue-underlined text is an addition; faded, red-underlined text is a deletion.)

Showing entries 1-10 | older changes
a(n) is the least number that is the product of n primes (not necessarily distinct) and is the sum of n consecutive primes, or 0 if there are none.
(history; published version)
#12 by Susanna Cuyler at Mon Nov 30 21:39:30 EST 2020
STATUS

proposed

approved

#11 by Robert Israel at Mon Nov 30 17:50:21 EST 2020
STATUS

editing

proposed

#10 by Robert Israel at Mon Nov 30 17:50:07 EST 2020
LINKS

Robert Israel, <a href="/A339269/b339269.txt">Table of n, a(n) for n = 1..50</a>

#9 by Robert Israel at Mon Nov 30 10:38:36 EST 2020
COMMENTS

If n > 2 is odd, the sum of n consecutive odd primes is odd, so (if nonzero) a(n) >= 3^n.

STATUS

approved

editing

#8 by N. J. A. Sloane at Sun Nov 29 21:57:15 EST 2020
STATUS

proposed

approved

#7 by Robert Israel at Sun Nov 29 14:52:25 EST 2020
STATUS

editing

proposed

#6 by Robert Israel at Sun Nov 29 14:52:19 EST 2020
FORMULA

a(n) = A143121(A339185(n)+n, A339185(n)).

#5 by Robert Israel at Sun Nov 29 14:44:20 EST 2020
CROSSREFS
#4 by Robert Israel at Sun Nov 29 12:46:50 EST 2020
NAME

a(n) is the least number that is the product of n primes (not necessarily distinct) and is the sum of n consecutive primes, or 0 if there are none.

MAPLE

sumofconsecprimes:= proc(x, n)

local P, k, p, q, t;

P:= nextprime(floor(x/n));

p:= P; q:= P;

for k from 1 to n-1 do

if k::even or q = 2 then p:= nextprime(p); P:= P, p;

else q:= prevprime(q); P:= q, P;

fi

od;

P:= [P];

t:= convert(P, `+`);

if t = x then return P fi;

if t > x then

while t > x do

if q = 2 then return false fi;

q:= prevprime(q);

t:= t + q - p;

P:= [q, op(P[1..-2])];

p:= P[-1];

if t = x then return P fi;

od

else

while t < x do

p:= nextprime(p);

t:= t + p - q;

P:= [op(P[2..-1]), p];

q:= P[1];

if t = x then return P fi;

od

fi;

false

end proc:

children:= proc(r) local L, x, p, q, t, R;

x:= r[1];

L:= r[2];

t:= L[-1];

p:= t[1]; q:= nextprime(p);

if t[2]=1 then t:= [q, 1];

else t:= [p, t[2]-1], [q, 1]

fi;

R:= [x*q/p, [op(L[1..-2]), t]];

if nops(L) >= 2 then

p:= L[-2][1];

q:= L[-1][1];

if L[-2][2]=1 then t:= [q, L[-1][2]+1]

else t:= [p, L[-2][2]-1], [q, L[-1][2]+1]

fi;

R:= R, [x*q/p, [op(L[1..-3]), t]]

fi;

[R]

end proc:

f:= proc(n) local Q, t, x, v;

uses priqueue;

initialize(Q);

if n::even then insert([-2^n, [[2, n]]], Q)

else insert([-3^n, [[3, n]]], Q)

fi;

do

t:= extract(Q);

x:= -t[1];

v:= sumofconsecprimes(x, n);

if v <> false then return x fi;

for t in children(t) do insert(t, Q) od;

od

end proc:

f(1):= 2:

f(2):= 0:

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

#3 by Robert Israel at Sun Nov 29 12:04:55 EST 2020
OFFSET

0,1,1

COMMENTS

Conjecture: a(n) > 0 for every n > 2.

EXAMPLE

a(3)=425 because 425 = 5^2*7 is the product of three primes and 425 = 137+139+149 is the sum of three consecutive primes, and no smaller number has this property.