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).

Original entry on oeis.org

92, 130, 132, 136, 154, 270, 286, 384, 398, 456, 546, 608, 630, 636, 702, 934, 944, 2730, 4394, 4470, 4556, 5544, 12084, 14320, 17572, 22632, 27808, 27930, 31150, 31284, 32534, 36346, 41004, 41544, 42274, 56916, 58552, 61680, 66654, 74826, 86200
Offset: 1

Views

Author

Giuseppe Coppoletta, Jun 20 2016

Keywords

Comments

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.
Conjecture: the sequence is infinite and each term has only one decomposition into a sum of suitable primes p,q.
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

Examples

			92 = 19 + 73 with pi(19) * pi(73) = 8 * 21 = 168 = sigma(92).
		

Crossrefs

Programs

  • Maple
    N:= 10^6: # to use primes up to N
    Primes:= select(isprime, [2,seq(i,i=3..N,2)]):
    filter:= proc(n) local s,i,j;
      s:= numtheory:-sigma(n);
      for i in select(`>=`,numtheory:-divisors(s), ceil(sqrt(s))) minus {s} do
         if i > nops(Primes) then return FAIL
         elif Primes[i] + Primes[s/i] = n then return true fi
      od:
      false
    end proc:
    A:= NULL:
    for n from 2 by 2 do
      v:= filter(n);
      if v = FAIL then break
      elif v then A:= A, n
      fi
    od:
    A; # Robert Israel, Jun 30 2016
  • Mathematica
    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 *)
  • 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
    
  • 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
  • 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)]
    v=[n for n in range(2,100000,2) if sol(n)]
    print('list_n =',v)
    w=[sigma(n) for n in v]; print('list_sigma(n) =',w)
    list_pi(p)=flatten([sol(n) for n in range(2,100000,2) if sol(n)])
    print('list_pi(p) =',list_pi(p))
    list_pi(q)=[w[n]/list_pi[n] for n in range(len(v))]
    print('list_pi(q) =',list_pi(q))
    

Formula

Integers n such that sigma(n) = pi(q) * pi(n-q) for some prime q.