[go: up one dir, main page]

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

A098962
Smallest sequence such that over all terms each prime p occurs exactly p times as prime factor; a(1)=1.
4
1, 2, 3, 5, 6, 7, 11, 13, 15, 17, 19, 23, 25, 29, 31, 35, 37, 41, 43, 47, 49, 53, 59, 61, 67, 71, 73, 77, 79, 83, 89, 91, 97, 101, 103, 107, 109, 113, 119, 121, 127, 131, 137, 139, 143, 149, 151, 157, 163, 167, 169, 173, 179, 181, 187, 191, 193, 197, 199, 209, 211
OFFSET
1,2
COMMENTS
A000040 is a subsequence.
A099619 gives k such that a(k) = n-th prime; A099620 gives the greatest term divisible by the n-th prime.
A001222(a(n)) <= 2.
LINKS
FORMULA
#{(n,k): A027746(a(n),k)=p, 1<=k<=A001222(a(n))} = p for all primes p. - Reinhard Zumkeller, Feb 17 2013
EXAMPLE
p=2: a(2)=2, a(5)=6=2*3: 4=2*2 is missing, otherwise 2 would occur more than 2 times, there are no more even terms greater than 6;
p=3: a(3)=3, a(5)=6=2*3, a(9)=15=3*5: 9=3*3 is missing, otherwise 3 would occur more than 3 times, there are no more multiples of 3 greater than 15;
p=5: a(4)=5, a(9)=15=3*5, a(13)=25=5*5, a(16)=35=5*7: no more multiples of 5 greater than 35;
p=7: a(6)=7, a(16)=35=5*7, a(21)=49=7*7, a(28)=77=7*11, a(32)=91=7*13, a(39)=119=7*17: no more multiples of 7 greater than 119.
- Reinhard Zumkeller, Feb 17 2013
PROG
(Haskell)
import Data.List (delete)
a098962 n = a098962_list !! (n-1)
a098962_list = 1 : f [2..] (tail a175944_list) where
f xs'@(x:xs) ps'@(p:ps)
| a010051 x == 1 = x : f xs (delete x ps')
| u == q && v == q' = x : f xs' zs
| otherwise = f xs ps'
where q = a020639 x; q' = div x q
(us, u:us') = span (< q) ps'
(vs, v:vs') = span (< q') us'
zs@(z:_) = us ++ vs ++ vs'
xs' = if z == p then xs else filter ((> 0) . (`mod` p)) xs
-- Reinhard Zumkeller, Feb 17 2013
CROSSREFS
Cf. A020639, A008578, A005145, subsequence of A037143.
Sequence in context: A363462 A260442 A359397 * A073485 A377201 A062101
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, Oct 22 2004
STATUS
approved