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!)
A140365 a(n) = sum of primes in {6*n-5, 6*n-1}. 0
5, 18, 30, 42, 29, 31, 78, 90, 53, 59, 61, 138, 73, 162, 89, 0, 198, 210, 222, 0, 0, 258, 137, 139, 149, 151, 157, 330, 173, 179, 181, 191, 390, 199, 0, 211, 0, 450, 462, 239, 241, 251, 257, 263, 269, 271, 558, 283, 293, 0, 0, 618, 630, 0, 0, 331, 337, 347, 702 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

LINKS

Table of n, a(n) for n=1..59.

FORMULA

a(n) = (6n-5)*isprime(6n-5) + (6n-1)*isprime(6n-1), where isprime = A010051. - M. F. Hasler, Jun 15 2008

EXAMPLE

6*11 - 5 = 61 is prime, but 6*11 - 1 = 65 is not prime, so a(11) = 61.

MAPLE

a:= n-> add(i, i=select(isprime, [6*n-5, 6*n-1])):

seq(a(n), n=1..59);  # Alois P. Heinz, May 18 2021

PROG

(PARI) a(n)=(6*n-5)*isprime(6*n-5)+(6*n-1)*isprime(6*n-1) \\ M. F. Hasler, Jun 15 2008

(Python)

from sympy import isprime

def a(n): return sum(k*isprime(k) for k in {6*n-5, 6*n-1})

print([a(n) for n in range(1, 60)]) # Michael S. Branicky, May 18 2021

CROSSREFS

Cf. A002476, A007528.

Sequence in context: A155450 A322409 A287894 * A063294 A063141 A154609

Adjacent sequences:  A140362 A140363 A140364 * A140366 A140367 A140368

KEYWORD

nonn

AUTHOR

Juri-Stepan Gerasimov, Jun 10 2008

EXTENSIONS

Edited by M. F. Hasler, Jun 15 2008

a(52) corrected and a(58) deleted by Michael S. Branicky, May 18 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 October 1 19:48 EDT 2022. Contains 357172 sequences. (Running on oeis4.)