|
|
A217581
|
|
Largest prime divisor of n <= sqrt(n), 1 if n is prime or 1.
|
|
31
|
|
|
1, 1, 1, 2, 1, 2, 1, 2, 3, 2, 1, 3, 1, 2, 3, 2, 1, 3, 1, 2, 3, 2, 1, 3, 5, 2, 3, 2, 1, 5, 1, 2, 3, 2, 5, 3, 1, 2, 3, 5, 1, 3, 1, 2, 5, 2, 1, 3, 7, 5, 3, 2, 1, 3, 5, 7, 3, 2, 1, 5, 1, 2, 7, 2, 5, 3, 1, 2, 3, 7, 1, 3, 1, 2, 5, 2, 7, 3, 1, 5, 3, 2, 1, 7, 5, 2, 3
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,4
|
|
COMMENTS
|
If we define a divisor d|n to be inferior if d <= n/d, then inferior divisors are counted by A038548 and listed by A161906. This sequence selects the greatest inferior prime divisor of n. - Gus Wiseman, Apr 06 2021
|
|
LINKS
|
|
|
EXAMPLE
|
The sequence selects the greatest element (or 1 if empty) of each of the following sets of strictly superior divisors:
1:{} 16:{2} 31:{} 46:{2}
2:{} 17:{} 32:{2} 47:{}
3:{} 18:{2,3} 33:{3} 48:{2,3}
4:{2} 19:{} 34:{2} 49:{7}
5:{} 20:{2} 35:{5} 50:{2,5}
6:{2} 21:{3} 36:{2,3} 51:{3}
7:{} 22:{2} 37:{} 52:{2}
8:{2} 23:{} 38:{2} 53:{}
9:{3} 24:{2,3} 39:{3} 54:{2,3}
10:{2} 25:{5} 40:{2,5} 55:{5}
11:{} 26:{2} 41:{} 56:{2,7}
12:{2,3} 27:{3} 42:{2,3} 57:{3}
13:{} 28:{2} 43:{} 58:{2}
14:{2} 29:{} 44:{2} 59:{}
15:{3} 30:{2,3,5} 45:{3,5} 60:{2,3,5}
|
|
MAPLE
|
A217581 := n -> `if`(isprime(n) or n=1, 1, max(op(select(i->i^2<=n, numtheory[factorset](n)))));
|
|
MATHEMATICA
|
Table[If[n == 1 || PrimeQ[n], 1, Select[Transpose[FactorInteger[n]][[1]], # <= Sqrt[n] &][[-1]]], {n, 100}] (* T. D. Noe, Mar 25 2013 *)
|
|
PROG
|
(PARI) a(n) = {my(m=1); foreach(factor(n)[, 1], d, if(d^2 <= n, m=max(m, d))); m} \\ Andrew Howroyd, Oct 11 2023
|
|
CROSSREFS
|
Positions of first appearances are 1 and A001248.
These divisors are counted by A063962.
The smallest prime factor of the same type is A107286.
A strictly superior version is A341643.
A038548 counts superior (or inferior) divisors.
A048098 lists numbers without a strictly superior prime divisor.
A056924 counts strictly superior (or strictly inferior) divisors.
A140271 selects the smallest strictly superior divisor.
A341591 counts superior prime divisors.
A341642 counts strictly superior prime divisors.
A341673 lists strictly superior divisors.
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|