OFFSET
1,2
COMMENTS
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
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
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, Oct 22 2004
STATUS
approved