login
A043772
Numbers k such that all divisors of k are lucky numbers.
3
1, 3, 7, 9, 13, 21, 31, 37, 43, 49, 63, 67, 73, 79, 93, 111, 127, 129, 151, 163, 169, 193, 201, 211, 219, 223, 237, 241, 259, 283, 307, 331, 349, 367, 409, 421, 433, 463, 487, 489, 511, 541, 553, 559, 577, 579, 601, 613, 619, 631, 643, 673, 723, 727, 739, 769
OFFSET
1,2
LINKS
EXAMPLE
21 is included because its (positive) divisors, i.e., 1, 3, 7 and 21, are all lucky numbers.
MAPLE
N:= 10^3: # to get all terms <= N
L:= [seq(2*i+1, i=0..floor((N-1)/2))]:
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:
LS:= convert(L, set):
select(t -> numtheory:-divisors(t) subset LS, L); # Robert Israel, Jul 20 2015
MATHEMATICA
lst = Range[1, 776, 2]; i = 2; While[ i <= (len = Length@lst) && (k = lst[[i]]) <= len, lst = Drop[lst, {k, len, k}]; i++ ]; fQ[n_] := Block[{d = Rest@Divisors@n, k = 1, lmt = DivisorSigma[0, n]}, While[k < lmt && MemberQ[lst, d[[k]]], k++ ]; k == lmt]; Select[lst, fQ@# &] (* Robert G. Wilson v, May 12 2006 *)
CROSSREFS
Cf. A000959.
Cf. A118643 (subset).
Sequence in context: A297002 A111250 A118643 * A176553 A109370 A018663
KEYWORD
easy,nonn
AUTHOR
Naohiro Nomoto, Oct 08 2000
STATUS
approved