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.
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
Offset: 1
Keywords
Links
- Antti Karttunen, Table of n, a(n) for n = 1..10000
Crossrefs
Programs
-
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 *)
-
Scheme
(define (A249744 n) (* (A020639 n) (A249738 n)))
Comments