login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 


a(1) = 1; for n > 1, a(n) is the smallest number m > a(n-1) such that the number of 1's in the binary expansion of m is not already in the sequence.
5

%I #21 Dec 20 2021 02:43:05

%S 1,3,5,6,9,10,12,15,17,18,20,23,24,27,29,30,33,34,36,39,40,43,45,46,

%T 48,51,53,54,57,58,60,65,66,68,71,72,75,77,78,80,83,85,86,89,90,92,96,

%U 99,101,102,105,106,108,113,114,116,120,127,129,130,132,135,136,139,141

%N a(1) = 1; for n > 1, a(n) is the smallest number m > a(n-1) such that the number of 1's in the binary expansion of m is not already in the sequence.

%C If A000120(k) is in the sequence then k is not.

%C Differs from A001969: 63 is not included since it has 6 bits set.

%H Reinhard Zumkeller, <a href="/A075311/b075311.txt">Table of n, a(n) for n = 1..10000</a>

%H Phil Carmody, <a href="http://groups.yahoo.com/group/primenumbers/message/9173">Re: New sieve and a challenge</a>

%H Jon Perry, <a href="http://groups.yahoo.com/group/primenumbers/message/9171">New sieve and a challenge</a>

%H Jon Perry and Phil Carmody, <a href="/A075311/a075311.txt">New sieve and a challenge</a>, digest of 4 messages in primenumbers Yahoo group, Oct 11, 2002.

%e We start with a(1)=1. Then 2 is not included since it has one bit set and 1 is in the sequence. Next, 3 is included since it has 2 one bits and 2 is not in the sequence. And so on.

%o (PARI) v=vector(1000): v[1]=1: for(curr=2,1000,e=A000120(curr): if(v[e],continue,v[curr]=1)): for(k=1,1000,if(v[k],print1(k",")))

%o (Haskell)

%o a075311 n = a075311_list !! (n-1)

%o a075311_list = 1 : f 2 [1] where

%o f x ys = if a000120 x `elem` ys then f (x + 1) ys

%o else x : f (x + 1) (x : ys)

%o -- _Reinhard Zumkeller_, Apr 22 2012

%Y Cf. A000120, A001969.

%Y Cf. A075517, A217122.

%K easy,nonn

%O 1,2

%A _Phil Carmody_, Oct 11 2002

%E Edited by _Ralf Stephan_, Sep 14 2003

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 21 04:44 EDT 2024. Contains 376079 sequences. (Running on oeis4.)