login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A181709 Indices of primes in A007310. 3
2, 3, 4, 5, 6, 7, 8, 10, 11, 13, 14, 15, 16, 18, 20, 21, 23, 24, 25, 27, 28, 30, 33, 34, 35, 36, 37, 38, 43, 44, 46, 47, 50, 51, 53, 55, 56, 58, 60, 61, 64, 65, 66, 67, 71, 75, 76, 77, 78, 80, 81, 84, 86, 88, 90, 91, 93, 94, 95, 98, 103, 104, 105, 106, 111, 113, 116, 117, 118 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

COMMENTS

All primes but 2 and 3 are present in A007310, making this sequence an efficient method for storing large quantities of primes. To unpack this sequence into primes, use the formula (6n + (-1)^n - 3) / 2.

Indices 1 and 9 (1 and 25) are the smallest nonprimes.

LINKS

Grant Garcia, Table of n, a(n) for n=1..10000

FORMULA

a(n) = floor(prime(n+2)/3)+1  = A144769(n+2)+1. - Gary Detlefs, Dec 11 2011

EXAMPLE

A007310(2), 5, is the first prime of the sequence.

A007310(50), 149, is also a prime, hence 50 is included.

PROG

(Python) import pyecm

# pyecm can be obtained from pyecm.sourceforge.net

out = ""

for n, p in enumerate([pyecm.isprime((6*n+(-1)**n-3)/2)for n in xrange(1, 1000)]): out+=["", "%s "%str(n+1)][p]

for n, p in enumerate(out.rstrip(" ").split(" ")): print n+1, p

CROSSREFS

Cf. A007310, A000040.

Sequence in context: A131565 A039218 A076487 * A033106 A119485 A058363

Adjacent sequences:  A181706 A181707 A181708 * A181710 A181711 A181712

KEYWORD

easy,nonn

AUTHOR

Grant Garcia, Nov 07 2010

STATUS

approved

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

Content is available under The OEIS End-User License Agreement .

Last modified September 10 19:13 EDT 2015. Contains 261502 sequences.