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 23 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

A091297 A fixed point of the morphism 0 -> 02, 1 -> 02, 2 -> 11, starting from 0.

Original entry on oeis.org

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

Views

Author

Philippe Deléham, Feb 24 2004

Keywords

Comments

To construct the sequence: start from the Feigenbaum sequence A035263 = 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, ..., then change 1 -> 0, 2 and 0 -> 1, 1. - Philippe Deléham, Apr 18 2004
This Feigenbaum interpretation is equivalent to writing n+1 = binary "...1 00..00 x" where x is the least significant bit and zero or more 0's. If an odd number of 0's then a(n) = 1, otherwise a(n) = 2*x. In a similar way, if n-1 = binary "...0 11..11 x" with an odd number of 1's then a(n)=1 and otherwise a(n) = 2*x. - Kevin Ryde, Oct 17 2020
From Mikhail Kurkov, Mar 25 2021: (Start)
This sequence can be represented as a binary tree. Each child to the right is obtained by applying mex to the parent, and each child to the left is obtained by applying mex to the set formed by the parent and its second child:
( )
|
...................0...................
2 1
1......../ \........0 2......../ \........0
/ \ / \ / \ / \
/ \ / \ / \ / \
/ \ / \ / \ / \
2 0 2 1 1 0 2 1
1 0 2 1 1 0 2 0 2 0 2 1 1 0 2 0
etc.
Here mex means smallest nonnegative missing number.
Each parent and its two children form a set {0,1,2}. (End)

Crossrefs

Programs

  • Mathematica
    Nest[ Function[ l, {Flatten[(l /. {0 -> {0, 2}, 1 -> {0, 2}, 2 -> {1, 1}}) ]}], {0}, 7] (* Robert G. Wilson v, Mar 03 2005 *)
  • PARI
    a(n)={while(1, my(m=logint(n,2)); if(n==2*2^m-1, return(m%2)); if(n==2^m, return(1 + m%2)); n-=2^m)} \\ Andrew Howroyd, Oct 17 2020
    
  • PARI
    a(n) = n++; my(k=valuation(n>>1,2)); if(k%2==1, 1, 2*(n%2)); \\ Kevin Ryde, Oct 17 2020

Formula

a(n) = 0 iff n = A079523(k), a(n) = 1 iff n = A081706(2*k) or n = 1 + A081706(2*k), a(n) = 2 iff n = A036554(k).
a(2*n-1) + a(2*n) = 2.
a(2*n-1) = (A065037(2*n+1) - A065037(2*n-1) - 2)/2.
From Mikhail Kurkov, Oct 10 2020: (Start)
a(2^m-1) = 1 - m mod 2, m > 0,
a(2^m) = 1 + m mod 2, m > 0,
a(2^m+k) = a(k) for 0 < k < 2^m-1, m > 1.
a(2^m-k) = 2 - a(k-1) for 1 < k <= 2^(m-1), m > 1. (End)
a(2n+1) = mex{a(n)}, a(2n) = mex{a(n),a(2n+1)} or a(2n+1) = [a(n)=0], a(2n) = 2 - [a(n)=2] for n > 0 with a(1) = 0. - Mikhail Kurkov, Mar 25 2021

Extensions

More terms from Robert G. Wilson v, Mar 03 2005

A161916 The smallest k such that A010060(n+k)=A010060(n).

Original entry on oeis.org

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

Views

Author

Vladimir Shevelev, Jun 22 2009

Keywords

Comments

Each entry is 1, 2 or 3, associated with positions registered in A079523, A081706, and A161579, respectively.

Crossrefs

Extensions

Definition shortened, sequence extended by R. J. Mathar, Nov 02 2010

A134718 Even Motzkin numbers.

Original entry on oeis.org

2, 4, 2188, 5798, 113634, 310572, 6536382, 18199284, 25669818476, 73007772802, 114988706524270, 330931069469828, 556704809728838604, 1614282136160911722, 39532221379621112004, 114956499435014161638, 2837208756709314025578, 8270140811590103129028, 14996791899280244858336604
Offset: 1

Views

Author

Omar E. Pol, Nov 11 2007

Keywords

Comments

The values of n such that the Motzkin number M(n) (=A001006(n)) is even are given in A081706. - Emeric Deutsch, Dec 07 2007
A001006 except A134717. - Vladimir Reshetnikov, Nov 02 2015
The asymptotic density of this sequence within the Motzkin numbers is 1/3. - Amiram Eldar, Aug 26 2024

Crossrefs

Programs

  • Maple
    M := n -> add(binomial(n, 2*k)*binomial(2*k,k)/(k+1), k=0..n):
    a := n -> `if`(`mod`(M(n),2)=0, M(n), NULL);
    seq(a(n), n=0..50); # Emeric Deutsch, Dec 07 2007
  • Mathematica
    Select[Table[(-1)^n Hypergeometric2F1[3/2, -n, 3, 4], {n, 0, 60}], EvenQ] (* Vladimir Reshetnikov, Nov 02 2015 *)
  • PARI
    a001006(n) = polcoeff((1-x-sqrt((1-x)^2-4*x^2+x^3*O(x^n)))/ (2*x^2), n); for(n=0, 100, if((m=a001006(n))%2==0, print1(m", "))) \\ Altug Alkan, Nov 03 2015

Formula

a(n) = A001006(A081706(n)). - Amiram Eldar, Aug 26 2024

Extensions

More terms from Emeric Deutsch, Dec 07 2007
a(91) in b-file corrected by Andrew Howroyd, Feb 23 2018

A162634 Numerators of fractions with denominators A000215(n) approximating the Thue-Morse constant.

Original entry on oeis.org

1, 2, 7, 106, 27031, 1771476586, 7608434000728254871, 140350834813144189858090274002849666666, 47758914269546354982683078068829456704164423862093743397580034411621752859031
Offset: 0

Views

Author

Vladimir Shevelev, Jul 08 2009, Jul 14 2009

Keywords

Comments

One can prove that if in the sequence of numbers N for which A010060(N+2^n)= A010060(N) you replace the odious (evil) terms by 1's (0's), then we obtain 2^(n+1)-periodic (0,1)-sequence; if you write it in the form .xx...,i.e., as a binary infinite fraction, then the corresponding fraction has the form a(n)/A000215(n). These fractions very fast converge to the Thue-Morse constant .4124540336401...; e.g a(5)/(2^32+1) approximates this constant up to 10^(-9). These approximations differ from A074072-A074073. Conjecture. For n>=1, the fraction a(n)/A000215(n) is a convergent corresponding to the continued fraction for the Thue-Morse constant.

Crossrefs

Programs

  • PARI
    a(n)=if(n<=1, [1,2][n+1], 1+(2^(2^(n-1))-1)*a(n-1)); /* Joerg Arndt, Mar 11 2013 */

Formula

a(1)=2, and, for n>=2, a(n) = 1 + (2^(2^(n-1))-1) * a(n-1).

Extensions

Added more terms, Joerg Arndt, Mar 11 2013

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

A338220 Numbers k such that the Motzkin number A001006(k) is divisible by 5.

Original entry on oeis.org

9, 13, 23, 34, 38, 59, 63, 84, 88, 99, 109, 113, 134, 138, 148, 159, 163, 184, 188, 209, 213, 224, 234, 238, 249, 259, 263, 273, 284, 288, 309, 313, 334, 338, 349, 359, 363, 373, 384, 388, 398, 409, 413, 434, 438, 459, 463, 474, 484, 488, 509, 513, 523, 534, 538
Offset: 1

Views

Author

Amiram Eldar, Jan 30 2021

Keywords

Comments

The asymptotic density of this sequence is 1/10. It is a disjoint union of 4 sequences: numbers of the form (5*i + 1)*5^(2*j) - 2, (5*i + 2)*5^(2*j-1) - 1, (5*i + 3)*5^(2*j-1) - 2, and (5*i + 4)*5^(2*j) - 1, with i>=0 and j>=1, whose asymptotic densities are 1/120, 1/24, 1/24, and 1/120, respectively (Burns, 2016).

Examples

			9 is a term since A001006(9) = 835 = 5 * 167 is divisible by 5.
		

Crossrefs

Cf. A001006.
Similar sequences, indices of Motzkin numbers divisible by m: A081706 (m = 2), A089119 (m = 3).

Programs

  • Mathematica
    motz[0] = motz[1] = 1; motz[n_] := motz[n] = ((2*n + 1)*motz[n - 1] + 3*(n - 1)*motz[n - 2])/(n + 2);  Select[Range[0, 500], Divisible[motz[#], 5] &]
Previous Showing 11-20 of 23 results. Next