Displaying 1-10 of 12 results found.
1, 1, 1, 1, 1, 2, 1, 3, 2, 5, 1, 4, 1, 13, 5, 7, 1, 17, 1, 11, 13, 89, 1, 18, 5, 233, 17, 29, 1, 122, 1, 47, 89, 1597, 13, 76, 1, 4181, 233, 123, 1, 842, 1, 199, 122, 28657, 1, 322, 13, 15005, 1597, 521, 1, 5777, 89, 843, 4181, 514229, 1, 1364, 1, 1346269, 842, 2207, 233, 39602, 1, 3571, 28657, 709805, 1, 5778, 1, 24157817, 15005, 9349, 89, 271442, 1, 15127, 5777
COMMENTS
A000045 is a divisibility sequence, which guarantees that the result of the division is an integer.
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 3, 1, 2, 1, 5, 1, 1, 1, 8, 1, 1, 2, 13, 1, 5, 1, 21, 1, 1, 1, 34, 1, 1, 1, 55, 1, 13, 1, 89, 5, 1, 1, 144, 1, 5, 1, 233, 1, 34, 1, 377, 1, 1, 1, 610, 1, 1, 13, 987, 1, 89, 1, 1597, 1, 13, 1, 2584, 1, 1, 5, 4181, 1, 233, 1, 6765, 34, 1, 1, 10946, 1, 1, 1, 17711, 1, 610, 1, 28657, 1, 1, 1, 46368, 1, 13, 89, 75025, 1, 1597
PROG
(Scheme, two alternatives)
1, 1, 1, 2, 1, 7, 1, 10, 7, 61, 1, 26, 1, 547, 61, 82, 1, 703, 1, 242, 547, 44287, 1, 730, 61, 398581, 703, 2186, 1, 58807, 1, 6562, 44287, 32285041, 547, 19682, 1, 290565367, 398581, 59050, 1, 4780783, 1, 177146, 58807, 23535794707, 1, 531442, 547, 3472494301, 32285041, 1594322, 1, 387400807, 44287, 4782970, 290565367, 17157594341221, 1, 14348906, 1
COMMENTS
A015518 is a divisibility sequence, which guarantees that the result of the division is an integer.
Lpf(n): least prime dividing n (when n > 1); a(1) = 1. Or, smallest prime factor of n, or smallest prime divisor of n.
+10
1035
1, 2, 3, 2, 5, 2, 7, 2, 3, 2, 11, 2, 13, 2, 3, 2, 17, 2, 19, 2, 3, 2, 23, 2, 5, 2, 3, 2, 29, 2, 31, 2, 3, 2, 5, 2, 37, 2, 3, 2, 41, 2, 43, 2, 3, 2, 47, 2, 7, 2, 3, 2, 53, 2, 5, 2, 3, 2, 59, 2, 61, 2, 3, 2, 5, 2, 67, 2, 3, 2, 71, 2, 73, 2, 3, 2, 7, 2, 79, 2, 3, 2, 83, 2, 5, 2, 3, 2, 89, 2, 7, 2, 3, 2, 5, 2, 97
COMMENTS
Also, the largest number of distinct integers such that all their pairwise differences are coprime to n. - Max Alekseyev, Mar 17 2006
The unit 1 is not a prime number (although it has been considered so in the past). 1 is the empty product of prime numbers, thus 1 has no least prime factor. - Daniel Forgues, Jul 05 2011
a(n) = least m > 0 for which n! + m and n - m are not relatively prime. - Clark Kimberling, Jul 21 2012
For n > 1, a(n) = the smallest k > 1 that divides n. - Antti Karttunen, Feb 01 2014
For n > 1, records are at prime indices. - Zak Seidov, Apr 29 2015
The initials "lpf" might be mistaken for "largest prime factor" ( A009190), using "spf" for "smallest prime factor" would avoid this. - M. F. Hasler, Jul 29 2015
n = 89 is the first index > 1 for which a(n) differs from the smallest k > 1 such that (2^k + n - 2)/k is an integer. - M. F. Hasler, Aug 11 2015
For n > 1, a(n) is also the smallest k, 1 < k <= n, for which the binomial(n,k) is not divisible by n.
Proof: (A) When k and n are relatively prime then binomial(n,k) is divisible by n because k*binomial(n,k) = n*binomial(n-1,k-1). (B) When gcd(n,k) > 1, one of its prime factors is the smallest; let us denote it p, p <= k, and consider the binomial(n,p) = (1/p!)*Product_{i=0..p-1} (n-i). Since p is a divisor of n, it cannot be a divisor of any of the remaining numerator factors. It follows that, denoting as e the largest e > 0 such that p^e|n, the numerator is divisible by p^e but not by p^(e+1). Hence, the binomial is divisible by p^(e-1) but not by p^e and therefore not divisible by n. Applying (A), (B) to all considered values of k completes the proof. (End)
a(n) = prime(j) when n == J (mod A002110(j)), n, j >= 1, where J is the set of numbers <= A002110(j) with smallest prime factor = prime(j). The number of terms in J is A005867(j-1). So:
a(n) = 2 when n == 0 (mod 2);
a(n) = 3 when n == 3 (mod 6);
a(n) = 5 when n == 5 or 25 (mod 30);
a(n) = 7 when n == 7, 49, 77, 91, 119, 133, 161 or 203 (mod 210);
etc. (End)
For n > 1, a(n) is the leftmost term, other than 0 or 1, in the n-th row of A127093. - Davis Smith, Mar 05 2019
REFERENCES
D. S. Mitrinovic et al., Handbook of Number Theory, Kluwer, Section IV.1.
LINKS
A. E. Brouwer, Two number theoretic sums, Stichting Mathematisch Centrum. Zuivere Wiskunde, Report ZW 19/74 (1974): 3 pages. [Copy included with the permission of the author.]
FORMULA
a(n) has average order n/(2 log n) [Brouwer] - N. J. A. Sloane, Sep 03 2017
MAPLE
A020639 := proc(n) if n = 1 then 1; else min(op(numtheory[factorset](n))) ; end if; end proc: seq( A020639(n), n=1..20) ; # R. J. Mathar, Oct 25 2010
MATHEMATICA
f[n_]:=FactorInteger[n][[1, 1]]; Join[{1}, Array[f, 120, 2]] (* Robert G. Wilson v, Apr 06 2011 *)
Join[{1}, Table[If[EvenQ[n], 2, FactorInteger[n][[1, 1]]], {n, 2, 120}]] (* Zak Seidov, Nov 17 2013 *)
Riffle[Join[{1}, Table[FactorInteger[n][[1, 1]], {n, 3, 101, 2}]], 2] (* Harvey P. Dale, Dec 16 2021 *)
PROG
(PARI) A020639(n) = { vecmin(factor(n)[, 1]) } \\ [Will yield an error for n = 1.] - R. J. Mathar, Mar 02 2012
(PARI) A020639(n)=if(n>1, if(n>n=factor(n, 0)[1, 1], n, factor(n)[1, 1]), 1) \\ Avoids complete factorization if possible. Often the smallest prime factor can be found quickly even if it is larger than primelimit. If factoring takes too long for large n, use debugging level >= 3 (\g3) to display the smallest factor as soon as it is found. - M. F. Hasler, Jul 29 2015
(Haskell)
a020639 n = spf a000040_list where
spf (p:ps) | n < p^2 = n
| mod n p == 0 = p
| otherwise = spf ps
(Sage)
def A020639_list(n) : return [1] + [prime_divisors(n)[0] for n in (2..n)]
(Scheme) (define ( A020639 n) (if (< n 2) n (let loop ((k 2)) (cond ((zero? (modulo n k)) k) (else (loop (+ 1 k))))))) ;; Antti Karttunen, Feb 01 2014
(Python)
from sympy import factorint
def a(n): return 1 if n == 1 else min(factorint(n))
KEYWORD
nonn,easy,nice,core,changed
EXTENSIONS
Expanded definition to make this easier to find. - N. J. A. Sloane, Sep 21 2020
a(1) = 1; for n > 1, a(n) = largest proper divisor of n (that is, for n>1, maximum divisor d of n in range 1 <= d < n).
+10
251
1, 1, 1, 2, 1, 3, 1, 4, 3, 5, 1, 6, 1, 7, 5, 8, 1, 9, 1, 10, 7, 11, 1, 12, 5, 13, 9, 14, 1, 15, 1, 16, 11, 17, 7, 18, 1, 19, 13, 20, 1, 21, 1, 22, 15, 23, 1, 24, 7, 25, 17, 26, 1, 27, 11, 28, 19, 29, 1, 30, 1, 31, 21, 32, 13, 33, 1, 34, 23, 35, 1, 36, 1, 37, 25, 38, 11, 39, 1, 40
COMMENTS
It seems that a(n) = Max_{j=n+1..2n-1} gcd(n,j). - Labos Elemer, May 22 2002
This is correct: No integer in the range [n+1, 2n-1] has n as its divisor, but certainly at least one multiple of the largest proper divisor of n will occur there (e.g., if it is n/2, then at n + (n/2)). - Antti Karttunen, Dec 18 2014
The slopes of the visible lines made by the points in the scatter plot are 1/2, 1/3, 1/5, 1/7, ... (reciprocals of primes). - Moosa Nasir, Jun 19 2022
FORMULA
Other identities and observations:
For n > 1, a(n) = A003961^(r)( A246277(n)), where r = A055396(n)-1 and A003961^(r)(n) stands for shifting the prime factorization of n by r positions towards larger primes.
(End)
Sum_{k=1..n} a(k) ~ c * n^2, where c = (1/2) * Sum_{k>=1} A005867(k-1)/(prime(k)* A002110(k)) = 0.165049... . - Amiram Eldar, Nov 19 2022
MAPLE
A032742 :=proc(n) option remember; if n = 1 then 1; else numtheory[divisors](n) minus {n} ; max(op(%)) ; end if; end proc: # R. J. Mathar, Jun 13 2011
1, seq(n/min(numtheory:-factorset(n)), n=2..1000); # Robert Israel, Dec 18 2014
MATHEMATICA
Join[{1}, Divisors[#][[-2]]&/@Range[2, 80]] (* Harvey P. Dale, Nov 29 2011 *)
a[n_] := n/FactorInteger[n][[1, 1]]; Array[a, 100] (* Amiram Eldar, Nov 26 2020 *)
Table[Which[n==1, 1, PrimeQ[n], 1, True, Divisors[n][[-2]]], {n, 80}] (* Harvey P. Dale, Feb 02 2022 *)
PROG
(Haskell)
(Python)
from sympy import factorint
def a(n): return 1 if n == 1 else n//min(factorint(n))
CROSSREFS
Cf. A002110, A002808, A005867, A006530, A008578, A020639, A032741, A003961, A052126, A054576, A055396, A060681, A068319, A063928, A130064, A246277, A250245, A250246, A276085, A276086, A276151, A286477, A300236, A302025, A302026, A302032, A302042, A325563, A325567.
Numbers with at most 2 prime factors (counted with multiplicity).
+10
68
1, 2, 3, 4, 5, 6, 7, 9, 10, 11, 13, 14, 15, 17, 19, 21, 22, 23, 25, 26, 29, 31, 33, 34, 35, 37, 38, 39, 41, 43, 46, 47, 49, 51, 53, 55, 57, 58, 59, 61, 62, 65, 67, 69, 71, 73, 74, 77, 79, 82, 83, 85, 86, 87, 89, 91, 93, 94, 95, 97, 101, 103, 106, 107, 109, 111, 113, 115, 118
COMMENTS
Also, numbers with permutations of all divisors only with coprime adjacent elements: A109810(a(n)) > 0. - Reinhard Zumkeller, May 24 2010
1 together with numbers k such that sigma(k) + phi(k) - d(k) = 2k - 2. - Wesley Ivan Hurt, May 03 2015
MATHEMATICA
Select[Range[120], PrimeOmega[#] <= 2 &] (* Ivan Neretin, Aug 16 2015 *)
PROG
(Haskell)
a037143 n = a037143_list !! (n-1)
a037143_list = 1 : merge a000040_list a001358_list where
merge xs'@(x:xs) ys'@(y:ys) =
if x < y then x : merge xs ys' else y : merge xs' ys
(Python)
from math import isqrt
from sympy import primepi, primerange
def f(x): return int(n-2+x-primepi(x)-sum(primepi(x//k)-a for a, k in enumerate(primerange(isqrt(x)+1))))
kmin, kmax = 1, 2
while f(kmax) >= kmax:
kmax <<= 1
while True:
kmid = kmax+kmin>>1
if f(kmid) < kmid:
kmax = kmid
else:
kmin = kmid
if kmax-kmin <= 1:
break
Positive integers with at least 3 prime factors (counted with multiplicity).
+10
36
8, 12, 16, 18, 20, 24, 27, 28, 30, 32, 36, 40, 42, 44, 45, 48, 50, 52, 54, 56, 60, 63, 64, 66, 68, 70, 72, 75, 76, 78, 80, 81, 84, 88, 90, 92, 96, 98, 99, 100, 102, 104, 105, 108, 110, 112, 114, 116, 117, 120, 124, 125, 126, 128, 130, 132, 135, 136, 138, 140, 144
COMMENTS
Also numbers such that no permutation of all divisors exists with coprime adjacent elements: A109810(a(n))=0. - Reinhard Zumkeller, May 24 2010
Volumes of rectangular cuboids with each side > 1. - Peter Woodward, Jun 16 2015
Numbers k with a pair of proper divisors of k, (d1,d2), such that d1 < d2 and gcd(d1,d2) > 1. - Wesley Ivan Hurt, Jan 01 2021
FORMULA
Numbers of the form Product p_i^e_i with Sum e_i >= 3.
MATHEMATICA
Select[ Range[150], Plus @@ Last /@ FactorInteger[ # ] > 2 &] (* Robert G. Wilson v, Oct 12 2005 *)
Select[Range[150], PrimeOmega[#]>2&] (* Harvey P. Dale, Jun 22 2011 *)
PROG
(Haskell)
a033942 n = a033942_list !! (n-1)
a033942_list = filter ((> 2) . a001222) [1..]
(Python)
from sympy import factorint
def ok(n): return sum(factorint(n).values()) > 2
(Python)
from math import isqrt
from sympy import primepi, primerange
def f(x): return int(n+primepi(x)+sum(primepi(x//k)-a for a, k in enumerate(primerange(isqrt(x)+1))))
kmin, kmax = 1, 2
while f(kmax) >= kmax:
kmax <<= 1
while True:
kmid = kmax+kmin>>1
if f(kmid) < kmid:
kmax = kmid
else:
kmin = kmid
if kmax-kmin <= 1:
break
CROSSREFS
See also A002808 for 'Composite numbers' or 'Divisible by at least 2 primes'.
Number of occurrences of n-th prime in A065308, where A065308(j) = prime(j - pi(j)).
+10
27
3, 2, 2, 1, 1, 2, 2, 1, 1, 2, 2, 1, 1, 2, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 2, 1, 1, 2, 2, 1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 2, 1, 1, 2, 2, 1, 1, 1, 1, 2, 1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 2, 1, 1, 2, 2, 1, 1, 2, 2, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 2, 1, 1, 1, 1, 2, 2
COMMENTS
Seems identical to A054546. Each odd prime arises once or twice!?
MATHEMATICA
t=Table[Prime[w-PrimePi[w]], {w, a, b}] Table[Count[t, Prime[n]], {n, c, d}]
Differences[Select[Range[100], !PrimeQ[#]&]] (* Gus Wiseman, Sep 15 2024 *)
PROG
(PARI) { p=1; f=2; m=1; for (n=1, 1000, a=0; p=nextprime(p + 1); while (p==f, a++; m++; f=prime(m - primepi(m))); write("b065310.txt", n, " ", a) ) } \\ Harry J. Smith, Oct 16 2009
CROSSREFS
Other families of numbers and their first-differences:
Smallest prime factor of greatest proper divisor of n.
+10
17
1, 1, 1, 2, 1, 3, 1, 2, 3, 5, 1, 2, 1, 7, 5, 2, 1, 3, 1, 2, 7, 11, 1, 2, 5, 13, 3, 2, 1, 3, 1, 2, 11, 17, 7, 2, 1, 19, 13, 2, 1, 3, 1, 2, 3, 23, 1, 2, 7, 5, 17, 2, 1, 3, 11, 2, 19, 29, 1, 2, 1, 31, 3, 2, 13, 3, 1, 2, 23, 5, 1, 2, 1, 37, 5, 2, 11, 3, 1, 2, 3, 41, 1, 2, 17, 43, 29, 2, 1, 3, 13, 2, 31, 47
COMMENTS
When n is composite, this is the 2nd factor when n is written as a product of primes in nondecreasing order. For example, 12 = 2*2*3, so a(12) = 2. - Peter Munn, Feb 19 2017
For all sufficiently large n the median value of a(1), a(2), ... a(n) is A281889(2) = 7. - Peter Munn, Jul 12 2019
MATHEMATICA
PrimeFactors[ n_ ] := Flatten[ Table[ # [ [ 1 ] ], {1} ] & /@ FactorInteger[ n ] ]; f[ n_ ] := Block[ {gpd = Divisors[ n ][ [ -2 ] ]}, If[ gpd == 1, 1, PrimeFactors[ gpd ][ [ 1 ] ] ] ]; Table[ If[ n == 1, 1, f[ n ] ], {n, 1, 95} ]
(* Second program: *)
Table[If[Or[PrimeQ@ n, n == 1], 1, FactorInteger[n/SelectFirst[Prime@ Range@ PrimePi[Sqrt@ n], Divisible[n, #] &]][[1, 1]] ], {n, 94}] (* Michael De Vlieger, Aug 14 2017 *)
PROG
(PARI) lpf(n)=if(n>1, factor(n)[1, 1], 1)
(PARI) a(n)=if(n<4||isprime(n), return(1)); my(f=factor(n)); if(f[1, 2]>1, f[1, 1], f[2, 1]) \\ Charles R Greathouse IV, May 09 2013
CROSSREFS
Cf. A001222, A001358, A020639, A025475, A027746, A032742, A054576, A084127, A085392, A085393, A115561, A117357, A117358, A281889.
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 3, 1, 1, 1, 5, 1, 1, 1, 1, 1, 1, 1, 6, 1, 1, 1, 1, 1, 3, 1, 7, 1, 1, 1, 5, 1, 1, 1, 8, 1, 1, 1, 1, 1, 1, 1, 9, 1, 1, 1, 1, 1, 1, 1, 10, 3, 1, 1, 7, 1, 1, 1, 11, 1, 5, 1, 1, 1, 1, 1, 12, 1, 1, 1, 5, 1, 1, 1
MATHEMATICA
f[n_] := n/FactorInteger[n][[1, 1]]; (* f is A032742 *)
a[n_] := f@ f@ f@ n;
Table[Nest[#/FactorInteger[#][[1, 1]]&, n, 3], {n, 110}] (* Harvey P. Dale, Oct 10 2024 *)
Search completed in 0.012 seconds
|