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.

A332981 Smallest semiprime m = p*q such that the sum s = p + q can be expressed as an unordered sum of two primes in exactly n ways.

This page as a plain text file.
%I A332981 #34 Jun 30 2021 01:53:09
%S A332981 4,21,57,93,183,291,327,395,501,545,695,791,815,831,1145,1205,1415,
%T A332981 1631,1461,1745,1941,1865,2661,2315,2615,2855,2495,2285,3665,2705,
%U A332981 2721,3521,3561,3351,3755,4341,3545,4701,4265,4881,3981,4821,5601,5255,6671,6041,4595
%N A332981 Smallest semiprime m = p*q such that the sum s = p + q can be expressed as an unordered sum of two primes in exactly n ways.
%C A332981 The unique square and even term of the sequence is a(1) = 4.
%C A332981 For n = 1, the sequence of semiprimes having a unique decomposition as the sum of two primes begins with 4, 6, 9, 10, 14, 15, 22, 26, 34, 35, 38, 46, 58, 62, ... containing the even semiprimes (A100484).
%C A332981 We observe a majority of terms where a(n) == 5 (mod 10).
%H A332981 Michel Marcus, <a href="/A332981/b332981.txt">Table of n, a(n) for n = 1..501</a>
%e A332981 a(11) = 695 because 695 = 5*139 and the sum 5 + 139 = 144 = 5+139 = 7+137 = 13+131 = 17+127 = 31+113 = 37+107 = 41+103 = 43+101 = 47+97 = 61+83 = 71+73. There are exactly 11 decompositions of 144 into an unordered sum of two primes.
%p A332981 with(numtheory):
%p A332981 for n from 1 to 50 do:
%p A332981 ii:=0:
%p A332981 for k from 2 to 10^8 while(ii=0) do:
%p A332981 x:=factorset(k):it:=0:
%p A332981 if bigomega(k) = 2
%p A332981   then
%p A332981    s:=x[1]+k/x[1]:
%p A332981     for m from 1 to s/2 do:
%p A332981      if isprime(m) and isprime(s-m)
%p A332981       then
%p A332981        it:=it+1:
%p A332981        else fi:
%p A332981      od:
%p A332981      if it = n
%p A332981      then
%p A332981       ii:=1: printf(`%d, `,k):
%p A332981      else fi:
%p A332981      fi:
%p A332981     od:
%p A332981     od:
%o A332981 (PARI) nbp(k) = {my(nb = 0); forprime(p=2, k\2, if (isprime(k-p), nb++););nb;}
%o A332981 a(n) = {forcomposite(k=1, oo, if (bigomega(k)==2, my(x=factor(k)[1,1]); if (nbp(x+k/x)==n, return(k));););} \\ _Michel Marcus_, Apr 26 2020
%Y A332981 Cf. A001358, A002375, A006881, A023036, A100484, A136244.
%K A332981 nonn
%O A332981 1,1
%A A332981 _Michel Lagneau_, Mar 05 2020