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.

A273286 Positive integers n such that n=p+q for some primes p,q with pi(p)*pi(q) = sigma(n).

This page as a plain text file.
%I A273286 #74 Feb 16 2025 08:33:35
%S A273286 92,130,132,136,154,270,286,384,398,456,546,608,630,636,702,934,944,
%T A273286 2730,4394,4470,4556,5544,12084,14320,17572,22632,27808,27930,31150,
%U A273286 31284,32534,36346,41004,41544,42274,56916,58552,61680,66654,74826,86200
%N A273286 Positive integers n such that n=p+q for some primes p,q with pi(p)*pi(q) = sigma(n).
%C A273286 Equivalently, integers n such that sigma(n) = i*j for some i,j with prime(i)+prime(j) = n. Each term is necessarily even, otherwise if n is odd n=2+q < sigma(2+q) = pi(2)*pi(q) = pi(q) < q which is absurd. Also p and q cannot be equal, otherwise sigma(2*p) = 3*(p+1) = pi(p)^2 with no solution.
%C A273286 Conjecture: the sequence is infinite and each term has only one decomposition into a sum of suitable primes p,q.
%C A273286 Using Rosser's theorem we can show that the primes p,q >= 19 and each of them can only occur for a finite number of terms n. - _Robert Israel_, Jun 30 2016
%H A273286 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/RossersTheorem.html">Rosser's Theorem</a>
%F A273286 Integers n such that sigma(n) = pi(q) * pi(n-q) for some prime q.
%e A273286 92 = 19 + 73 with pi(19) * pi(73) = 8 * 21 = 168 = sigma(92).
%p A273286 N:= 10^6: # to use primes up to N
%p A273286 Primes:= select(isprime, [2,seq(i,i=3..N,2)]):
%p A273286 filter:= proc(n) local s,i,j;
%p A273286   s:= numtheory:-sigma(n);
%p A273286   for i in select(`>=`,numtheory:-divisors(s), ceil(sqrt(s))) minus {s} do
%p A273286      if i > nops(Primes) then return FAIL
%p A273286      elif Primes[i] + Primes[s/i] = n then return true fi
%p A273286   od:
%p A273286   false
%p A273286 end proc:
%p A273286 A:= NULL:
%p A273286 for n from 2 by 2 do
%p A273286   v:= filter(n);
%p A273286   if v = FAIL then break
%p A273286   elif v then A:= A, n
%p A273286   fi
%p A273286 od:
%p A273286 A; # _Robert Israel_, Jun 30 2016
%t A273286 Select[Range[10^3], Function[n, Length@ Select[Transpose@ {#, n - #} &@ Range[Floor[n/2]], And[Times @@ Boole@ PrimeQ@ {First@ #, Last@ #} == 1, DivisorSigma[1, First@ # + Last@ #] == PrimePi[First@ #] PrimePi[Last@ #]] &] > 0]] (* _Michael De Vlieger_, Jun 30 2016 *)
%o A273286 (Sage) def sol(n): return [j for j in divisors(sigma(n)) if j^2<= sigma(n) and is_prime(n-nth_prime(j)) and j * prime_pi(n-nth_prime(j))==sigma(n)]
%o A273286 v=[n for n in range(2,100000,2) if sol(n)]
%o A273286 print('list_n =',v)
%o A273286 w=[sigma(n) for n in v]; print('list_sigma(n) =',w)
%o A273286 list_pi(p)=flatten([sol(n) for n in range(2,100000,2) if sol(n)])
%o A273286 print('list_pi(p) =',list_pi(p))
%o A273286 list_pi(q)=[w[n]/list_pi[n] for n in range(len(v))]
%o A273286 print('list_pi(q) =',list_pi(q))
%o A273286 (PARI) is(n) = if(n%2==1, return(0), my(x=n-1, y=1); while(x > y, if(ispseudoprime(x) && ispseudoprime(y) && sigma(x+y)==primepi(x)*primepi(y), return(1)); x--; y++); return(0)) \\ _Felix Fröhlich_, Jun 28 2016
%o A273286 (PARI) is(n) = my( d=divisors(sigma(n))); for(i=1,ceil(#d/2), if(prime(d[i]) + prime(d[#d + 1-i]) == n, return(1))); return(0) \\ _David A. Corneth_, Jun 30 2016
%Y A273286 Cf. A000203, A000720, A272860, A272862.
%K A273286 nonn
%O A273286 1,1
%A A273286 _Giuseppe Coppoletta_, Jun 20 2016