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.

A184939 From the base sequence of the positive integers, keep the first two, remove the next three, keep the next five, remove the next seven, ..., block lengths determined by the prime numbers.

This page as a plain text file.
%I A184939 #16 Jul 04 2019 12:16:03
%S A184939 1,2,6,7,8,9,10,18,19,20,21,22,23,24,25,26,27,28,42,43,44,45,46,47,48,
%T A184939 49,50,51,52,53,54,55,56,57,58,78,79,80,81,82,83,84,85,86,87,88,89,90,
%U A184939 91,92,93,94,95,96,97,98,99,100,130,131,132
%N A184939 From the base sequence of the positive integers, keep the first two, remove the next three, keep the next five, remove the next seven, ..., block lengths determined by the prime numbers.
%C A184939 Accept 1st prime, reject 2nd prime, accept 3rd prime, reject 4th prime, ... starting with natural numbers A000027. First string of consecutive values ends with 2, second such string ends with 10 = 2+3+5, 3rd such string ends with 28 = 2+3+5+7+11, namely A007504(2k+1).
%H A184939 Harvey P. Dale, <a href="/A184939/b184939.txt">Table of n, a(n) for n = 1..1000</a>
%e A184939 In parentheses the blocks of integers removed: 1 2 (3 4 5) 6 7 8 9 10 (11 12 13 14 15 16 17) 18 19 20 21 22 23 24 25 26 27 28 (29 30 ...).
%p A184939 L := [] ; p := 2 ; ptr := 1 ;
%p A184939 while p < 40 do
%p A184939         L := [op(L),seq(j,j=ptr..ptr+p-1)] ; ptr := ptr+p ; p := nextprime(p) ;
%p A184939         ptr := ptr+p ; p := nextprime(p) ;
%p A184939 end do:
%p A184939 L ; # _R. J. Mathar_, Feb 08 2011
%t A184939 Module[{nn=20,t},t=Total[Prime[Range[nn]]];Take[TakeList[Range[t],Prime[ Range[nn]]],{1,nn,2}]]//Flatten (* Requires Mathematica version 10 or later *) (* _Harvey P. Dale_, Jul 04 2019 *)
%Y A184939 Cf. A000040, A004201, A007504.
%K A184939 nonn,easy
%O A184939 1,2
%A A184939 _Jonathan Vos Post_, Feb 02 2011