OFFSET

1,1

COMMENTS

a(n) >= 2. If n < 2 is prime or prime power, a(n) >= 3. For any n > 1, k > 1, a(n^k - n) <= n.

a(n) is also the smallest k>0 such that n+k is k-smooth (i.e. has no prime factor > k). - N. J. A. Sloane, Apr 25 2020

LINKS

Alois P. Heinz, Table of n, a(n) for n = 1..10000

Lior Manor, First 1000 entries with the associated chains (For n=1, the chain 1,2,3 should be added. - N. J. A. Sloane, Apr 25 2020)

J. S. Myers, R. Schroeppel, S. R. Shannon, N. J. A. Sloane, and P. Zimmermann, Three Cousins of Recaman's Sequence, arXiv:2004:14000 [math.NT], April 2020.

EXAMPLE

Example: a(7)=5 since 7 starts a chain of 5 integers 7-11 with the following property: 7 is divisible by 7, 8 is divisible by 2, 9 is divisible by 3, 10 is divisible by 5, 11 is divisible by 11. And the next integer 12 is divisible by 2 and 3, both of them are prime factors of prior members in the chain.

MAPLE

A006530 := n->max(1, op(numtheory[factorset](n)));

a:=[]; M:=120;

for n from 1 to M do

for k from 1 to 3*n do

if A006530(n+k) <= k then a:=[op(a), k]; break; fi;

od;

od:

a; # N. J. A. Sloane, Apr 25 2020

MATHEMATICA

Block[{nn = 111, r}, r = Prime@ Range[PrimePi@ nn]; r = Table[FromDigits[#, 2] &@ Map[Boole[Mod[n, #] == 0] &, r], {n, nn}]; Array[Block[{k = # + 1, s = r[[#]]}, While[UnsameQ[s, Set[s, BitOr[s, r[[k]] ] ] ], k++]; k - #] &, nn - Ceiling@ Sqrt@ nn] ] (* Michael De Vlieger, Apr 30 2020 *)

CROSSREFS

KEYWORD

nonn

AUTHOR

Lior Manor, Sep 30 2012

EXTENSIONS

a(1) = 3 added by N. J. A. Sloane, Apr 25 2020

STATUS

approved