cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Dec 06 2014

Keywords

Crossrefs

Programs

  • 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)))))))))

Formula

Other identities:
a(n) = A249744(n) / A020639(n).
a(k) = 1 if and only if k is one of A001248 (squares of primes).