login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A347008 Numbers that can be written in exactly two ways as p*q+p+q where p and q are primes with p < q. 1
23, 47, 119, 167, 179, 323, 407, 419, 527, 587, 639, 647, 879, 935, 1043, 1103, 1119, 1139, 1215, 1223, 1247, 1271, 1331, 1367, 1403, 1455, 1595, 1599, 1631, 1691, 1775, 1791, 1859, 1895, 1931, 1943, 1959, 1967, 1979, 2099, 2111, 2175, 2183, 2219, 2231, 2435, 2471, 2483, 2495, 2543, 2559, 2603 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
EXAMPLE
a(3) = 119 is a term because 119 = 5*19+5+19 = 3*29+3+29 are the two ways to produce 119 = p*q+p+q with primes p < q.
MAPLE
N:= 10000: # to produce terms <= N
R:= Vector(N):
P:= select(isprime, [2, seq(i, i=3..N/3, 2)]):
for i from 1 to nops(P) do
for j from 1 to i-1 do
v:=P[i]*P[j]+P[i]+P[j];
if v <= N then R[v]:= R[v]+1 fi
od od:
select(t -> R[t]=2, [$1..N]);
PROG
(Python)
from sympy import primerange
from collections import Counter
def aupto(limit):
primes = list(primerange(2, limit//3+1))
nums = [p*q+p+q for i, p in enumerate(primes) for q in primes[i+1:]]
counts = Counter([k for k in nums if k <= limit])
return sorted(k for k in counts if counts[k] == 2)
print(aupto(2604)) # Michael S. Branicky, Aug 10 2021
CROSSREFS
Cf. A198277.
Sequence in context: A043197 A043977 A042048 * A239563 A241207 A042050
KEYWORD
nonn
AUTHOR
J. M. Bergot and Robert Israel, Aug 10 2021
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 7 12:06 EDT 2024. Contains 372303 sequences. (Running on oeis4.)