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!)
A340439 a(n) is the number of primes of the form p*q + p*r + q*r where p is the n-th prime and q and r are primes < p. 2
0, 0, 1, 3, 5, 7, 9, 12, 11, 16, 20, 23, 22, 32, 30, 34, 42, 53, 48, 49, 61, 62, 67, 66, 81, 73, 94, 94, 103, 105, 114, 112, 114, 142, 123, 153, 164, 155, 167, 170, 183, 196, 204, 228, 208, 235, 242, 231, 240, 254, 267, 246, 281, 269, 297, 306, 298, 340, 356, 338, 378, 339, 421, 363, 424, 386 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,4
COMMENTS
A prime is counted only once even if it arises in several ways.
LINKS
EXAMPLE
a(6) = 7 because prime(6) = 13 and there are 7 such primes:
71 = 2*3 + 2*13 + 3*13
101 = 2*5 + 2*13 + 5*13
131 = 2*7 + 2*13 + 7*13
151 = 3*7 + 3*13 + 7*13
191 = 5*7 + 5*13 + 7*13 = 2*11 + 2*13 + 11*13
263 = 5*11 + 5*13 + 11*13
311 = 7*11 + 7*13 + 11*13.
MAPLE
f:= proc(n) local i, j, t;
nops(select(isprime, {seq(seq((ithprime(i)+ithprime(j))*ithprime(n)+ithprime(i)*ithprime(j), i=1..j-1), j=2..n-1)}))
end proc:
map(f, [$1..100]);
PROG
(Python)
from sympy import isprime, prime
def aupto(nn):
alst, plst = [], [prime(i) for i in range(1, nn+1)]
for n in range(1, nn+1):
p = plst[n-1]
t = ((p, plst[i], plst[j]) for i in range(n-2) for j in range(i+1, n-1))
u = (p*q + p*r + q*r for p, q, r in t)
alst.append(len(set(s for s in u if isprime(s))))
return alst
print(aupto(66)) # Michael S. Branicky, Jan 07 2021
CROSSREFS
Cf. A340444.
Sequence in context: A061512 A356750 A083964 * A131628 A079091 A353149
KEYWORD
nonn
AUTHOR
Robert Israel, Jan 07 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 April 23 16:40 EDT 2024. Contains 371916 sequences. (Running on oeis4.)