OFFSET
1,1
COMMENTS
Surprisingly many terms are prime numbers: 31,71,311,1151,14831,455471.
Positions of a(n) in A127345: {1,2,4,5,7,19,30,76,142}.
Positions of a(n) in A034961: {4,8,26,41,75,660,1780,14009,54929}.
Positions of primes in a(n): {1,2,3,5,6,8,21,22,25,32,37,39,40,45,49,50, 59,62,66,69,...}. - Michael De Vlieger, May 28 2017
LINKS
Chai Wah Wu, Table of n, a(n) for n = 1..10000
EXAMPLE
31 is in the sequence because it is both the total of three consecutive primes (7 + 11 + 13) and it is (2*3 + 2*5 + 3*5) = (6 + 10 + 15). - Michael De Vlieger, May 28 2017
MATHEMATICA
Intersection[Map[Total, #], Map[#1 #2 + #1 #3 + #2 #3 & @@ # &, #]] &@ Partition[Prime@ Range[10^6], 3, 1] (* Michael De Vlieger, May 28 2017 *)
PROG
(Python)
from __future__ import division
from sympy import isprime, prevprime, nextprime
A287609_list, p, q, r = [], 2, 3, 5
while r < 10**6:
n = p*(q+r) + q*r
m = n//3
pm, nm = prevprime(m), nextprime(m)
k = n - pm - nm
if isprime(m):
if m == k:
A287609_list.append(n)
else:
if nextprime(nm) == k or prevprime(pm) == k:
A287609_list.append(n)
p, q, r = q, r, nextprime(r) # Chai Wah Wu, May 31 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
Zak Seidov, May 27 2017
EXTENSIONS
More terms from Michael De Vlieger, May 28 2017
STATUS
approved