cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A181709 Indices of primes in A007310.

This page as a plain text file.
%I A181709 #24 May 19 2021 16:04:32
%S A181709 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,
%T A181709 36,37,38,43,44,46,47,50,51,53,55,56,58,60,61,64,65,66,67,71,75,76,77,
%U A181709 78,80,81,84,86,88,90,91,93,94,95,98,103,104,105,106,111,113,116,117,118
%N A181709 Indices of primes in A007310.
%C A181709 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.
%C A181709 Indices 1 and 9 (1 and 25) are the smallest nonprimes.
%H A181709 Grant Garcia, <a href="/A181709/b181709.txt">Table of n, a(n) for n=1..10000</a>
%F A181709 a(n) = floor(prime(n+2)/3)+1  = A144769(n+2)+1. - _Gary Detlefs_, Dec 11 2011
%F A181709 a(n) ~ n*log(n)/3. - _Ilya Gutkovskiy_, Jul 18 2016
%e A181709 A007310(2), 5, is the first prime of the sequence.
%e A181709 A007310(50), 149, is also a prime, hence 50 is included.
%t A181709 Floor[Prime[Range[3,80]]/3]+1 (* _Harvey P. Dale_, Sep 12 2019 *)
%o A181709 (Python)
%o A181709 from sympy import isprime
%o A181709 out = ""
%o A181709 for n,p in enumerate(isprime((6*n+(-1)**n-3)//2) for n in range(1,1000)):
%o A181709     out+=["","%s "%str(n+1)][p]
%o A181709 for n,p in enumerate(out.rstrip(" ").split(" ")): print(n+1,p)
%Y A181709 Cf. A007310, A000040.
%K A181709 easy,nonn
%O A181709 1,1
%A A181709 _Grant Garcia_, Nov 07 2010