[go: up one dir, main page]

login
A075558
a(n) is the least composite number that has not yet appeared such that the n-th partial sum is a multiple of the n-th prime.
1
4, 8, 18, 12, 24, 25, 28, 14, 51, 48, 16, 85, 36, 104, 44, 66, 125, 146, 84, 56, 174, 96, 64, 185, 39, 165, 34, 68, 143, 72, 252, 203, 114, 38, 190, 189, 120, 446, 88, 132, 490, 410, 69, 50, 100, 249, 312, 535, 108, 54, 341, 168, 297, 290, 688, 186, 455, 335, 198, 413
OFFSET
1,1
LINKS
MAPLE
s:= 0: Cands:= remove(isprime, [$4..1000]): nC:= nops(Cands):
R:= NULL: s:= 0: p:= 1:
for n from 1 do
p:= nextprime(p);
found:= false;
for i from 1 to nC do
if s + Cands[i] mod p = 0 then
R:= R, Cands[i];
s:= s + Cands[i];
Cands:= subsop(i=NULL, Cands);
nC:= nC-1;
found:= true;
break
fi
od;
if not found then break fi
od:
R;
CROSSREFS
Cf. A002808 (composite numbers).
Sequence in context: A145779 A252790 A144178 * A312824 A312825 A312826
KEYWORD
nonn,look
AUTHOR
Amarnath Murthy, Sep 24 2002
EXTENSIONS
More terms from Ray Chandler, Oct 25 2003
Name changed by Robert Israel, Dec 07 2024
STATUS
approved