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

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A032821 Numbers whose set of base-9 digits is {1,4}. 1

%I #21 Sep 08 2022 08:44:51

%S 1,4,10,13,37,40,91,94,118,121,334,337,361,364,820,823,847,850,1063,

%T 1066,1090,1093,3007,3010,3034,3037,3250,3253,3277,3280,7381,7384,

%U 7408,7411,7624,7627,7651,7654,9568,9571,9595,9598

%N Numbers whose set of base-9 digits is {1,4}.

%H Vincenzo Librandi, <a href="/A032821/b032821.txt">Table of n, a(n) for n = 1..1000</a>

%H <a href="/index/Ar#3-automatic">Index entries for 3-automatic sequences</a>.

%F a(1)=1, a(2)=4; a(n) = 9*a(floor(n/2))+1 for n odd, otherwise a(n) = 9*a(floor((n-1)/2))+4. - _Bruno Berselli_, May 28 2012

%t Select[Range[9600],MemberQ[{{1},{4},{1,4}},Union[IntegerDigits[ #,9]]]&] (* _Harvey P. Dale_, Jul 24 2011 *)

%t Flatten[Table[FromDigits[#,9]&/@Tuples[{1,4},n],{n,5}]] (* _Vincenzo Librandi_, May 28 2012 *)

%o (Magma) [n: n in [1..10000] | Set(IntegerToSequence(n, 9)) subset {1, 4}]; // _Vincenzo Librandi_, May 28 2012

%o (Maxima) a[1]:1$ a[2]:4$ a[n]:= if oddp(n) then 9*a[floor(n/2)]+1 else 9*a[floor((n-1)/2)]+4$ makelist(a[n],n,1,42); /* _Bruno Berselli_, May 28 2012 */

%K nonn,base,easy

%O 1,2

%A _Clark Kimberling_

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | 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 April 19 19:02 EDT 2024. Contains 371798 sequences. (Running on oeis4.)