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.

Showing 1-3 of 3 results.

A004780 Binary expansion contains 2 adjacent 1's.

Original entry on oeis.org

3, 6, 7, 11, 12, 13, 14, 15, 19, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 35, 38, 39, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 67, 70, 71, 75, 76, 77, 78, 79, 83, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100
Offset: 1

Views

Author

Keywords

Comments

Complement of A003714. It appears that n is in the sequence if and only if C(3n,n) is even. - Benoit Cloitre, Mar 09 2003
Since the binary representation of these numbers contains two adjacent 1's, so for these values of n, we will have (n XOR 2n XOR 3n) != 0, and thus a two player Nim game with three heaps of (n, 2n, 3n) stones will be a winning configuration for the first player. - V. Raman, Sep 17 2012
A048728(a(n)) > 0. - Reinhard Zumkeller, May 13 2014
The set of numbers x such that Or(x,3*x) <> 3*x. - Gary Detlefs, Jun 04 2024

Crossrefs

Complement: A003714.
Subsequences (apart from any initial zero-term): A001196, A004755, A004767, A033428, A277335.

Programs

  • Haskell
    a004780 n = a004780_list !! (n-1)
    a004780_list = filter ((> 1) . a048728) [1..]
    -- Reinhard Zumkeller, May 13 2014
    
  • Maple
    q:= n-> verify([1$2], Bits[Split](n), 'sublist'):
    select(q, [$0..200])[];  # Alois P. Heinz, Oct 22 2021
  • PARI
    is(n)=bitand(n,n+n)>0 \\ Charles R Greathouse IV, Sep 19 2012
    
  • Python
    from itertools import count, islice
    def A004780_gen(startvalue=1): # generator of terms >= startvalue
        return filter(lambda n:n&(n<<1), count(max(startvalue,1)))
    A004780_list = list(islice(A004780_gen(),30)) # Chai Wah Wu, Jul 13 2022

Formula

a(n) ~ n. - Charles R Greathouse IV, Sep 19 2012

Extensions

Offset corrected by Reinhard Zumkeller, Jul 28 2010

A242407 Numbers such that in ternary representation all pairs of adjacent digits have sums not greater than 2.

Original entry on oeis.org

0, 1, 2, 3, 4, 6, 9, 10, 11, 12, 13, 18, 19, 20, 27, 28, 29, 30, 31, 33, 36, 37, 38, 39, 40, 54, 55, 56, 57, 58, 60, 81, 82, 83, 84, 85, 87, 90, 91, 92, 93, 94, 99, 100, 101, 108, 109, 110, 111, 112, 114, 117, 118, 119, 120, 121, 162, 163, 164, 165, 166, 168
Offset: 1

Views

Author

Reinhard Zumkeller, May 13 2014

Keywords

Comments

A242400(a(n)) = 0;
A242399(a(n)) = 4*a(n);
numbers m, such that in ternary arithmetic no carry occurs, when 3*m is added to m.

Examples

			Initial terms and their ternary representations, cf. A007089:
.  0 1 2  3  4  6   9  10  11  12  13  18  19  20   27   28   29   30 ..
.  0 1 2 10 11 20 100 101 102 110 111 200 201 202 1000 1001 1002 1010 ..
		

Crossrefs

Cf. A242408 (complement), A003714, A039691, A007089.

Programs

  • Haskell
    a242407 n = a242407_list !! (n-1)
    a242407_list = filter ((== 0) . a242400) [0..]
  • Mathematica
    Select[Range[0,200],Max[Total/@Partition[IntegerDigits[#, 3],2,1]]<3&] (* Harvey P. Dale, Jan 08 2023 *)

A242400 Differences between A008586 (multiples of 4) and A242399.

Original entry on oeis.org

0, 0, 0, 0, 0, 9, 0, 9, 9, 0, 0, 0, 0, 0, 9, 27, 36, 36, 0, 0, 0, 27, 27, 36, 27, 36, 36, 0, 0, 0, 0, 0, 9, 0, 9, 9, 0, 0, 0, 0, 0, 9, 27, 36, 36, 81, 81, 81, 108, 108, 117, 108, 117, 117, 0, 0, 0, 0, 0, 9, 0, 9, 9, 81, 81, 81, 81, 81, 90, 108, 117, 117, 81
Offset: 0

Views

Author

Reinhard Zumkeller, May 13 2014

Keywords

Comments

a(n) = A008586(n) - A242399(n);
a(m) = 0 iff m is a term of A242407;
a(A242407(n)) = 0; a(A242408(n)) > 0.

Crossrefs

Cf. A048728.

Programs

  • Haskell
    a242400 n = a008586 n - a242399 n
Showing 1-3 of 3 results.