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.

A219178 a(n) = first unlucky number removed at the n-th stage of Lucky sieve.

This page as a plain text file.
%I A219178 #40 Sep 09 2017 22:33:04
%S A219178 2,5,19,27,45,55,85,109,139,157,175,213,255,265,337,363,387,411,423,
%T A219178 457,513,547,597,637,675,715,789,807,843,871,907,987,1033,1083,1113,
%U A219178 1125,1267,1297,1315,1371,1407,1465,1515,1555,1609,1651,1671,1707,1851,1873,1927,1969
%N A219178 a(n) = first unlucky number removed at the n-th stage of Lucky sieve.
%C A219178 First numbers removed by each lucky number in the lucky number sieve. - This is the original definition of the sequence, still valid from a(2) onward.
%C A219178 a(1) = 2, because at the first stage of Lucky sieve, all even numbers are removed, of which 2 is the first one. - _Antti Karttunen_, Feb 26 2015
%H A219178 Antti Karttunen, <a href="/A219178/b219178.txt">Table of n, a(n) for n = 1..333</a>
%H A219178 Wikipedia, <a href="http://en.wikipedia.org/wiki/Lucky_number">Lucky Number</a>
%F A219178 From _Antti Karttunen_, Feb 26 2015: (Start)
%F A219178 a(n) = A255543(n,1).
%F A219178 Other identities.
%F A219178 For all n >= 2, a(n) = A255553(A001248(n)).
%F A219178 (End)
%e A219178 1 and 2 are a special case in the lucky number sieve, (1 is the lucky number, but every 2nd element is removed) so are ignored [in the original version of the sequence, which started from a(2). Now we have a(1) = 2. - _Antti Karttunen_, Feb 26 2015]. The 2nd lucky number, 3, removes { 5, 11, ... } from the list, so a(2) = 5. The 3rd lucky number, 7, removes { 19, 39, ... } from the list, so a(3)=19.
%t A219178 rows = 52; cols = 1; L = 2 Range[0, 10^4] + 1; A = Join[{2 Range[cols]}, Reap[For[n = 2, n <= rows, r = L[[n++]]; L0 = L; L = ReplacePart[L, Table[r i -> Nothing, {i, 1, Length[L]/r}]]; Sow[Complement[L0, L][[1 ;; cols]]]]][[2, 1]]]; Table[A[[n, 1]], {n, 1, rows}] (* _Jean-François Alcover_, Mar 15 2016 *)
%o A219178 (Scheme) (define (A219178 n) (A255543bi n 1)) ;; Code for A255543bi given in A255543.
%Y A219178 Column 1 of A255543, Column 2 of A255545 (And apart from the first term, also column 2 of A255551).
%Y A219178 Cf. A000959, A001248, A254100, A255549, A255550, A255553.
%K A219178 nonn,easy
%O A219178 1,1
%A A219178 _Phil Carmody_, Nov 15 2012
%E A219178 Term a(1) = 2 prepended, without changing the rest of sequence. Name changed, with the original, more restrictive definition moved to the Comments section. - _Antti Karttunen_, Feb 26 2015