[go: up one dir, main page]

login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A215454
a(n) = least positive k such that n^2 divides k!
0
1, 4, 6, 6, 10, 6, 14, 8, 9, 10, 22, 6, 26, 14, 10, 10, 34, 9, 38, 10, 14, 22, 46, 8, 20, 26, 15, 14, 58, 10, 62, 12, 22, 34, 14, 9, 74, 38, 26, 10, 82, 14, 86, 22, 10, 46, 94, 10, 28, 20, 34, 26, 106, 15, 22, 14, 38, 58, 118, 10, 122, 62, 14, 16, 26, 22, 134, 34
OFFSET
1,2
COMMENTS
Indices n such that a(n)=n: 1 followed by A074845.
EXAMPLE
a(12): least positive k such that 144 divides k! is k=6, 6!=720. So a(12)=6.
MATHEMATICA
Module[{nn=200, f}, f=Range[nn]!; Position[f, #]&/@Table[SelectFirst[ f, Divisible[ #, n^2]&], {n, nn}]]//Flatten (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Dec 11 2018 *)
PROG
(Python)
TOP = 77
ii = [0]*TOP
for i in range(1, TOP):
ii[i] = i*i
f = k = y = 1
res = [-1]*TOP
while y<TOP:
for i in range(1, TOP):
if res[i]<0 and f % ii[i] == 0:
res[i] = k
y += 1
k += 1
f *= k
for i in range(1, TOP):
print res[i],
CROSSREFS
Cf. A002034 (least k such that n divides k!).
Cf. A085779 (least k such that triangular(n) divides k!).
Cf. A093896 (least positive k such that n^n divides k!).
Sequence in context: A323674 A183986 A160995 * A155750 A159475 A098350
KEYWORD
nonn
AUTHOR
Alex Ratushnyak, Aug 11 2012
STATUS
approved