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 31-36 of 36 results.

A231271 Numbers k such that k and k+d are both odious (A000069) or both evil (A001969) for every divisor d of k.

Original entry on oeis.org

1, 5, 7, 9, 13, 17, 23, 29, 31, 37, 41, 49, 53, 61, 71, 73, 85, 89, 97, 101, 103, 109, 113, 119, 125, 127, 129, 133, 137, 149, 151, 157, 167, 173, 181, 193, 197, 199, 217, 223, 229, 233, 241, 249, 257, 263, 269, 277, 281, 293, 311, 313, 317, 321, 325, 337, 341
Offset: 1

Views

Author

Vladimir Shevelev, Nov 06 2013

Keywords

Comments

A prime p is a term iff its binary expansion ends in odd number of 1's (A095283). All terms are in A079523.

Examples

			The odious number k = 341 has divisors {1, 11, 31, 341}. Since the numbers 341 + 1 = 342, 341 + 11 = 352, 341 + 31 = 372, 341 + 341 = 682 are all odious, then 341 is a term.
		

Crossrefs

Programs

  • Mathematica
    odiousQ[n_] := OddQ[DigitCount[n, 2][[1]]];selQ[n_] := Length[Union[Map[odiousQ, Flatten[{n, Map[n+#&, Divisors[n]]}]]]] == 1; Select[Range[200], selQ] (* Peter J. C. Moses, Nov 08 2013 *)
  • PARI
    is(k) = {my(hw = hammingweight(k) % 2); fordiv(k, d, if(hammingweight(k+d) % 2 != hw, return(0))); 1;} \\ Amiram Eldar, Aug 12 2024

Extensions

More terms from Peter J. C. Moses, Nov 08 2013

A231558 Odd composite numbers n, such that n, n+d, n*d and n/d are all odious (A000069) for every divisor d of n.

Original entry on oeis.org

217, 511, 889, 949, 1957, 2041, 2263, 2413, 2869, 3113, 3133, 3481, 3991, 5201, 5761, 7813, 7903, 8071, 8137, 8773, 10519, 10609, 11377, 11879, 12191, 12313, 12871, 15127, 15223, 16177, 19561, 19733, 19879, 21151, 23077, 23233, 23449, 23573, 26221, 27469
Offset: 1

Views

Author

Keywords

Comments

All terms are in A079523.

Examples

			Let n=217. Its divisors are {1,7,31,217}. We see that all numbers 217+1=218, 217+7=224, 217+31=248, 217+217=434, 217/1=217, 217/7=31, 217/31=7, 217/217=1, 217*1=217, 217*7=1519, 217*31=6727, 217*217=47089 are odious. Thus 217 is in the sequence.
		

Crossrefs

A332447 a(n) = A007814(A087808(n)).

Original entry on oeis.org

0, 1, 1, 2, 0, 2, 0, 3, 0, 1, 2, 3, 0, 1, 2, 4, 0, 1, 1, 2, 0, 3, 0, 4, 0, 1, 1, 2, 0, 3, 0, 5, 0, 1, 1, 2, 0, 2, 0, 3, 0, 1, 3, 4, 0, 1, 1, 5, 0, 1, 1, 2, 0, 2, 0, 3, 0, 1, 3, 4, 0, 1, 1, 6, 0, 1, 1, 2, 0, 2, 0, 3, 0, 1, 2, 3, 0, 1, 3, 4, 0, 1, 1, 2, 0, 4, 0, 5, 0, 1, 1, 2, 0, 2, 0, 6, 0, 1, 1, 2, 0, 2, 0, 3, 0
Offset: 1

Views

Author

Antti Karttunen, Feb 14 2020

Keywords

Crossrefs

Cf. A000079 (positions of records), A079523 (of zeros).

Programs

Formula

a(n) = A007814(A087808(n)).
For n >= 0, a(2^n) = n. [These are the first occurrences of each n]

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

A386987 For n >= 2, a(n) is the least r >= 1 such that T(n - r) + ... + T(n - 1) = T(n + 1) + ... + T(n + r) where T(i) is A010060(i).

Original entry on oeis.org

2, 1, 1, 2, 4, 3, 3, 4, 2, 1, 1, 2, 2, 1, 1, 2, 2, 1, 1, 2, 4, 3, 3, 4, 2, 1, 1, 2, 4, 3, 3, 4, 2, 1, 1, 2, 4, 3, 3, 4, 2, 1, 1, 2, 2, 1, 1, 2, 2, 1, 1, 2, 4, 3, 3, 4, 2, 1, 1, 2, 2, 1, 1, 2, 2, 1, 1, 2, 4, 3, 3, 4, 2, 1, 1, 2, 2, 1, 1, 2, 2, 1, 1, 2, 4, 3, 3
Offset: 2

Views

Author

Ctibor O. Zizka, Aug 12 2025

Keywords

Comments

a(n) is from {1, 2, 3, 4}.

Examples

			For n = 6: T(6 - r) + ... + T(5) = T(7) + ... + T(6 + r) is true for the least r = 4  because A010060(2) + A010060(3) + A010060(4) + A010060(5) = A010060(7) + A010060(8) + A010060(9) + A010060(10), thus a(6) = 4.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := Module[{s = 0, r = 1}, While[r <= n && (r == 1 || s != 0), s += (ThueMorse[n - r] - ThueMorse[n + r]); r++]; r-1]; Array[a, 100, 2] (* Amiram Eldar, Aug 12 2025 *)

Formula

a(A081706(n) + 1) = 1.
a(2*A079523(n)) = 2.
a(A249034(n))= 2.
a(A225822(n)) = 3.
a(A056196(n)) = 3.
a(2*A131323(n)) = 4.
a(2*A249034(n) - 1) = 4.
Previous Showing 31-36 of 36 results.