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
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, 28, 29, 5, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 6, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 7, 57, 58, 59, 3, 61, 62, 63, 64, 65, 66, 67, 68, 69 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
COMMENTS
This sequence is similar to A118235; here we multiply, there we add.
a(n) is the index of the first row of A068424 (interpreted as a square array) containing n.
If n is the product of k consecutive integers, then k! divides n.
LINKS
FORMULA
a(n) = 1 iff n is a factorial number (A000142).
a(n) <> 2.
a(n) = 3 iff n >= 3 and n belongs to A001710.
a(n) <= n.
a(p! / (n-1)!) = n for any n >= 3 and any prime number p >= n.
a(q) = q for any prime power q > 2.
a(n) = n for any odd number n.
EXAMPLE
The square array A068424(n, k) begins:
n\k| 1 2 3 4 5 6
---+---------------------------------------
1| 1 2 6 24 120 720
2| 2 6 24 120 720 5040
3| 3 12 60 360 2520 20160
4| 4 20 120 840 6720 60480
- so a(1) = a(2) = a(6) = a(24) = a(120) = a(720) = 1,
a(3) = a(12) = a(60) = a(360) = 3,
a(4) = a(20) = 4.
PROG
(PARI) a(n) = { fordiv (n, d, my (r=n); for (k=d, oo, if (r==1, return (d), r%k, break, r/=k))) }
(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
(k=d, oo, if (r==1, return (if (d==2, 1, d)), r%k, break, r/=k)); d++)); break)); return (n) }
(Python)
from sympy import divisors
def a(n):
if n%2 == 0: return n
divs = divisors(n)
for i, d in enumerate(divs[:len(divs)//2]):
p = lastj = d
for j in divs[i+1:]:
if p >= n or j - lastj > 1: break
p, lastj = p*j, j
if p == n: return d
return n
print([a(n) for n in range(1, 70)]) # Michael S. Branicky, Jun 29 2021
CROSSREFS
Sequence in context: A350091 A135347 A370116 * A144786 A247369 A009389
KEYWORD
nonn
AUTHOR
Rémy Sigrist, Jun 24 2021
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 April 19 09:23 EDT 2024. Contains 371782 sequences. (Running on oeis4.)