cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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

This page as a plain text file.
%I A345708 #25 Aug 15 2025 09:10:54
%S A345708 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 A345708 28,29,5,31,32,33,34,35,36,37,38,39,40,41,6,43,44,45,46,47,48,49,50,
%U A345708 51,52,53,54,55,7,57,58,59,3,61,62,63,64,65,66,67,68,69
%N A345708 a(n) is the least positive number starting an interval of consecutive integers whose product of elements is n.
%C A345708 This sequence is similar to A118235; here we multiply, there we add.
%C A345708 a(n) is the index of the first row of A068424 (interpreted as a square array) containing n.
%C A345708 If n is the product of k consecutive integers, then k! divides n.
%H A345708 Rémy Sigrist, <a href="/A345708/b345708.txt">Table of n, a(n) for n = 1..10000</a>
%F A345708 a(n) = 1 iff n is a factorial number (A000142).
%F A345708 a(n) <> 2.
%F A345708 a(n) = 3 iff n >= 3 and n belongs to A001710.
%F A345708 a(n) <= n.
%F A345708 a(p! / (n-1)!) = n for any n >= 3 and any prime number p >= n.
%F A345708 a(q) = q for any prime power q > 2.
%F A345708 a(n) = n for any odd number n.
%F A345708 a(n) < n iff n belongs to A045619.
%e A345708 The square array A068424(n, k) begins:
%e A345708   n\k|   1    2     3      4       5        6
%e A345708   ---+---------------------------------------
%e A345708     1|   1    2     6     24     120      720
%e A345708     2|   2    6    24    120     720     5040
%e A345708     3|   3   12    60    360    2520    20160
%e A345708     4|   4   20   120    840    6720    60480
%e A345708 - so a(1) = a(2) = a(6) = a(24) = a(120) = a(720) = 1,
%e A345708      a(3) = a(12) = a(60) = a(360) = 3,
%e A345708      a(4) = a(20) = 4.
%o A345708 (PARI) a(n) = { fordiv (n, d, my (r=n); for (k=d, oo, if (r==1, return (d), r%k, break, r/=k))) }
%o A345708 (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 A345708 (k=d, oo, if (r==1, return (if (d==2, 1, d)), r%k, break, r/=k)); d++)); break)); return (n) }
%o A345708 (Python)
%o A345708 from sympy import divisors
%o A345708 def a(n):
%o A345708     if n%2 == 0: return n
%o A345708     divs = divisors(n)
%o A345708     for i, d in enumerate(divs[:len(divs)//2]):
%o A345708         p = lastj = d
%o A345708         for j in divs[i+1:]:
%o A345708             if p >= n or j - lastj > 1: break
%o A345708             p, lastj = p*j, j
%o A345708         if p == n: return d
%o A345708     return n
%o A345708 print([a(n) for n in range(1, 70)]) # _Michael S. Branicky_, Jun 29 2021
%Y A345708 Cf. A000142, A001710, A045619, A068424, A118235, A246655.
%K A345708 nonn
%O A345708 1,3
%A A345708 _Rémy Sigrist_, Jun 24 2021