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.

A007417 If k appears, 3k does not.

This page as a plain text file.
%I A007417 M0954 #95 Apr 04 2025 09:17:38
%S A007417 1,2,4,5,7,8,9,10,11,13,14,16,17,18,19,20,22,23,25,26,28,29,31,32,34,
%T A007417 35,36,37,38,40,41,43,44,45,46,47,49,50,52,53,55,56,58,59,61,62,63,64,
%U A007417 65,67,68,70,71,72,73,74,76,77,79,80,81,82,83,85,86,88,89,90,91,92,94,95,97,98,99,100
%N A007417 If k appears, 3k does not.
%C A007417 The characteristic function of this sequence is given by A014578. - _Philippe Deléham_, Mar 21 2004
%C A007417 Numbers whose ternary representation ends in even number of zeros. - _Philippe Deléham_, Mar 25 2004
%C A007417 Numbers for which 3 is not an infinitary divisor. - _Vladimir Shevelev_, Mar 18 2013
%C A007417 Where odd terms occur in A051064. - _Reinhard Zumkeller_, May 23 2013
%D A007417 N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
%H A007417 Iain Fox, <a href="/A007417/b007417.txt">Table of n, a(n) for n = 1..10000</a> (first 1000 terms from T. D. Noe)
%H A007417 Aviezri S. Fraenkel, <a href="http://dx.doi.org/10.1016/j.disc.2011.03.032">The vile, dopey, evil and odious game players</a>, Discrete Math. 312 (2012), no. 1, 42-46.
%H A007417 Simon Plouffe, <a href="/A007417/a007417.pdf">Email to N. J. A. Sloane, Jun. 1994</a>
%H A007417 David Wakeham and David R. Wood, <a href="http://www.emis.de/journals/INTEGERS/papers/n26/n26.Abstract.html">On multiplicative Sidon sets</a>, INTEGERS, 13 (2013), #A26.
%H A007417 <a href="/index/Ar#3-automatic">Index entries for 3-automatic sequences</a>.
%F A007417 Limit_{n->infinity} a(n)/n = 4/3. - _Philippe Deléham_, Mar 21 2004
%F A007417 Partial sums of A092400. Indices of even numbers in A007949. Indices of odd numbers in A051064. a(n) = A092401(2n-1). - _Philippe Deléham_, Mar 29 2004
%F A007417 {a(n)} = A052330({A042948(n)}), where {a(n)} denotes the set of integers in the sequence. - _Peter Munn_, Aug 31 2019
%e A007417 From _Gary W. Adamson_, Mar 02 2010: (Start)
%e A007417 Given the following multiplication table: top row = "not multiples of 3", left column = powers of 3; we get:
%e A007417    1   2   4   5   7   8   10   11   13
%e A007417    3   6  12  15  21  24   30   33   39
%e A007417    9  18  36  45  63  72   90   99  114
%e A007417   27  54 108
%e A007417   81
%e A007417 If rows are labeled (1, 2, 3, ...) then odd-indexed rows are in the set; but evens not. Examples: 9 is in the set since 3 is not, but 27 in row 4 can't be. (End)
%t A007417 Select[ Range[100], (# // IntegerDigits[#, 3]& // Split // Last // Count[#, 0]& // EvenQ)&] (* _Jean-François Alcover_, Mar 01 2013, after _Philippe Deléham_ *)
%t A007417 Select[Range[100], EvenQ@ IntegerExponent[#, 3] &] (* _Michael De Vlieger_, Sep 01 2020 *)
%o A007417 (Haskell)
%o A007417 import Data.List (delete)
%o A007417 a007417 n = a007417_list !! (n-1)
%o A007417 a007417_list = s [1..] where
%o A007417    s (x:xs) = x : s (delete (3*x) xs)
%o A007417 (PARI) is(n) = { my(i = 0); while(n%3==0, n/=3; i++); i%2==0; } \\ _Iain Fox_, Nov 17 2017
%o A007417 (PARI) is(n)=valuation(n,3)%2==0; \\ _Joerg Arndt_, Aug 08 2020
%o A007417 (Python)
%o A007417 from sympy import integer_log
%o A007417 def A007417(n):
%o A007417     def f(x): return n+x-sum(((m:=x//9**i)-2)//3+(m-1)//3+2 for i in range(integer_log(x,9)[0]+1))
%o A007417     m, k = n, f(n)
%o A007417     while m != k: m, k = k, f(k)
%o A007417     return m # _Chai Wah Wu_, Feb 15 2025
%Y A007417 Complement of A145204. - _Reinhard Zumkeller_, Oct 04 2008
%Y A007417 Cf. A007949, A014578 (characteristic function), A042948, A051064, A052330, A092400, A092401.
%K A007417 easy,nonn
%O A007417 1,2
%A A007417 _N. J. A. Sloane_ and _Simon Plouffe_
%E A007417 More terms from _Philippe Deléham_, Mar 29 2004
%E A007417 Typo corrected by _Philippe Deléham_, Apr 15 2010