cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A086068 Min{k: A086066(k) = n}.

This page as a plain text file.
%I A086068 #13 Feb 15 2014 02:32:30
%S A086068 0,1,10,2,20,12,102,3,30,13,103,23,203,123,1023,4,40,14,104,24,204,
%T A086068 124,1024,34,304,134,1034,234,2034,1234,10234,5,50,15,105,25,205,125,
%U A086068 1025,35,305,135,1035,235,2035,1235,10235,45,405,145,1045,245,2045
%N A086068 Min{k: A086066(k) = n}.
%C A086068 Sequence is finite with last term a(2^10-1)=a(1023)=1023456789; A086067(1023456789)=1111111111.
%H A086068 Nathaniel Johnston, <a href="/A086068/b086068.txt">Table of n, a(n) for n = 1..1023</a> (full sequence)
%p A086068 A086068 := proc(n) local b,k,s: s:={}: if(n=1)then return 0: fi: b:=convert(n,base,2): for k from 1 to nops(b) do if(b[k] = 1)then s:=s union {k-1}: fi: od: s:=sort(convert(s,list)): if(s[1]=0)then return s[2]*10^(nops(s)-1)+add(s[j]*10^(nops(s)-j),j=3..nops(s)): else return add(s[j]*10^(nops(s)-j),j=1..nops(s)): fi: end: seq(A086068(n),n=1..53); # _Nathaniel Johnston_, Jun 01 2011
%Y A086068 Cf. A086069, A086070, A086067.
%K A086068 nonn,fini,full,easy
%O A086068 1,3
%A A086068 _Reinhard Zumkeller_, Jul 08 2003