|
|
A249744
|
|
a(n) = 0 if n is 1 or a prime, otherwise, when n = A020639(n) * A032742(n), a(n) = the largest m < n such that A020639(m) = A020639(n), where A020639(n) and A032742(n) are the smallest prime and the largest proper divisor dividing n.
|
|
6
|
|
|
0, 0, 0, 2, 0, 4, 0, 6, 3, 8, 0, 10, 0, 12, 9, 14, 0, 16, 0, 18, 15, 20, 0, 22, 5, 24, 21, 26, 0, 28, 0, 30, 27, 32, 25, 34, 0, 36, 33, 38, 0, 40, 0, 42, 39, 44, 0, 46, 7, 48, 45, 50, 0, 52, 35, 54, 51, 56, 0, 58, 0, 60, 57, 62, 55, 64, 0, 66, 63, 68, 0, 70, 0, 72, 69, 74, 49, 76, 0, 78, 75, 80, 0, 82, 65, 84, 81, 86, 0, 88, 77, 90, 87, 92, 85, 94, 0, 96, 93, 98, 0, 100
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,4
|
|
COMMENTS
|
For all composite numbers, a(n) tells what is the previous number processed by the sieve of Eratosthenes, i.e., number which is immediately left of n on the same row where n is in arrays like A083140, A083221.
|
|
LINKS
|
|
|
FORMULA
|
Other identities. For all n >= 1 it holds:
a(2n) = 2n-2.
|
|
MATHEMATICA
|
a[1] = 0; a[_?PrimeQ] = 0; a[n_] := For[p = FactorInteger[n][[1, 1]]; m = n - p, True, m = m - p, If[FactorInteger[m][[1, 1]] == p, Return[m]]]; Array[a, 102] (* Jean-François Alcover, Mar 08 2016 *)
|
|
PROG
|
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|