OFFSET
1,1
COMMENTS
a(n) = A024619(n) - 1. Proof:
If N+1 is a power of a prime (N+1=P^K), then only smaller powers of that prime divide numbers up to N and so lcm(1..N) doesn't have K powers of P; that is, N+1=P^K doesn't divide lcm(1..N).
From Don Reble, Mar 12 2003: (Start)
If N+1 is not a power of a prime, then it has at least two prime factors. Call one of them P, let K be such that P^K divides N+1, but P^(K+1) doesn't, and let N+1=P^K*R. Then
- R is greater than 1 because it is divisible by another prime factor of N+1;
- P^K and R are each less than N+1 because the other is greater than one;
- lcm(P^K,R) divides lcm(1..N) because 1..N includes both numbers;
- lcm(P^K,R)=N+1 because P doesn't divide R;
- N+1 divides lcm(1..N). (End)
LINKS
David A. Corneth, Table of n, a(n) for n = 1..10000
Andrei Asinowski, Cyril Banderier, Benjamin Hackl, Flip-sort and combinatorial aspects of pop-stack sorting, arXiv:2003.04912 [math.CO], 2020.
FORMULA
a(n) ~ n. - David A. Corneth, Aug 30 2019
EXAMPLE
17 is the sequence because lcm(1,2,...,17)=12252240 and 17+1=18 divides 12252240.
MATHEMATICA
Select[Range[120], Divisible[LCM @@ Range[#], #+1]&] (* Jean-François Alcover, Jun 21 2018 *)
PROG
(PARI) a=1; for(n=1, 108, a=lcm(a, n); if(a%(n+1)==0, print1(n, ", "))) \\ Klaus Brockhaus, Jun 11 2004
(PARI) first(n) = {my(u = max(2*n, 50), charact = vector(u, i, 1), res = List()); forprime(p = 2, 2*n, for(t = 1, logint(u, p), charact[p^t - 1] = 0)); for(i = 1, u, if(charact[i] == 1, listput(res, i); if(#res >= n, return(res)))); res } \\ David A. Corneth, Aug 30 2019
(Sage)
[x - 1 for x in (1..108) if not is_prime_power(n)] # Peter Luschny, May 23 2013
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Lekraj Beedassy, Mar 10 2003
EXTENSIONS
More terms from Klaus Brockhaus, Jun 11 2004
STATUS
approved