login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A249876
Pseudo-lucky numbers.
4
1, 3, 5, 7, 11, 13, 17, 21, 23, 25, 31, 35, 41, 43, 45, 47, 55, 57, 63, 65, 73, 75, 83, 87, 95, 97, 101, 105, 107, 113, 123, 127, 131, 133, 141, 143, 147, 151, 153, 161, 175, 177, 183, 185, 197, 201, 211, 213, 215, 217, 227, 233, 235, 237, 251, 255, 265, 267
OFFSET
1,2
COMMENTS
Appears to grow more slowly than the Lucky numbers. - Jon Perry, Nov 07 2014
LINKS
Jean-François Alcover, Table of n, a(n) for n = 1..1000
EXAMPLE
Start with the natural numbers. The 2nd number is 2, so delete every 2nd number, leaving 1 3 5 7 9 11 13 15 17 19...; the 3rd number remaining is 5, so delete every 5th number, leaving 1 3 5 7 11 13 15 17 ...; now delete every 7th number, leaving 1 3 5 7 11 13 17 ...; now delete every 11th number; etc.
MAPLE
L:= [seq(i, i=1..10^3)]:
for n from 2 while n < nops(L) do
r:= L[n];
L:= subsop(seq(r*i=NULL, i=1..nops(L)/r), L);
od:
L;
MATHEMATICA
FixedPoint[Function[{L}, n++; Delete[L, List /@ (L[[n]]*Range[Quotient[Length[L], L[[n]] ]])]], n=1; Range[1000]] (* Jean-François Alcover, Nov 27 2014 *)
PROG
(Python)
def listed(n):
L=list(range(1, n+1)); j=1
while L[j] <= len(L):
L=[L[i] for i in range(len(L)) if (i+1)%L[j]!=0]
j+=1
return(L)
CROSSREFS
Cf. A000959 (Lucky numbers).
Sequence in context: A062280 A069467 A309739 * A096169 A225526 A090670
KEYWORD
nonn
AUTHOR
Robert FERREOL, Nov 07 2014
STATUS
approved