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”).

A249738
a(n) = 0 if n is 1 or a prime, otherwise, when n = A020639(n) * A032742(n), a(n) = the largest k < A032742(n) such that either k = 1 or A020639(k) >= A020639(n), where A020639(n) and A032742(n) are the smallest prime and the largest proper divisor dividing n.
3
0, 0, 0, 1, 0, 2, 0, 3, 1, 4, 0, 5, 0, 6, 3, 7, 0, 8, 0, 9, 5, 10, 0, 11, 1, 12, 7, 13, 0, 14, 0, 15, 9, 16, 5, 17, 0, 18, 11, 19, 0, 20, 0, 21, 13, 22, 0, 23, 1, 24, 15, 25, 0, 26, 7, 27, 17, 28, 0, 29, 0, 30, 19, 31, 11, 32, 0, 33, 21, 34, 0, 35, 0, 36, 23, 37, 7, 38, 0, 39, 25, 40, 0, 41, 13, 42, 27, 43, 0, 44, 11, 45, 29, 46, 17, 47, 0, 48, 31, 49, 0, 50
OFFSET
1,6
LINKS
FORMULA
Other identities:
a(n) = A249744(n) / A020639(n).
a(k) = 1 if and only if k is one of A001248 (squares of primes).
PROG
(Scheme) (define (A249738 n) (cond ((or (= 1 n) (prime? n)) 0) (else (let ((lpf (A020639 n))) (let loop ((k (- (A032742 n) 1))) (cond ((= 1 k) k) ((>= (A020639 k) lpf) k) (else (loop (- k 1)))))))))
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Dec 06 2014
STATUS
approved