|
Search: id:A063918
|
|
|
| A063918 |
|
a(1) = 1 and - applying the sieve of Eratosthenes - for n > 1: a(n) = if n is prime then 0 else the first prime p which marks n as composite. |
|
+0 1
|
|
| 1, 0, 0, 2, 0, 2, 0, 2, 3, 2, 0, 2, 0, 2, 3, 2, 0, 2, 0, 2, 3, 2, 0, 2, 5, 2, 3, 2, 0, 2, 0, 2, 3, 2, 5, 2, 0, 2, 3, 2, 0, 2, 0, 2, 3, 2, 0, 2, 7, 2, 3, 2, 0, 2, 5, 2, 3, 2, 0, 2, 0, 2, 3, 2, 5, 2, 0, 2, 3, 2, 0, 2, 0, 2, 3, 2, 7, 2, 0, 2, 3, 2, 0, 2, 5, 2, 3, 2, 0, 2, 7, 2, 3, 2, 5, 2, 0, 2, 3, 2, 0, 2, 0, 2, 3
(list; graph; listen)
|
|
|
OFFSET
|
1,4
|
|
|
COMMENT
|
k > 1: a(k*2) = 2, as all even numbers > 2 are marked by 2; for all primes p: a(p^k) = p and a(i) < p for i < p^2.
|
|
LINKS
|
Harry J. Smith, Table of n, a(n) for n=1,...,1000
|
|
PROGRAM
|
(PARI) { for (n=1, 1000, if (n==1, p=1, if (isprime(n), p=0, p=1; until (n%p == 0, p=nextprime(p + 1)))); write("b063918.txt", n, " ", p) ) } [From Harry J. Smith (hjsmithh(AT)sbcglobal.net), Sep 02 2009]
|
|
CROSSREFS
|
A055396, A020639.
Sequence in context: A140302 A085341 A160812 this_sequence A163169 A097974 A139036
Adjacent sequences: A063915 A063916 A063917 this_sequence A063919 A063920 A063921
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
Reinhard Zumkeller (reinhard.zumkeller(AT)gmail.com), Sep 04 2001
|
|
|
Search completed in 0.002 seconds
|