51 routines :

*AppleScriptsVanilla*
ascii_to_HTML
Average
Calculator
Calendar
Count_item
cut_text
days_week
EAN13
Encrypt-Decrypt
FactPremier
French_Vanilla_Dotted_Date
French_Vanilla_Dotted_Date2
Hexa_to_Bin
Last_month
list_erase
list_insert
list_replace
ListeDiviseurs
ListePremiers
Minuscule
NombreLong
NombreLong2
NomExtension
num_item
num_month
num_month2
num_week
number_format
number_format2
Paques
PGCD
PGCD2
reverse_string
Roman_to_Arab
round_decimal
search_email
search_replace
search_URL
SepNbre
SepNbre2
snip_text
stat
TauxPermut
TauxTransform
the_left
the_right
TriBulle
TriLineaire
week_and_year
XOR
ZeroDouble

ListePremiers

Syntaxe

ListePremiers(debut, fin)
Retourne la liste des nombres premiers compris entre debut et fin. Les paramètres sont au format nombre, le résultat est au format liste.
Adapté d'après mickay.jill@9online.fr

Exemple

ListePremiers(1, 100)
---> {2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97}

Script

on ListePremiers(debut, fin)
set listeofparfaits to {}
repeat with i from debut to fin
if (count of ListeDiviseurs(i)) is 2 then ¬
set listeofparfaits to listeofparfaits & i
end repeat
return listeofparfaits
end ListePremiers

Remarque

Utilise ZeroDouble et ListeDiviseurs .

Site scripté avec HyperCard ©1987-1998 Apple Computer, Inc.
Mise à jour le 19/01/10 à 08:45:57