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!)
A345708 a(n) is the least positive number starting an interval of consecutive integers whose product of elements is n. 1

%I #22 Jul 02 2021 03:34:45

%S 1,1,3,4,5,1,7,8,9,10,11,3,13,14,15,16,17,18,19,4,21,22,23,1,25,26,27,

%T 28,29,5,31,32,33,34,35,36,37,38,39,40,41,6,43,44,45,46,47,48,49,50,

%U 51,52,53,54,55,7,57,58,59,3,61,62,63,64,65,66,67,68,69

%N a(n) is the least positive number starting an interval of consecutive integers whose product of elements is n.

%C This sequence is similar to A118235; here we multiply, there we add.

%C a(n) is the index of the first row of A068424 (interpreted as a square array) containing n.

%C If n is the product of k consecutive integers, then k! divides n.

%H Rémy Sigrist, <a href="/A345708/b345708.txt">Table of n, a(n) for n = 1..10000</a>

%F a(n) = 1 iff n is a factorial number (A000142).

%F a(n) <> 2.

%F a(n) = 3 iff n >= 3 and n belongs to A001710.

%F a(n) <= n.

%F a(p! / (n-1)!) = n for any n >= 3 and any prime number p >= n.

%F a(q) = q for any prime power q > 2.

%F a(n) = n for any odd number n.

%e The square array A068424(n, k) begins:

%e n\k| 1 2 3 4 5 6

%e ---+---------------------------------------

%e 1| 1 2 6 24 120 720

%e 2| 2 6 24 120 720 5040

%e 3| 3 12 60 360 2520 20160

%e 4| 4 20 120 840 6720 60480

%e - so a(1) = a(2) = a(6) = a(24) = a(120) = a(720) = 1,

%e a(3) = a(12) = a(60) = a(360) = 3,

%e a(4) = a(20) = 4.

%o (PARI) a(n) = { fordiv (n, d, my (r=n); for (k=d, oo, if (r==1, return (d), r%k, break, r/=k))) }

%o (PARI) a(n) = { for (i=2, oo, if (n%i!, forstep (j=i-1, 2, -1, my (d=sqrtnint(n,j)); while (d-1 && n%(d-1)==0, d--); while (n%d==0, my (r=n); for

%o (k=d, oo, if (r==1, return (if (d==2, 1, d)), r%k, break, r/=k)); d++)); break)); return (n) }

%o (Python)

%o from sympy import divisors

%o def a(n):

%o if n%2 == 0: return n

%o divs = divisors(n)

%o for i, d in enumerate(divs[:len(divs)//2]):

%o p = lastj = d

%o for j in divs[i+1:]:

%o if p >= n or j - lastj > 1: break

%o p, lastj = p*j, j

%o if p == n: return d

%o return n

%o print([a(n) for n in range(1, 70)]) # _Michael S. Branicky_, Jun 29 2021

%Y Cf. A000142, A001710, A068424, A118235, A246655.

%K nonn

%O 1,3

%A _Rémy Sigrist_, Jun 24 2021

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 August 2 15:19 EDT 2024. Contains 374848 sequences. (Running on oeis4.)