cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A283302 Maximum number of pairs of primes (p,q) such that p < q <= prime(n) and p + q = constant.

This page as a plain text file.
%I A283302 #21 Mar 06 2017 19:43:07
%S A283302 0,1,1,1,1,2,2,3,3,3,4,4,4,5,5,6,6,6,6,6,7,8,9,9,9,9,9,10,11,12,12,12,
%T A283302 12,12,12,12,12,13,13,14,14,15,16,17,18,19,19,19,19,19,19,19,19,19,19,
%U A283302 19,19,19,19,19,20,21,21,22,23,24,24,24,24,24,24,24,24,25,26,27,27,28,29,30,30,30,30,30,30,30,30,30,30,30
%N A283302 Maximum number of pairs of primes (p,q) such that p < q <= prime(n) and p + q = constant.
%C A283302 Maximum number of different ways of expressing a number as a sum of two distinct primes less than or equal to prime(n).
%C A283302 Is there any n such that a(n+1) - a(n) > 1?
%C A283302 What is the asymptotic behavior of a(n)?
%C A283302 To answer the first question: for all n, either a(n+1) = a(n) or a(n+1) = a(n) + 1. - _Charles R Greathouse IV_, Mar 06 2017
%H A283302 Charles R Greathouse IV, <a href="/A283302/b283302.txt">Table of n, a(n) for n = 1..10000</a>
%F A283302 a(n) >> n/log n. In particular, lim inf a(n) * (log n)/n >= 1/4. - _Charles R Greathouse IV_, Mar 06 2017
%e A283302 a(1)=0 because there are no two distinct primes less than or equal to prime(1)=2.
%e A283302 a(2)=1 because there are only two distinct primes less than or equal to prime(2)=3, and then there is only one sum among them: 2 + 3 = 5.
%e A283302 a(3)=1 because the three pairs of distinct primes less than or equal to prime(3)=5, i.e., (2,3), (3,5), and (2,5), produce different sums: 2 + 3 = 5, 3 + 5 = 8, and 2 + 5 = 7.
%e A283302 a(6)=2 because among all pairs of distinct primes taken from the first six primes, 2, 3, 5, 7, 11, and 13, there are at most two pairs with same sum, e.g., 3 + 13 = 5 + 11 = 16.
%e A283302 a(8)=3 because among all pairs of distinct primes taken from the first eight primes, 2, 3, 5, 7, 11, 13, 17, and 19, there are at most three pairs with the same sum, i.e., 5 + 19 = 7 + 17 = 11 + 13 = 24.
%t A283302 a[n_]:=Module[{fp,fps,fpst,fpstt,fpstts,fpsttst},
%t A283302 fp=Prime[Range[n]];
%t A283302 fps=Subsets[fp,{2}];
%t A283302 fpst=Table[Total[fps[[j]]],{j,1,Length[fps]}];
%t A283302 fpstt=fpst//Tally;
%t A283302 fpstts=fpstt//Sort[#,#1[[2]]>#2[[2]]&]&;
%t A283302 If [n<2,0,fpsttst=fpstts//Transpose;fpsttst[[2]]//Max]//Return];
%t A283302 Table[a[n],{n,1,120}]
%o A283302 (PARI) first(n)=my(v=vector(n), P=primes(n), H=vectorsmall((P[#P]+P[#P-1])/2)); v[2]=1; for(n=3, #P, for(i=2, n-1, H[(P[n]+P[i])/2]++); v[n]=vecmax(H)); v \\ _Charles R Greathouse IV_, Mar 06 2017
%K A283302 nonn
%O A283302 1,6
%A A283302 _Andres Cicuttin_, Mar 04 2017