login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A242410 a(1)=1 and for n>1, a(n) is the smallest number greater than a(n-1) such that a(n) is not divisible by a(d) for any divisor d of n (except 1 and n). 2
1, 2, 3, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 29, 31, 33, 34, 37, 38, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 57, 58, 59, 60, 61, 62, 63, 64, 67, 68, 71, 73, 77, 79, 81, 82, 83, 84 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
Contains the primes (A000040). - Robert Israel, Jul 05 2017
LINKS
EXAMPLE
a(4) cannot be 4 because 4 is divisible by a(2) = 2. a(24) cannot be 25 because 25 is divisible by a(4) = 5.
MAPLE
f:= proc(n) option remember; local Q, k;
Q:= map(procname, numtheory:-divisors(n) minus {1, n});
for k from procname(n-1) + 1 do
if andmap(t -> (k mod t > 0), Q) then return k fi
od
end proc:
f(1):= 1:
map(f, [$1..100]); # Robert Israel, Jul 05 2017
MATHEMATICA
a = {1}; Do[k = a[[n - 1]] + 1; While[AnyTrue[Most@ Rest@ Divisors@ n, Divisible[k, a[[#]] ] &], k++]; AppendTo[a, k], {n, 2, 61}]; a (* Michael De Vlieger, Jul 05 2017 *)
PROG
(PARI) okd(k, vd) = {for (i=1, #vd, if ((k % vd[i]) == 0, return (0)); ); return (1); }
fnext(n, va) = {d = divisors(n); vd = vector(#d-2, i, va[d[i+1]]); k = va[n-1]+1; while (! okd(k, vd), k++); k; }
lista(nn) = {va = vector(nn); va[1] = 1; for (n=2, nn, va[n] = fnext(n, va); ); va; } \\ Michel Marcus, May 17 2014
CROSSREFS
Sequence in context: A023839 A004723 A293754 * A258022 A333638 A089590
KEYWORD
nonn
AUTHOR
J. Lowell, May 13 2014
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 19 07:25 EDT 2024. Contains 370955 sequences. (Running on oeis4.)