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!)
A285905 a(n) = A275768(A002110(n)). 1
0, 0, 5, 26, 124, 852, 7550, 86125, 1250924, 23748764 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,3

COMMENTS

The number of ways to express primorial p_n# = A002110(n) as (prime(i) + prime(j))/2 when (prime(i) - prime(j))/2 also is prime.

Let p_n < q <= prime(pi(p_n#)), with pi(p_n#) = A000849(n). All such primes q are coprime to primorial p_n# since they are larger than the greatest prime factor of p_n#. One of the two primes counted by a(n) must be a prime q, the other a prime r = (2p_n# - q). Further, (r - q) must be prime to be counted by a(n). Therefore an efficient method of computing a(n) begins with generating the range of prime totatives prime(n + 1) <= q <= prime(pi(p_n#)) of primorial p_n#, the number of which is given by A048862(n).

a(n) < A048862(n) < A000849(n) for n > 2.

LINKS

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

Eric Weisstein's World of Mathematics, Primorial

Eric Weisstein's World of Mathematics, Totative

EXAMPLE

a(3) = 5 since there are 5 ways to express A002110(3) = 30 as (prime(i) + prime(j))/2 with (prime(i) - prime(j))/2 also prime:

  (53 + 7)/2 = 30, (53 - 7)/2 = 46/2 = 23

  (47 + 13)/2 = 30, (47 - 13)/2 = 34/2 = 17

  (43 + 17)/2 = 30, (43 - 17)/2 = 26/2 = 13

  (41 + 19)/2 = 30, (41 - 19)/2 = 22/2 = 11

  (37 + 23)/2 = 30, (37 - 23)/2 = 14/2 = 7.

MATHEMATICA

With[{j = 10^3}, Do[Module[{P = Times @@ Prime@ Range@ n, m}, m = PrimePi@ P; Print@ Total@ Reap[Do[Sow@ Count[Map[{2 P - #, #} &, Prime@ Range[Max[n, k], Min[k + j - 1, m]]], w_ /; And[PrimeQ@ First@ w, PrimeQ[(Subtract @@ w)/2]]], {k, 1, m, j}]][[-1, 1]]], {n, 9}]] (* or *)

Table[Function[P, Count[Map[{2 P - #, #} &, #], w_ /; And[PrimeQ@ First@ w, PrimeQ[(Subtract @@ w)/2]]] &@ Flatten@ Select[Prime@ Range[n + 1, PrimePi[P]], Times @@ Boole@ Map[PrimeQ, {#, P - #}] == 1 &]]@ Product[Prime@ i, {i, n}], {n, 9}] (* Michael De Vlieger, May 03 2017 *)

countOfPrimes = 0

countOfPrimes2 = 0

countOfPrimes3 = 0

Pn10 = 2*3*5*7*11*13*17*19*23*29

PnToUse = Pn10

distanceToCheck = PnToUse

For[i=0, i<distanceToCheck, i++,

If[PrimeQ[2*PnToUse-i],

countOfPrimes++

If[PrimeQ[(2*PnToUse-i)-PnToUse],

countOfPrimes2++

If[PrimeQ[i],

countOfPrimes3++]], ]]

Print[countOfPrimes3]

(*code example for Pn(10) outputs a(10)=23748764*)

(* Jamie Morken, May 05 2017 *)

CROSSREFS

Cf. A000849, A002110, A048862, A275768.

Sequence in context: A171702 A254825 A272123 * A247491 A244617 A003583

Adjacent sequences:  A285902 A285903 A285904 * A285906 A285907 A285908

KEYWORD

nonn,hard,more

AUTHOR

Michael De Vlieger and Jamie Morken, May 03 2017

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 May 31 15:41 EDT 2020. Contains 334748 sequences. (Running on oeis4.)