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.

Previous Showing 11-20 of 22 results. Next

A161817 Positions n such that A010060(n) = A010060(n+5).

Original entry on oeis.org

0, 2, 5, 8, 10, 11, 12, 14, 15, 16, 18, 21, 24, 26, 29, 32, 34, 37, 40, 42, 43, 44, 46, 47, 48, 50, 53, 56, 58, 59, 60, 62, 63, 64, 66, 69, 72, 74, 75, 76, 78, 79, 80, 82, 85, 88, 90, 93, 96, 98, 101, 104, 106, 107, 108, 110, 111, 112, 114, 117, 120, 122, 125, 128, 130, 133, 136, 138, 139, 140, 142, 143, 144
Offset: 1

Views

Author

Vladimir Shevelev, Jun 20 2009

Keywords

Comments

Let A=Axxxxxx be any sequence. Denote by A^* the intersection of A and the union of sequences {4*A(n)+k}, k=-1,0,1,2. Then the present sequence is the union of A079523^* and A121539^*.
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 <= 20000, n++,  If[tm[n] == tm[n + 5], Sow[n]]]][[2, 1]] (* G. C. Greubel, Jan 05 2018 *)
  • PARI
    is(n)=hammingweight(n+5)==Mod(hammingweight(n),2) \\ Charles R Greathouse IV, Mar 26 2013

A161824 Numbers such that A010060(n) = A010060(n+6).

Original entry on oeis.org

0, 1, 2, 3, 6, 7, 8, 9, 12, 13, 16, 17, 18, 19, 22, 23, 24, 25, 26, 27, 30, 31, 32, 33, 34, 35, 38, 39, 40, 41, 44, 45, 48, 49, 50, 51, 54, 55, 56, 57, 60, 61, 64, 65, 66, 67, 70, 71, 72, 73, 76, 77, 80, 81, 82, 83, 86, 87, 88, 89, 90, 91, 94, 95, 96, 97, 98, 99, 102, 103, 104, 105, 108
Offset: 1

Views

Author

Vladimir Shevelev, Jun 20 2009

Keywords

Comments

Let A=Axxxxxx be any sequence from OEIS. Denote by A^* the intersection of the union of sequences {2*A(n)+j}, j=0,1, and the union of sequences {4*A(n)+k}, k=-2,-1,0,1. Then the sequence is the union of (A079523)^* and (A121539)^*.

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 + 6], Sow[n]]]][[2, 1]] (* G. C. Greubel, Jan 05 2018 *)
  • PARI
    is(n)=hammingweight(n)%2==hammingweight(n+6)%2 \\ Charles R Greathouse IV, Aug 20 2013

Extensions

Terms a(40) onwards added by G. C. Greubel, Jan 05 2018
Offset corrected by Mohammed Yaseen, Mar 29 2023

A161890 Numbers such that A010060(n) = A010060(n+9).

Original entry on oeis.org

0, 2, 3, 4, 6, 7, 9, 13, 15, 16, 18, 19, 20, 22, 24, 26, 27, 28, 30, 32, 34, 35, 36, 38, 39, 41, 45, 47, 48, 50, 51, 52, 54, 55, 57, 61, 63, 64, 66, 67, 68, 70, 71, 73, 77, 79, 80, 82, 83, 84, 86, 88, 90, 91, 92, 94, 96, 98, 99, 100, 102, 103, 105, 109, 111, 112, 114, 115, 116, 118, 120
Offset: 0

Views

Author

Vladimir Shevelev, Jun 21 2009

Keywords

Comments

Or union of intersection of A161639 and {A079523(n)-8} and intersection of A161673 and {A121539(n)-8}. In general, for a>=1, consider equations A010060(x+a)+A010060(x)=1, A010060(x+a)=A010060(x). Denote via B_a (C_a) the sequence of nonnegative solutions of the first (second) equation. Then we have recursions: B_(a+1) is the union of transactions 1) C_a and {A121539(n)-a}, 2) B_a and {A079523(n)-a}; C_(a+1) is the union of transactions 1) C_a and {A079523(n)-a}, 2) B_a and {A121539(n)-a}.
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
This conjecture was actually proved in a later version of the Shevelev arxiv article cited below, and it can also easily be proved by the Walnut prover. - Jeffrey Shallit, Oct 12 2022

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 <= 18000, n++, If[tm[n] == tm[n + 9], Sow[n]]]][[2, 1]] (* G. C. Greubel, Jan 05 2018 *)
    SequencePosition[ThueMorse[Range[0,150]],{x_,,,_,,,_,,,x_}][[All,1]]-1 (* Harvey P. Dale, Feb 06 2023 *)
  • PARI
    is(n)=hammingweight(n)%2==hammingweight(n+9)%2 \\ Charles R Greathouse IV, Aug 20 2013

Extensions

Terms a(35) onward added by G. C. Greubel, Jan 05 2018

A225822 Lesser of adjacent odd numbers with different parity of binary weight and both isolated from odd numbers of same parity of binary weight.

Original entry on oeis.org

7, 23, 31, 39, 55, 71, 87, 95, 103, 119, 127, 135, 151, 159, 167, 183, 199, 215, 223, 231, 247, 263, 279, 287, 295, 311, 327, 343, 351, 359, 375, 383, 391, 407, 415, 423, 439, 455, 471, 479, 487, 503, 511, 519, 535, 543, 551, 567, 583, 599, 607, 615, 631
Offset: 1

Views

Author

Brad Clardy, Jul 30 2013

Keywords

Comments

Write the sequence of odious odd numbers above the sequence of evil odd numbers connecting all that are 2 apart:
1 7 11-13 19-21 25 31 35-37 41 47-49 55 59-61 67-69 73 79-81 87 91-93 97
3-5 9 15-17 23 27-29 33 39 43-45 51-53 57 63-65 71 75-77 83-85 89 95 99-
Remove the connected numbers:
1 7 25 31 41 55 73 87 97
9 23 33 39 57 71 89 95
Define these as "isolated".
The sequence is the smaller of the remaining pairs that are 2 apart.
The 1 is not a member since there is no change in parity between 1 and 7.
All of the differences between adjacent numbers in both the evil and odious sequences are either 2, 4 or 6, with 4 being the indicator that a transition in parity occurs. The program provided utilizes that fact to produce the sequence.
The sequence that includes all numbers along this path is A047522 (numbers congruent to {1,7} mod 8). This is also the same as the odd terms of A199398 (XOR of the first n odd numbers).
This sequence is similar to A044449 (numbers n such that string 1,3 occurs in the base 4 representation of n but not of n+1), but it contains additional terms. An example is 119. Its base 4 representation is 1313 while the base 4 representation of 120 is 1320. It may be that another workable definition of the sequence is -- numbers n in base 4 representation such that string 1,3 occurs one less time in n+1 than n, but I have not been able to check this.
The difference between the numbers in the sequence is always either 8 or 16, however there appears to be no recurring repetitions in it. Writing the 8 as a 0 and the 16 as a 1 (or dividing the difference pattern by 2 and subtracting a 1) produces a difference pattern of: 1, 0, 0, 1, 1, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 1... which is an infinite word.
A similar process writing Even Odious over Even Evils produces 6, 22, 30, 38, 54, 70... which is twice A131323 (Odd numbers n such that the binary expansion ends in an even number of 1's), with all numbers along the path given by A047451 (numbers congruent to {0,6} mod 8) and yields the same difference pattern which produces the same infinite word.

Crossrefs

Cf. A001969 (evil numbers), A129771 (odd evil numbers).
Cf. A000069 (odious numbers), A092246 (odd odious numbers).
Cf. A047522 (numbers congruent to {1,7} mod 8).
Cf. A199398 (XOR of first n odd numbers).
Cf. A044449 (a subset of this sequence).
Cf. A131323 (odd numbers n such that the binary expansion ends in an even number of 1's).
Cf. A047451 (numbers congruent to {0,6} mod 8).
Cf. A000120 (binary weight of n).
Cf. A079523.

Programs

  • Magma
    //Function Bweight calculates the binary weight of an integer
    Bweight := function(m)
    Bweight:=0;
    adigs := Intseq(m,2);
    for n:= 1 to Ilog2(m)+1 do
      Bweight:=Bweight+adigs[n];
    end for;
    return Bweight;
    end function;
    prevodi:=0;
    currodi:=0;
    m:=0;
    count:=0;
    for n:= 1 to 20000 by 2 do
        m:=m+1;
        if (Bweight(n) mod 2 eq 1) then odious:=true; else odious:=false; end if;
        if (odious) then currodi:=n; end if;
           if (currodi - prevodi eq 4) then
              if (m mod 2 eq 1) then count:=count+1; count,n-2;
                 else count:=count+1;count,n-4;
           end if;
        end if;
        if(odious) then prevodi:=currodi; end if;
    end for;
    
  • Mathematica
    2*Select[Range[1, 320, 2], EvenQ[IntegerExponent[# + 1, 2]] &] + 1 (* Amiram Eldar, Jul 24 2023 *)
  • PARI
    is(n)=n%4==3 && valuation(n\4+1, 2)%2 \\ Charles R Greathouse IV, Aug 20 2013
    
  • Python
    from itertools import count, islice
    def A225822_gen(startvalue=1): # generator of terms >= startvalue
        return map(lambda m:(m<<1)+1,filter(lambda n:n&1 and not (~(n+1)&n).bit_length()&1,count(max(startvalue,1))))
    A225822__list = list(islice(A225822_gen(),30)) # Chai Wah Wu, Jul 09 2022

Formula

a(n) = 2*A131323(n) + 1.
a(n) = 4*A079523(n) + 3. - Charles R Greathouse IV, Aug 20 2013
a(n) ~ 12n. (In particular, a(n) = 12n + O(log n).) - Charles R Greathouse IV, Aug 20 2013

A233388 Odious numbers that are the sum of 2 consecutive odious numbers.

Original entry on oeis.org

11, 19, 35, 47, 59, 67, 79, 91, 107, 115, 131, 143, 155, 171, 179, 191, 203, 211, 227, 239, 251, 259, 271, 283, 299, 307, 319, 331, 339, 355, 367, 379, 395, 403, 419, 431, 443, 451, 463, 475, 491, 499, 515, 527, 539, 555, 563, 575, 587, 595
Offset: 1

Views

Author

Gerasimov Sergey, Dec 08 2013

Keywords

Comments

Composites in this sequence: 35, 91, 115, 143, 155, 171, 203, 259, 299, 319, 229, 366, 395, 403, 451, 475, 515, 527, 539, 555, 575, 595,...
(a(n + 1) - a(n))/4 are 2, 4, 3, 3, 2, 3, 3, 4, 2, 4, 3, 3, 4, 2, 3, 3, 2, 4, 3, 3, 2, 3, 3, 4, 2, 3, 3, 2, 4, 3, 3, 4, 2, 4, 3, 3, 2, 3,...

Examples

			11 is in this sequence because 11 = A000069(6) and 11 = 4 + 7 where 4 = A000069(3) and 7 = A000069(4).
19 is in this sequence because 19 = A000069(10) and 19 = 8 + 11 where 8 = A000069(5) and 11 = A000069(6).
		

Crossrefs

Programs

  • Mathematica
    odQ[n_] := OddQ @ DigitCount[n, 2, 1]; Select[Plus @@@ Partition[Select[Range[300] , odQ], 2, 1], odQ] (* Amiram Eldar, Aug 29 2020 *)

A234431 Numbers that are the sum of 2 successive evil numbers (A001969).

Original entry on oeis.org

3, 8, 11, 15, 19, 22, 27, 32, 35, 38, 43, 47, 51, 56, 59, 63, 67, 70, 75, 79, 83, 88, 91, 94, 99, 104, 107, 111, 115, 118, 123, 128, 131, 134, 139, 143, 147, 152, 155, 158, 163, 168, 171, 175, 179, 182, 187, 191, 195, 200, 203, 207, 211, 214, 219, 224, 227, 230, 235, 239, 243, 248, 251
Offset: 1

Views

Author

Irina Gerasimova, Dec 26 2013

Keywords

Comments

First differences are in {3, 4, 5}; 4*n - 2 <= a(n) <= 4*n. - Charles R Greathouse IV, Dec 26 2013

Crossrefs

Cf. A001969, A003159 (indices of odd numbers in A234431), A131323 (odd numbers in A234431).

Programs

  • Mathematica
    Total/@Partition[Select[Range[0,200],EvenQ[DigitCount[#,2,1]]&],2,1] (* Harvey P. Dale, Nov 02 2015 *)
  • PARI
    a(n)=4*n+hammingweight(n-1)%2+hammingweight(n)%2-2 \\ Charles R Greathouse IV, Dec 26 2013

Formula

a(n) = A001969(n) + A001969(n + 1).

A234011 The sums of 2 consecutive odious numbers (A000069).

Original entry on oeis.org

3, 6, 11, 15, 19, 24, 27, 30, 35, 40, 43, 47, 51, 54, 59, 63, 67, 72, 75, 79, 83, 86, 91, 96, 99, 102, 107, 111, 115, 120, 123, 126, 131, 136, 139, 143, 147, 150, 155, 160, 163, 166, 171, 175, 179, 184, 187, 191, 195, 198, 203, 207, 211, 216, 219, 222, 227, 232, 235, 239, 243, 246
Offset: 1

Views

Author

Gerasimov Sergey, Dec 27 2013

Keywords

Comments

The union of A131323(k) and (A225822(m)+(-1)^m).
All even numbers in this sequence are evil numbers (A001969).
It seems that A233388(n) = a(A091785(n)).

Crossrefs

Cf. A000069, A003159 (indices of odd numbers in A234011), A036554 (indices of even numbers in A234011), A131323 (odd sums of 2 successive odious or 2 successive evil numbers), A233388 (odious numbers in A234011), A234431 (sums of 2 consecutive evil numbers), A017101, A091785, A225822, A227930, A233388.

Programs

Formula

a(n) = A000069(n) + A000069(n + 1).
4n - 2 <= a(n) <= 4n. - Charles R Greathouse IV, Dec 29 2013
a(2n+1) = 8n + 3 = A017101(n). - Ralf Stephan, Dec 31 2013

Extensions

Terms recomputed and checked by Antti Karttunen, Dec 29 2013

A161974 a(n) = number of equalities of the form A010060(n+k) = A010060(n), k=1,2,3.

Original entry on oeis.org

1, 2, 1, 2, 1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, 1, 1, 2, 1, 2, 1
Offset: 0

Views

Author

Vladimir Shevelev, Jun 23 2009

Keywords

Comments

See comment to A161916. 3-a(n) is the number of equalities of kind A010060(n+k) = 1-A010060(n), k=1,2,3.

Crossrefs

Programs

Extensions

Missing a(24)=1 inserted by Georg Fischer, Jun 21 2024

A162311 Numbers such that A010060(n) = A010060(n+7).

Original entry on oeis.org

1, 3, 4, 5, 7, 10, 14, 17, 19, 20, 21, 23, 25, 27, 28, 29, 31, 33, 35, 36, 37, 39, 42, 46, 49, 51, 52, 53, 55, 58, 62
Offset: 1

Views

Author

Vladimir Shevelev, Jul 01 2009

Keywords

Comments

Or union of intersection of A161673 and {A121539(n)-7} and intersection of A161639 and {A079523(n)-7}.
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 <= 20000, n++, If[tm[n] == tm[n + 7], Sow[n]]]][[2, 1]] (* G. C. Greubel, Jan 05 2018 *)
  • PARI
    is(n)=hammingweight(n)%2==hammingweight(n+7)%2 \\ Charles R Greathouse IV, Aug 20 2013

A162648 Locations of patterns 1001 or 0110 in the Thue-Morse sequence A010060.

Original entry on oeis.org

0, 4, 6, 8, 12, 16, 20, 22, 24, 28, 30, 32, 36, 38, 40, 44, 48, 52, 54, 56, 60, 64, 68, 70, 72, 76, 80, 84, 86, 88, 92, 94, 96, 100, 102, 104, 108, 112, 116, 118, 120, 124, 126, 128, 132, 134, 136, 140, 144, 148, 150, 152, 156, 158, 160, 164, 166, 168, 172, 176, 180
Offset: 1

Views

Author

Vladimir Shevelev, Jul 08 2009

Keywords

Comments

Numbers n for which A010060(n+1) = A010060(n+2) = 1-A010060(n) and A010060(n+3) = A010060(n).
Or intersection of A121539, A161674, and A161579.

Crossrefs

Programs

  • Mathematica
    Select[Range[3500], MatchQ[IntegerDigits[#, 2], {b : (1) ..} | {_, 0, b : (1) ..} /; OddQ[Length[{b}]]] &] - 1 (* G. C. Greubel, Jan 05 2018 *)
    With[{nn=200},Sort[Join[SequencePosition[ThueMorse[Range[0,nn]],{1,0,0,1}],SequencePosition[ ThueMorse[Range[0,nn]],{0,1,1,0}]]][[;;,1]]]-1 (* Harvey P. Dale, Aug 20 2024 *)
  • PARI
    is(n)=my(v=vector(4,i,hammingweight(n+i-1))); v[1]==v[4] && v[1]!=v[2] && v[1]!=v[3] \\ Charles R Greathouse IV, Aug 20 2013

Formula

a(n) = A079523(n) - 1.

Extensions

More readable definition from R. J. Mathar, Sep 16 2009
Previous Showing 11-20 of 22 results. Next