[go: up one dir, main page]

login
Search: a046926 -id:a046926
     Sort: relevance | references | number | modified | created      Format: long | short | data
Number of ways of writing prime(n) in the form 2*prime(i)+prime(j).
+10
3
0, 0, 0, 1, 2, 2, 4, 2, 3, 4, 2, 4, 5, 4, 4, 5, 3, 3, 5, 4, 4, 5, 4, 7, 6, 6, 5, 6, 6, 8, 6, 6, 8, 5, 8, 6, 6, 9, 5, 9, 7, 6, 6, 7, 10, 7, 8, 8, 6, 9, 12, 10, 7, 7, 11, 8, 10, 8, 11, 12, 9, 10, 12, 8, 10, 14, 12, 12, 7, 9, 12, 12, 11, 13, 10, 10, 15, 12, 15, 11, 12, 9, 12, 12, 12, 14, 12, 14, 13
OFFSET
1,5
COMMENTS
First nonzero entry is for n=4: prime(4)=7=prime(1)+2*prime(3)=2+3*3, hence a(4)=1. Also, a(5)=2 because 11=5+2*3=7+2*2 (two solutions). Note that a(n) is not monotonic. - Zak Seidov, Jan 21 2006
Marnell conjectures that a(n) > 0 for n > 3. I find no exceptions below 10^9. - Charles R Greathouse IV, May 04 2010
REFERENCES
Geoffrey R. Marnell, "Ten Prime Conjectures", Journal of Recreational Mathematics 33:3 (2004-2005), pp. 193-196.
LINKS
FORMULA
a(n) = A046926(prime(n)). - David Wasserman, Oct 08 2005
EXAMPLE
11=2*2+7=2*3+5, so a(5)=2
a(100)=13 because p(100)=541=p(i)+2*p(j) for 13 pairs {i, j}: {2, 57}, {17, 53}, {23, 50}, {41, 42}, {49, 37}, {52, 36}, {56, 34}, {69, 25}, {76, 22}, {81, 18}, {91, 12}, {92, 11}, {96, 8}; e.g. 541=prime(96)+2*prime(8)=503+2*19. - Zak Seidov, Jan 21 2006
MATHEMATICA
Table[Function[q, Length@ Select[#, Function[s, And[Length@ s == 2, Length@ First@ s == 1, MemberQ[Last@ , 2], Length@ Last@ s == 2]]] &@ Map[SortBy[Flatten[FactorInteger[#] /. {{p_, e_} /; e > 1 :> ConstantArray[p, e], {p_, 1} /; p > 1 :> p, {1, 1} -> 1}] & /@ #, Length] &, Select[IntegerPartitions[q, {2}], And[! MemberQ[#, 1], Total@ Boole@ PrimeQ@ # == 1] &]]]@ Prime@ n, {n, 89}] (* Michael De Vlieger, May 01 2017 *)
PROG
(PARI) a(n, q=prime(n))=my(s); forprime(p=2, q\2-1, if(isprime(q-2*p), s++)); s \\ Charles R Greathouse IV, Jul 22 2015
KEYWORD
nonn
AUTHOR
Yasutoshi Kohmoto, Jan 27 2005
EXTENSIONS
More terms from David Wasserman, Oct 08 2005
Edited by N. J. A. Sloane at the suggestion of Andrew S. Plewe, Jul 14 2007
STATUS
approved
a(n) is the least positive number that can be represented in exactly n ways as 2*p+q where p and q are primes.
+10
1
1, 6, 9, 21, 17, 33, 45, 51, 75, 99, 111, 93, 105, 135, 153, 201, 165, 249, 231, 237, 321, 225, 273, 363, 411, 393, 285, 315, 471, 483, 435, 405, 465, 555, 681, 495, 783, 675, 873, 849, 963, 1729, 585, 525, 897, 795, 1041, 915, 735, 855, 1191, 825, 765, 1095, 975, 1005, 1035, 1125, 1311, 1407
OFFSET
0,2
COMMENTS
a(n) is the least number k such that A046926(k) = n.
LINKS
EXAMPLE
a(3) = 21 because 21 can be written as 2*p+q with p and q prime in exactly 3 ways, namely 21 = 2*2+17 = 2*5+11 = 2*7+7, and no smaller number works.
MAPLE
M:= 3000: # to use primes up to M
P:= select(isprime, [2, seq(i, i=3..M, 2)]): nP:= nops(P):
A:= Vector(M):
for i from 1 do
p:= P[i];
if 2*p >= M then break fi;
for j from 1 to nP do
q:= P[j];
v:= 2*p+q;
if v > M then break fi;
A[v]:= A[v]+1;
od od:
K:= max(A):
V:= Array(0..K+1):
for i from 1 to M do
if V[A[i]] = 0 then V[A[i]]:= i fi
od:
L:= min(select(t -> V[t] = 0, [$1..K+1])):
convert(V[0..L-1], list);
CROSSREFS
KEYWORD
nonn
AUTHOR
J. M. Bergot and Robert Israel, Jul 03 2022
STATUS
approved

Search completed in 0.004 seconds