A175880 a(1)=1, a(2)=2. If n >= 3: if n/2 is in the sequence, a(n)=0, otherwise a(n)=n.
1, 2, 3, 0, 5, 0, 7, 8, 9, 0, 11, 12, 13, 0, 15, 0, 17, 0, 19, 20, 21, 0, 23, 0, 25, 0, 27, 28, 29, 0, 31, 32, 33, 0, 35, 36, 37, 0, 39, 0, 41, 0, 43, 44, 45, 0, 47, 48, 49, 0, 51, 52, 53, 0, 55, 0, 57, 0, 59, 60, 61, 0, 63, 0, 65, 0, 67, 68, 69, 0, 71, 0, 73, 0, 75, 76, 77, 0, 79, 80
Offset: 1
Links
- Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
Crossrefs
Programs
-
Haskell
import Data.List (delete) a175880 n = a175880_list !! (n-1) a175880_list = 1 : f [2..] [2..] where f (x:xs) (y:ys) | x == y = x : (f xs $ delete (2*x) ys) | otherwise = 0 : (f xs (y:ys)) for_bFile = take 10000 a175880_list -- Reinhard Zumkeller, Feb 09 2011
-
Maple
A110654 := proc(n) 2*n+1-(-1)^n ; %/4 ;end proc: A175880 := proc(n) if n <=2 then n; else if type(n,'even') then n-2*procname(A110654(n)) ; else n; end if; end if; end proc: seq(A175880(n),n=1..40) ; # R. J. Mathar, Dec 07 2010
Comments