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-10 of 22 results. Next

A079523 Utterly odd numbers: numbers whose binary representation ends in an odd number of ones.

Original entry on oeis.org

1, 5, 7, 9, 13, 17, 21, 23, 25, 29, 31, 33, 37, 39, 41, 45, 49, 53, 55, 57, 61, 65, 69, 71, 73, 77, 81, 85, 87, 89, 93, 95, 97, 101, 103, 105, 109, 113, 117, 119, 121, 125, 127, 129, 133, 135, 137, 141, 145, 149, 151, 153, 157, 159, 161, 165, 167, 169, 173, 177, 181
Offset: 1

Views

Author

Benoit Cloitre, Jan 21 2003

Keywords

Comments

Also, n such that A010060(n) = A010060(n+1) where A010060 is the Thue-Morse sequence.
Sequence of n such that a(n) = 3n begins 7, 23, 27, 29, 31, 39, 71, 87, 91, 93, 95, ...
Values of k such that the Motzkin number A001006(2k) is even. Values of k such that the number of restricted hexagonal polyominoes with 2k+1 cells is even (see A002212). Values of k such that the number of directed animals of size k+1 is even (see A005773). Values of k such that the Riordan number A005043(k) is even. - Emeric Deutsch and Bruce E. Sagan, Apr 02 2003
a(n) = A036554(n)-1 = A072939(n)-2. - Ralf Stephan, Jun 09 2003
Odious and evil terms alternate. - Vladimir Shevelev, Jun 22 2009
The sequence has the following fractal property: remove terms of the form 4k+1 from the sequence, and the remaining terms are of the form 4k+3: 7, 23, 31, 39, 55, 71, 87, ...; then subtract 3 from each of these terms and divide by 4 and you get the original sequence: 1, 5, 7, 9, 13, ... - Benoit Cloitre, Apr 06 2010
A035263(a(n)) = 0. - Reinhard Zumkeller, Mar 01 2012

Crossrefs

Programs

  • Haskell
    import Data.List (elemIndices)
    a079523 n = a079523_list !! (n-1)
    a079523_list = elemIndices 0 a035263_list
    -- Reinhard Zumkeller, Mar 01 2012
    
  • Magma
    [n: n in [0..200] | Valuation(n+1, 2) mod 2 eq 0 + 1]; // Vincenzo Librandi, Apr 16 2015
    
  • Mathematica
    Select[ Range[200], MatchQ[ IntegerDigits[#, 2], {b : (1) ..} | {_, 0, b : (1) ..} /; OddQ[ Length[{b}]]] & ] (* Jean-François Alcover, Jun 17 2013 *)
  • PARI
    is(n)=valuation(n+1,2)%2 \\ Charles R Greathouse IV, Mar 07 2013
    
  • Python
    from itertools import count, islice
    def A079523_gen(startvalue=1): return filter(lambda n:(~(n+1)&n).bit_length()&1,count(max(startvalue,1))) # generator of terms >= startvalue
    A079523_list = list(islice(A079523_gen(),61)) # Chai Wah Wu, Jul 05 2022
    
  • Python
    def A079523(n):
        def bisection(f,kmin=0,kmax=1):
            while f(kmax) > kmax: kmax <<= 1
            kmin = kmax >> 1
            while kmax-kmin > 1:
                kmid = kmax+kmin>>1
                if f(kmid) <= kmid:
                    kmax = kmid
                else:
                    kmin = kmid
            return kmax
        def f(x):
            c, s = n+x, bin(x)[2:]
            l = len(s)
            for i in range(l&1,l,2):
                c -= int(s[i])+int('0'+s[:i],2)
            return c
        return bisection(f,n,n)-1 # Chai Wah Wu, Jan 29 2025

Formula

a(n) is asymptotic to 3n.
a(n) = 2*A003159(n) - 1. a(1)=1, a(n) = a(n-1) + 2 if (a(n-1)+1)/2 does not belong to the sequence and a(n) = a(n-1) + 4 otherwise. - Emeric Deutsch and Bruce E. Sagan, Apr 02 2003
a(n) = (1/2)*A081706(2n-1).
a(n) = A003158(n) - n = A003157(n) - n - 1. - Philippe Deléham, Feb 22 2004
Values of k such that A091297(k) = 0. - Philippe Deléham, Feb 25 2004

A121539 Numbers whose binary expansion ends in an even number of 1's.

Original entry on oeis.org

0, 2, 3, 4, 6, 8, 10, 11, 12, 14, 15, 16, 18, 19, 20, 22, 24, 26, 27, 28, 30, 32, 34, 35, 36, 38, 40, 42, 43, 44, 46, 47, 48, 50, 51, 52, 54, 56, 58, 59, 60, 62, 63, 64, 66, 67, 68, 70, 72, 74, 75, 76, 78, 79, 80, 82, 83, 84, 86, 88, 90, 91, 92, 94, 96, 98, 99, 100
Offset: 1

Views

Author

Zak Seidov, Aug 08 2006

Keywords

Comments

Equivalently, increasing sequence defined by: "if k appears a*k+b does not", case a(1)=0, a=2, b=1.
Every even number ends with zero 1's and zero is even, so every even number is a term.
Consists of all even numbers together with A131323.
A035263(a(n)) = 1. - Reinhard Zumkeller, Mar 01 2012

Examples

			11 in binary is 1011, which ends with two 1's.
		

Crossrefs

Programs

  • Haskell
    import Data.List (elemIndices)
    a121539 n = a121539_list !! (n-1)
    a121539_list = elemIndices 1 a035263_list
    -- Reinhard Zumkeller, Mar 01 2012
    
  • Magma
    [n: n in [0..200] | Valuation(n+1, 2) mod 2 eq 0 ]; // Vincenzo Librandi, Apr 16 2015
    
  • Mathematica
    s={2}; With[{a=2,b=1},Do[If[FreeQ[s,(n-b)/a],AppendTo[s,n]],{n,3,100}]];s
  • PARI
    is(n)=valuation(n+1,2)%2==0 \\ Charles R Greathouse IV, Sep 23 2012
    
  • Python
    def ok(n): b = bin(n)[2:]; return (len(b) - len(b.rstrip('1')))%2 == 0
    print(list(filter(ok, range(101)))) # Michael S. Branicky, Jun 18 2021
    
  • Python
    def A121539(n):
        def f(x):
            c, s = n+x, bin(x)[2:]
            l = len(s)
            for i in range(l&1^1,l,2):
                c -= int(s[i])+int('0'+s[:i],2)
            return c
        m, k = n, f(n)
        while m != k: m, k = k, f(k)
        return m-1 # Chai Wah Wu, Jan 29 2025

Formula

A010060(a(n)) + A010060(a(n)+1) = 1. - Vladimir Shevelev, Jun 16 2009
a(n) = A003159(n) - 1. - Reinhard Zumkeller, Mar 01 2012
a(n) = (3/2)*n + O(log n). - Charles R Greathouse IV, Sep 23 2012

Extensions

Edited by N. J. A. Sloane at the suggestion of Stefan Steinerberger, Dec 17 2007

A075326 Anti-Fibonacci numbers: start with a(0) = 0, and extend by the rule that the next term is the sum of the two smallest numbers that are not in the sequence nor were used to form an earlier sum.

Original entry on oeis.org

0, 3, 9, 13, 18, 23, 29, 33, 39, 43, 49, 53, 58, 63, 69, 73, 78, 83, 89, 93, 98, 103, 109, 113, 119, 123, 129, 133, 138, 143, 149, 153, 159, 163, 169, 173, 178, 183, 189, 193, 199, 203, 209, 213, 218, 223, 229, 233, 238, 243, 249, 253, 258, 263, 269, 273, 279, 283
Offset: 0

Views

Author

Amarnath Murthy, Sep 16 2002

Keywords

Comments

In more detail, the sequence is constructed as follows: Start with a(0) = 0. The missing numbers are 1 2 3 4 5 6 ... Add the first two, and we get 3, which is therefore a(1). Cross 1, 2, and 1+2=3 off the missing list. The first two missing numbers are now 4 and 5, so a(2) = 4+5 = 9. Cross off 4,5,9 from the missing list. Repeat.
In other words, this is the sum of consecutive pairs in the sequence 1, 2, 4, 5, 6, 7, 8, 10, 11, 12, 14, 15, ..., (A249031) the complement to the present one in the natural numbers. For example, a(1)=1+2=3, a(2)=4+5=9, a(3)=6+7=13, ... - Philippe Lallouet (philip.lallouet(AT)orange.fr), May 08 2008
The new definition is due to Philippe Lalloue (philip.lallouet(AT)orange.fr), May 08 2008, while the name "anti-Fibonacci numbers" is due to D. R. Hofstadter, Oct 23 2014.
Original definition: second members of pairs in A075325.
If instead we take the sum of the last used non-term and the most recent (i.e., 1+2, 2+4, 4+5, 5+7, etc.), we get A008585. - Jon Perry, Nov 01 2014
The sequences a = A075325, b = A047215, and c = A075326 are the solutions of the system of complementary equations defined recursively as follows:
a(n) = least new,
b(n) = least new,
c(n) = a(n) + b(n),
where "least new k" means the least positive integer not yet placed. For anti-tribonacci numbers, see A265389; for anti-tetranacci, see A299405. - Clark Kimberling, May 01 2018
We see the Fibonacci numbers 3, 13, 89 and 233 occur in this sequence of anti-Fibonacci numbers. Are there infinitely many Fibonacci numbers occurring in (a(n))? The answer is yes: at least 13% of the Fibonacci numbers occur in (a(n)). This follows from Thomas Zaslavsky's formula, which implies that the sequence A017305 = (10n+3) is a subsequence of (a(n)). The Fibonacci sequence A000045 modulo 10 equals A003893, and has period 60. In this period, the number 3 occurs 8 times. - Michel Dekking, Feb 14 2019
From Augusto Santi, Aug 16 2025: (Start)
If we apply the anti-Fibonacci algorithm to the set of natural numbers minus the multiples of 3, we get 5, 10, 20, 25, 35, 40, 50, ...; that is, all the multiples of 5 present in the restricted set used. It is quite curious that in this particular case the algorithm can be applied recursively to its own output, generating, at the generic step s, the subset of multiples of 5^s (see Mathematics StackExchange link).
Conjectures:
After the first 0, the residues (mod 5) all fall in the classes 3 and 4. More generally, for k-nacci sequences the residue classes (mod k^2+1) all fall in k consecutive ones, the first being ceiling((k^2+1)/2​).
It is known that the sequence contains the arithmetic progression 10k+3, 20k+9 and 40k+18. These three progressions cover, experimentally, the 87.5% = 7/8 of the entire sequence. The remaining terms all belong to two forms: 40k+38 and 40k+39.
The anti-Fibonacci sequence contains all the squares of the numbers of the form 10k+3 and 10k+7, and all the cubes of the numbers of the form 10k+7, for k>=0. (End)

Crossrefs

Cf. A008585, A075325, A075327, A249031, A249032 (first differences), A000045.

Programs

  • Haskell
    import Data.List ((\\))
    a075326 n = a075326_list !! n
    a075326_list = 0 : f [1..] where
       f ws@(u:v:_) = y : f (ws \\ [u, v, y]) where y = u + v
    -- Reinhard Zumkeller, Oct 26 2014
    
  • Maple
    # Maple code for M+1 terms of sequence, from N. J. A. Sloane, Oct 26 2014
    c:=0; a:=[c]; t:=0; M:=100;
    for n from 1 to M do
    s:=t+1; if s in a then s:=s+1; fi;
    t:=s+1; if t in a then t:=t+1; fi;
    c:=s+t;
    a:=[op(a),c];
    od:
    [seq(a[n],n=1..nops(a))];
  • Mathematica
    (* Three sequences a,b,c as in Comments *)
    z = 200;
    mex[list_, start_] := (NestWhile[# + 1 &, start, MemberQ[list, #] &]);
    a = {}; b = {}; c = {};
    Do[AppendTo[a,
       mex[Flatten[{a, b, c}], If[Length[a] == 0, 1, Last[a]]]];
      AppendTo[b, mex[Flatten[{a, b, c}], Last[a]]];
      AppendTo[c, Last[a] + Last[b]], {z}];
    Take[a, 100] (* A075425 *)
    Take[b, 100] (* A047215 *)
    Take[c, 100] (* A075326 *)
    Grid[{Join[{"n"}, Range[0, 20]], Join[{"a(n)"}, Take[a, 21]],
      Join[{"b(n)"}, Take[b, 21]], Join[{"c(n)"}, Take[c, 21]]},
    Alignment -> ".",
    Dividers -> {{2 -> Red, -1 -> Blue}, {2 -> Red, -1 -> Blue}}]
    (* Peter J. C. Moses, Apr 26 2018 *)
    ********
    (* Sequence "a" via A035263 substitutions *)
    Accumulate[Prepend[Flatten[Nest[Flatten[# /. {0 -> {1, 1}, 1 -> {1, 0}}] &, {0}, 7] /. Thread[{0, 1} -> {{5, 5}, {6, 4}}]], 3]]
    (* Peter J. C. Moses, May 01 2018 *)
    ********
    (* Sequence "a" via Hofstadter substitutions; see his 2014 link *)
    morph = Rest[Nest[Flatten[#/.{1->{3},3->{1,1,3}}]&,{1},6]]
    hoff = Accumulate[Prepend[Flatten[morph/.Thread[{1,3}->{{6,4,5,5},{6,4,6,4,6,4,5,5}}]],3]]
    (* Peter J. C. Moses, May 01 2018 *)
  • Python
    def aupton(nn):
        alst, disallowed, mink = [0], {0}, 1
        for n in range(1, nn+1):
            nextk = mink + 1
            while nextk in disallowed: nextk += 1
            an = mink + nextk
            alst.append(an)
            disallowed.update([mink, nextk, an])
            mink = nextk + 1
            while mink in disallowed: mink += 1
        return alst
    print(aupton(57)) # Michael S. Branicky, Jan 31 2022
    
  • Python
    def A075326(n): return 5*n-1-int((n|(~((m:=n-1>>1)+1)&m).bit_length())&1) if n else 0 # Chai Wah Wu, Sep 11 2024

Formula

See Zaslavsky (2016) link.

Extensions

More terms from David Wasserman, Jan 16 2005
Entry revised (including the addition of an initial 0) by N. J. A. Sloane, Oct 26 2014 and Sep 26 2016 (following a suggestion from Thomas Zaslavsky)

A161579 Positions n such that A010060(n) = A010060(n+3).

Original entry on oeis.org

0, 1, 3, 4, 6, 8, 9, 11, 12, 13, 15, 16, 17, 19, 20, 22, 24, 25, 27, 28, 30, 32, 33, 35, 36, 38, 40, 41, 43, 44, 45, 47, 48, 49, 51, 52, 54, 56, 57, 59, 60, 61, 63, 64, 65, 67, 68, 70, 72, 73, 75, 76, 77, 79, 80, 81, 83, 84, 86, 88, 89, 91, 92, 94, 96, 97, 99, 100, 102, 104, 105, 107
Offset: 1

Views

Author

Vladimir Shevelev, Jun 14 2009

Keywords

Comments

Or: union of A131323 with the sequence of terms of the form A131323(n)-2, and with the sequence of terms of the form A036554(n)-2.
Conjecture: In every sequence of numbers n such that A010060(n)=A010060(n+k), for fixed odd k, the odious (A000069) and evil (A001969) terms alternate. - Vladimir Shevelev, Jul 31 2009

Crossrefs

Programs

  • Mathematica
    tm[0] = 0; tm[n_?EvenQ] := tm[n] = tm[n/2]; tm[n_] := tm[n] = 1 - tm[(n-1)/2]; Reap[For[n = 0, n <= 200, n++, If[tm[n] == tm[n+3], Sow[n]]]][[2, 1]] (* Jean-François Alcover, Oct 24 2013 *)
  • PARI
    is(n)=hammingweight(n)%2==hammingweight(n+3)%2 \\ Charles R Greathouse IV, Aug 20 2013

Formula

Equals {A001477} \ {A161580}.

Extensions

More terms from R. J. Mathar, Aug 17 2009

A161580 Positions n such that A010060(n) + A010060(n+3) = 1.

Original entry on oeis.org

2, 5, 7, 10, 14, 18, 21, 23, 26, 29, 31, 34, 37, 39, 42, 46, 50, 53, 55, 58, 62, 66, 69, 71, 74, 78, 82, 85, 87, 90, 93, 95, 98, 101, 103, 106, 110, 114, 117, 119, 122, 125, 127, 130, 133, 135, 138, 142, 146, 149, 151, 154, 157, 159, 162, 165, 167, 170, 174, 178, 181, 183, 186
Offset: 1

Views

Author

Vladimir Shevelev, Jun 14 2009

Keywords

Comments

Conjecture: In every sequence of numbers n such that A010060(n) + A010060(n+k) = 1, for fixed odd k, the odious (A000069) and evil (A001969) terms alternate. [From Vladimir Shevelev, Jul 31 2009]

Crossrefs

Programs

  • Mathematica
    tm[0] = 0; tm[n_?EvenQ] := tm[n] = tm[n/2]; tm[n_] := tm[n] = 1 - tm[(n-1)/2]; Reap[For[n = 0, n <= 200, n++, If[tm[n] + tm[n+3] == 1, Sow[n]]]][[2, 1]] (* Jean-François Alcover, Oct 24 2013 *)
  • PARI
    is(n)=hammingweight(n)%2+hammingweight(n+3)%2==1 \\ Charles R Greathouse IV, Mar 22 2013

Formula

Extensions

More terms from R. J. Mathar, Aug 17 2009

A161627 Positions n such that A010060(n)=A010060(n+4).

Original entry on oeis.org

4, 5, 6, 7, 20, 21, 22, 23, 28, 29, 30, 31, 36, 37, 38, 39, 52, 53, 54, 55, 68, 69, 70, 71, 84, 85, 86, 87, 92, 93, 94, 95, 100, 101, 102, 103, 116, 117, 118, 119, 124, 125, 126, 127, 132, 133, 134, 135, 148, 149, 150, 151, 156, 157, 158, 159, 164, 165, 166, 167, 180, 181, 182
Offset: 1

Views

Author

Vladimir Shevelev, Jun 15 2009

Keywords

Comments

Or: union of the numbers of the form 4*A079523(n)+k, k=0, 1, 2, or 3.
Locates patterns of the form 1xxx1 or 0xxx0 in the Thue-Morse sequence.

Crossrefs

Programs

  • Mathematica
    tm[0] = 0; tm[n_?EvenQ] := tm[n] = tm[n/2]; tm[n_] := tm[n] = 1 - tm[(n-1)/2]; Reap[For[n = 0, n <= 200, n++, If[tm[n] == tm[n+4], Sow[n]]]][[2, 1]] (* Jean-François Alcover, Oct 24 2013 *)
    SequencePosition[ThueMorse[Range[200]],{x_,,,_,x_}][[All,1]] (* Requires Mathematica version 11 or later *) (* Harvey P. Dale, Apr 16 2017 *)
  • PARI
    is(n)=hammingweight(n)%2==hammingweight(n+4)%2 \\ Charles R Greathouse IV, Aug 20 2013

Extensions

Extended by R. J. Mathar, Aug 28 2009

A161639 Positions n such that A010060(n) = A010060(n+8).

Original entry on oeis.org

8, 9, 10, 11, 12, 13, 14, 15, 40, 41, 42, 43, 44, 45, 46, 47, 56, 57, 58, 59, 60, 61, 62, 63, 72, 73, 74, 75, 76, 77, 78, 79, 104, 105, 106, 107, 108, 109, 110, 111, 136, 137, 138, 139, 140, 141, 142, 143, 168, 169, 170, 171, 172, 173, 174, 175, 184, 185, 186, 187, 188, 189
Offset: 1

Views

Author

Vladimir Shevelev, Jun 15 2009

Keywords

Comments

Locates correlations of the form 1xxxxxxx1 or 0xxxxxxx0 in the Thue-Morse sequence.
Or: union of numbers 8*A079523(n)+k, k=0, 1, 2, 3, 4, 5, 6, or 7.
Generalization: the numbers n such that A010060(n) = A010060(n+2^m) constitute the union of sequences {2^m*A079523(n)+k}, k=0,1,...,2^m-1.

Crossrefs

Programs

  • Mathematica
    tm[0] = 0; tm[n_?EvenQ] := tm[n] = tm[n/2]; tm[n_] := tm[n] = 1 - tm[(n-1)/2]; Reap[For[n = 0, n <= 200, n++, If[tm[n] == tm[n+8], Sow[n]]]][[2, 1]] (* Jean-François Alcover, Oct 24 2013 *)
    SequencePosition[ThueMorse[Range[0,200]],{x_,,,_,,,_,,x}][[All,1]]-1 (* Harvey P. Dale, Jul 23 2021 *)
  • PARI
    is(n)=hammingweight(n)%2==hammingweight(n+8)%2 \\ Charles R Greathouse IV, Aug 20 2013

Extensions

Duplicate of 174 removed by R. J. Mathar, Aug 28 2009

A161641 Positions n such that A010060(n) + A010060(n+4) = 1.

Original entry on oeis.org

0, 1, 2, 3, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 24, 25, 26, 27, 32, 33, 34, 35, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 88, 89, 90, 91, 96, 97, 98, 99, 104, 105, 106, 107, 108
Offset: 1

Views

Author

Vladimir Shevelev, Jun 15 2009

Keywords

Comments

Also union of all numbers of the form A131323(n)-k, k=0, 1, 2, or 3.

Crossrefs

Programs

  • Mathematica
    tm[0] = 0; tm[n_?EvenQ] := tm[n] = tm[n/2]; tm[n_] := tm[n] = 1 - tm[(n - 1)/2]; Reap[For[n = 0, n <= 16000, n++, If[tm[n] + tm[n + 4] == 1, Sow[n]]]][[2, 1]] (* G. C. Greubel, Jan 01 2018 *)
  • PARI
    is(n)=hammingweight(n)%2!=hammingweight(n+4)%2 \\ Charles R Greathouse IV, Aug 20 2013

Formula

Extensions

More terms from R. J. Mathar, Aug 17 2009

A161674 Positions n such that A010060(n) + A010060(n+2) = 1.

Original entry on oeis.org

0, 1, 4, 5, 6, 7, 8, 9, 12, 13, 16, 17, 20, 21, 22, 23, 24, 25, 28, 29, 30, 31, 32, 33, 36, 37, 38, 39, 40, 41, 44, 45, 48, 49, 52, 53, 54, 55, 56, 57, 60, 61, 64, 65, 68, 69, 70, 71, 72, 73, 76, 77, 80, 81, 84, 85, 86, 87, 88, 89, 92, 93, 94, 95, 96, 97, 100, 101, 102, 103, 104
Offset: 1

Views

Author

Vladimir Shevelev, Jun 16 2009

Keywords

Comments

Locates patterns of the form 0x1 or 1x0 in the Thue-Morse sequence.
Complement to A081706. Also: union of sequences {2*A121539(n)+k}, k=0 or 1, generalized in A161673.
Also union of sequences {A079523(n)-k}, k=0 or 1. For a generalization see A161890. - Vladimir Shevelev, Jul 05 2009
The asymptotic density of this sequence is 2/3 (Rowland and Yassawi, 2015; Burns, 2016). - Amiram Eldar, Jan 30 2021

Crossrefs

Programs

Extensions

Extended by R. J. Mathar, Aug 28 2009

A161673 Positions n such that A010060(n) + A010060(n+8) = 1.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 48, 49, 50, 51, 52, 53, 54, 55, 64, 65, 66, 67, 68, 69, 70, 71, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103
Offset: 1

Views

Author

Vladimir Shevelev, Jun 16 2009

Keywords

Comments

Also union of numbers of the form 8*A121539(n)+k, 0<=k<8.
Generalization: the numbers n such that A010060(n)+A010060(n+2^m)=1 constitute the union of sequences {2^m*A121539(n)+k}, k=0,1,...,2^m-1.

Crossrefs

Programs

  • Mathematica
    tm[0] = 0; tm[n_?EvenQ] := tm[n] = tm[n/2]; tm[n_] := tm[n] = 1 - tm[(n - 1)/2]; Reap[For[n = 0, n <= 6000, n++, If[tm[n] + tm[n + 8] == 1, Sow[n]]]][[2, 1]] (* G. C. Greubel, Jan 05 2018 *)
  • PARI
    is(n)=hammingweight(n)%2!=hammingweight(n+8)%2 \\ Charles R Greathouse IV, Aug 20 2013

Formula

Extensions

Edited and extended by R. J. Mathar, Sep 02 2009
Showing 1-10 of 22 results. Next