reviewed
approved
reviewed
approved
proposed
reviewed
editing
proposed
Even-Lucky-Numbers (ELN): generated by a sieve process like that for Lucky numbers but starting with even numbers.
proposed
editing
editing
proposed
## Finds all Even Lucky Numbers up to n from the list 2...n.
proposed
editing
editing
proposed
## Finds all Even Lucky Numbers up to n from the list 2...n.
## Try n=10^5 or 10^6 just for fun!
## Finds all Even Lucky Numbers up to n from the list 2...n. ## Try n=10^5 or 10^6 just for fun! evenluckynumbers:=proc(n) local k, Lnext, Lprev; Lprev:=[$2..n]; for k from 1 do Lnext:= map(w-> Lprev[w], remove(z -> z mod Lprev[k] = 0, [$1..nops(Lprev)])); if nops(Lnext)=nops(Lprev) then return Lnext fi; Lprev:=Lnext; od; end: # Walter Kehowski, Jun 06 2008
proposed
editing
editing
proposed
Write down even numbers: 2 , 4 , 6 , 8 , ...; first term > 2 is 4 so starting from 2 remove every 4th number: 2 , 4 , 6 , 10 , 12 , 14 , 18, ...; next number is 6 so remove every 6th term starting from 2: 2 , 4 , 6 , 10 , 12 , 18 , 20 , 22 , 26 , etc.
approved
editing