|
|
A007417
|
|
If k appears, 3k does not.
(Formerly M0954)
|
|
19
|
|
|
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, 35, 36, 37, 38, 40, 41, 43, 44, 45, 46, 47, 49, 50, 52, 53, 55, 56, 58, 59, 61, 62, 63, 64, 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
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
Numbers whose ternary representation ends in even number of zeros. - Philippe Deléham, Mar 25 2004
|
|
REFERENCES
|
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
|
|
LINKS
|
|
|
FORMULA
|
|
|
EXAMPLE
|
Given the following multiplication table: top row = "not multiples of 3", left column = powers of 3; we get:
...
1 2 4 5 7 8 10 11 13
3 6 12 15 21 24 30 33 39
9 18 36 45 63 72 90 99 114
27 54 108
81
... 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)
|
|
MATHEMATICA
|
|
|
PROG
|
(Haskell)
import Data.List (delete)
a007417 n = a007417_list !! (n-1)
a007417_list = s [1..] where
s (x:xs) = x : s (delete (3*x) xs)
(PARI) is(n) = { my(i = 0); while(n%3==0, n/=3; i++); i%2==0; } \\ Iain Fox, Nov 17 2017
(PARI) is(n)=valuation(n, 3)%2==0; \\ Joerg Arndt, Aug 08 2020
|
|
CROSSREFS
|
|
|
KEYWORD
|
easy,nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|