login
This site is supported by donations to The OEIS Foundation.

 

Logo

"Email this user" was broken Aug 14 to 9am Aug 16. If you sent someone a message in this period, please send it again.

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A005823 Numbers whose ternary expansion contains no 1's.
(Formerly M1567)
42
0, 2, 6, 8, 18, 20, 24, 26, 54, 56, 60, 62, 72, 74, 78, 80, 162, 164, 168, 170, 180, 182, 186, 188, 216, 218, 222, 224, 234, 236, 240, 242, 486, 488, 492, 494, 504, 506, 510, 512, 540, 542, 546, 548, 558, 560, 564, 566, 648, 650, 654, 656, 666, 668, 672, 674 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

COMMENTS

The set of real numbers between 0 and 1 that contain no 1's in their ternary expansion is the well-known Cantor set with Hausdorff dimension log 2 / log 3.

Complement of A081606. - Reinhard Zumkeller, Mar 23 2003

Numbers n such that the n-th Apery number equals 1 (mod 3) (cf. A005258) - Benoit Cloitre, Nov 30 2003

Numbers n such that the n-th central Delannoy number equals 1 (mod 3) (cf. A001850) - Benoit Cloitre, Nov 30 2003

Numbers n such that there exists a permutation p_1, ..., p_n of 1, ..., n such that i + p_i is a power of 3 for every i - Ray Chandler, Aug 03 2004

Subsequence of A125292; A125291(a(n)) = 1 for n>0. - Reinhard Zumkeller, Nov 26 2006

A062756(a(n)) = 0. - Reinhard Zumkeller, Mar 02 2008

The first 2^n terms of the sequence could be obtained using the Cantor process for the segment [0,3^n-1]. E.g. for n=2 we have [0,{1},2,{3,4,5},6,{7},8]. The numbers outside of braces are the first 4 terms of the sequence. Therefore the terms of the sequence could be called "Cantor's numbers". - Vladimir Shevelev, Jun 13 2008

Mahler proved that positive a(n) is never a square. - Michel Marcus, Nov 12 2012

REFERENCES

K. J. Falconer, The Geometry of Fractal Sets, Cambridge, 1985; p. 14.

N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

LINKS

T. D. Noe, Table of n, a(n) for n = 1..1024

J.-P. Allouche and J. Shallit, The ring of k-regular sequences, Theoretical Computer Sci., 98 (1992), 163-197.

J.-P. Allouche and J. Shallit, The ring of k-regular sequences, Theoretical Computer Sci., 98 (1992), 163-197.

Sajed Haque, Jeffrey Shallit, Discriminators and k-Regular Sequences, arXiv:1605.00092 [cs.DM], 2016.

C. Kimberling, Affinely recursive sets and orderings of languages, Discrete Math., 274 (2004), 147-160.

K. Mahler, The representation of squares to the base 3, Acta Arith. Vol. 53, Issue 1 (1989), 99-106.

M. Mendes France and A. J. van der Poorten, From geometry to Euler identities, Theoret. Comput. Sci., 65 (1989), 213-220.

Index entries for 3-automatic sequences.

FORMULA

a(2n) = 3*a(n)+2, a(2n+1) = 3*a(n+1), a(1) = 0.

a(n) = Sum_{k = 1..n} 1 + 3^A007814(k). - Philippe Deléham, Jul 09 2005

If the offset were changed to zero, then: a(0)=0, a(n+1)=f(a(n)+1,f(a(n)+1) where f(x,y) = if x<3 and x<>1 then y else if x mod 3 = 1 then f(y+1,y+1) else f(floor(x/3),y). - Reinhard Zumkeller, Mar 02 2008

G.f. g(x) satisfies g(x) = 3*g(x^2)*(1+1/x) + 2*x^2/(1-x^2). - Robert Israel, Jan 04 2015

MAPLE

a:= proc(n) option remember;

      `if`(n=1, 0, `if`(irem (n, 2, 'q')=0, 3*a(q)+2, 3*a(q+1)))

    end:

seq(a(n), n=1..100); # Alois P. Heinz, Apr 19 2012

MATHEMATICA

Select[ Range[ 0, 729 ], (Count[ IntegerDigits[ #, 3 ], 1 ]==0)& ]

Select[Range[0, 700], DigitCount[#, 3, 1]==0&] (* Harvey P. Dale, Mar 12 2016 *)

PROG

(PARI) { plnt=1;

mxind=57 ; mxind++ ;

for(testn=0, 10^6,

lgt=1;

for(i=1, 1000, if(3^i > testn, lgt=i; break()));

atst=testn; pasr=1;

for(j=1, lgt, lasd=atst%3;

if(lasd==1, pasr=0; break(), atst=(atst-lasd)/3));

if(pasr==1,

print1(testn, ", "); plnt++) ; if(mxind ==  plnt, break() ))} \\\ Douglas Latimer, Apr 17 2012

(PARI) is(n)=while(n, if(n%3==1, return(0), n\=3)); 1 \\ Charles R Greathouse IV, Apr 20 2012

(PARI) a(n)=n=binary(n-1); sum(i=1, #n, 2*n[i]*3^(#n-i)) \\ Charles R Greathouse IV, Apr 20 2012

(PARI) a(n)=2*fromdigits(binary(n-1), 3) \\ Charles R Greathouse IV, Aug 24 2016

(Python)

def A005823(n):

....return 2*int(format(n-1, 'b'), 3) # Chai Wah Wu, Jan 04 2015

CROSSREFS

Twice A005836. Cf. A032924, A014263, A007089, A062756, A061392, A001196, A097252-A097262.

Sequence in context: A183212 A053355 A233572 * A259026 A178758 A024431

Adjacent sequences:  A005820 A005821 A005822 * A005824 A005825 A005826

KEYWORD

nonn,easy,nice,base

AUTHOR

N. J. A. Sloane, Jeffrey Shallit

EXTENSIONS

More terms from Sascha Kurz, Mar 24 2002

Offset corrected by N. J. A. Sloane, Mar 02 2008. This may require some of the formulas to be adjusted.

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy .

Last modified August 20 17:15 EDT 2017. Contains 290836 sequences.