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.

A121153 Numbers k with the property that 1/k can be written in base 3 in such a way that the fractional part contains no 1's.

This page as a plain text file.
%I A121153 #15 Aug 12 2025 03:07:18
%S A121153 1,3,4,9,10,12,13,27,28,30,36,39,40,81,82,84,90,91,108,117,120,121,
%T A121153 243,244,246,252,270,273,324,328,351,360,363,364,729,730,732,738,756,
%U A121153 757,810,819,820,949,972,984,1036,1053,1080,1089,1092,1093,2187
%N A121153 Numbers k with the property that 1/k can be written in base 3 in such a way that the fractional part contains no 1's.
%C A121153 Numbers k such that 1/k is in the Cantor set.
%C A121153 A subsequence of A054591. The first member of A054591 which does not belong to this sequence is 146. See A135666.
%C A121153 This is not a subsequence of A005836 (949 belongs to the present sequence but not to A005836). See A170830, A170853.
%H A121153 T. D. Noe and N. J. A. Sloane, <a href="/A121153/b121153.txt">Table of n, a(n) for n=1..1164</a> (terms < 3^21)
%H A121153 D. Jordan and R. Schayer <a href="http://newton.math.psu.edu/mass/reu/2003/DaRi/proj1.pdf">Rational points on the Cantor middle thirds set</a> [Broken link corrected by _Rainer Rosenthal_, Feb 20 2009]
%e A121153 1/3 in base 3 can be written as either .1 or .0222222... The latter version contains no 1's, so 3 is in the sequence.
%e A121153 1/4 in base 3 is .02020202020..., so 4 is in the sequence.
%t A121153 (* Mma code from _T. D. Noe_, Feb 20 2010. This produces the sequence except for the powers of 3. *)
%t A121153 (* Find the length of the periodic part of the fraction: *)
%t A121153 FracLen[n_] := Module[{r = n/3^IntegerExponent[n, 3]}, MultiplicativeOrder[3, r]]
%t A121153 (* Generate the fractions and select those that have no 1's: *)
%t A121153 Select[Range[100000], ! MemberQ[Union[RealDigits[1/#, 3, FracLen[ # ]][[1]]], 1] &]
%o A121153 (PARI) is(n,R=divrem(3^logint(n,3),n),S=0)={while(R[1]!=1&&!bittest(S,R[2]), S+=1<<R[2];R=divrem(R[2]*3,n));R[1]!=1||R[2]==0} \\ _M. F. Hasler_, Feb 27 2018
%Y A121153 Cf. A054591, A005823, A005836, A170943, A170944, A170951, A170952, A170830, A170853.
%K A121153 nonn,base
%O A121153 1,2
%A A121153 _Jack W Grahl_, Aug 12 2006
%E A121153 Extended to 10^5 by _T. D. Noe_ and _N. J. A. Sloane_, Feb 20 2010
%E A121153 Entry revised by _N. J. A. Sloane_, Feb 22 2010