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

A048715 Binary expansion matches (100(0)*)*(0|1|10)?; or, Zeckendorf-like expansion of n using recurrence f(n) = f(n-1) + f(n-3).

Original entry on oeis.org

0, 1, 2, 4, 8, 9, 16, 17, 18, 32, 33, 34, 36, 64, 65, 66, 68, 72, 73, 128, 129, 130, 132, 136, 137, 144, 145, 146, 256, 257, 258, 260, 264, 265, 272, 273, 274, 288, 289, 290, 292, 512, 513, 514, 516, 520, 521, 528, 529, 530, 544, 545, 546, 548, 576, 577, 578, 580
Offset: 0

Views

Author

Antti Karttunen, Mar 30 1999

Keywords

Comments

No more than one 1-bit in each bit triple.
All terms satisfy A048727(n) = 7*n.
Constructed from A000930 in the same way as A003714 is constructed from A000045.
It appears that n is in the sequence if and only if C(7n,n) is odd (cf. A003714). - Benoit Cloitre, Mar 09 2003
The conjecture by Benoit is correct. This is easily proved using the well-known result that the multiplicity with which a prime p divides C(n+m,n) is the number of carries when adding n+m in base p. - Franklin T. Adams-Watters, Oct 06 2009
Appears to be the set of numbers x such that (x AND 5*x) = x and (x OR 3*x)/x = 3. - Gary Detlefs, Jun 08 2024

Crossrefs

Programs

  • Mathematica
    Reap[Do[If[OddQ[Binomial[7n, n]], Sow[n]], {n, 0, 400}]][[2, 1]]
    (* Second program: *)
    filterQ[n_] := With[{bb = IntegerDigits[n, 2]}, !MatchQ[bb, {_, 1, 0, 1, _}|{_, 1, 1, _}]];
    Select[Range[0, 580], filterQ] (* Jean-François Alcover, Dec 31 2020 *)
  • PARI
    is(n)=!bitand(n, 6*n) \\ Charles R Greathouse IV, Oct 03 2016
    
  • Perl
    for my $k (0..580) { print "$k, " if sprintf("%b", $k) =~ m{^(100(0)*)*(0|1|10)?$}; } # Georg Fischer, Jun 26 2021
    
  • Python
    import re
    def ok(n): return re.fullmatch('(100(0)*)*(0|1|10)?', bin(n)[2:]) != None
    print(list(filter(ok, range(581)))) # Michael S. Branicky, Jun 26 2021

Formula

a(0) = 0, a(n) = (2^(invfoo(n)-1))+a(n-foo(invfoo(n))), where foo(n) is foo(n-1) + foo(n-3) (A000930) and invfoo is its "integral" (floored down) inverse.
a(n) XOR 6*a(n) = 7*a(n); 3*a(n) XOR 4*a(n) = 7*a(n); 3*a(n) XOR 5*a(n) = 6*a(n); (conjectures). - Paul D. Hanna, Jan 22 2006
The conjectures can be verified using the Walnut theorem-prover (see links). - Sebastian Karlsson, Dec 31 2022

Extensions

Definition corrected by Georg Fischer, Jun 26 2021

A048716 Numbers n such that binary expansion matches ((0)*00(1?)1)*(0*).

Original entry on oeis.org

0, 1, 2, 3, 4, 6, 8, 9, 12, 16, 17, 18, 19, 24, 25, 32, 33, 34, 35, 36, 38, 48, 49, 50, 51, 64, 65, 66, 67, 68, 70, 72, 73, 76, 96, 97, 98, 99, 100, 102, 128, 129, 130, 131, 132, 134, 136, 137, 140, 144, 145, 146, 147, 152, 153, 192, 193, 194, 195, 196, 198, 200, 201
Offset: 1

Views

Author

Antti Karttunen, Mar 30 1999

Keywords

Comments

If bit i is 1, then bits i+-2 must be 0. All terms satisfy A048725(n) = 5*n.
It appears that n is in the sequence if and only if C(5n,n) is odd (cf. A003714). - Benoit Cloitre, Mar 09 2003
Yes, as remarked in A048715, "This is easily proved using the well-known result that the multiplicity with which a prime p divides C(n+m,n) is the number of carries when adding n+m in base p." - Jason Kimberley, Dec 21 2011
A116361(a(n)) <= 2. - Reinhard Zumkeller, Feb 04 2006

Crossrefs

Superset of A048715 and A048719. Union of A004742 and A003726.

Programs

  • Mathematica
    Reap[Do[If[OddQ[Binomial[5n, n]], Sow[n]], {n, 0, 400}]][[2, 1]]
    (* Second program: *)
    filterQ[n_] := With[{bb = IntegerDigits[n, 2]}, MatchQ[bb, {0}|{1}|{1, 1}|{_, 0, , 1, __}|{_ 1, , 0, __}] && !MatchQ[bb, {_, 1, , 1, __}]];
    Select[Range[0, 201], filterQ] (* Jean-François Alcover, Dec 31 2020 *)
  • PARI
    is(n)=!bitand(n,n>>2) \\ Charles R Greathouse IV, Oct 03 2016
    
  • PARI
    list(lim)=my(v=List(),n,t); while(n<=lim, t=bitand(n,n>>2); if(t, n+=1<Charles R Greathouse IV, Oct 22 2021

A048717 Binary expansion matches ((0)*00(1*)11)*(0*).

Original entry on oeis.org

0, 3, 6, 7, 12, 14, 15, 24, 28, 30, 31, 48, 51, 56, 60, 62, 63, 96, 99, 102, 103, 112, 115, 120, 124, 126, 127, 192, 195, 198, 199, 204, 206, 207, 224, 227, 230, 231, 240, 243, 248, 252, 254, 255, 384, 387, 390, 391
Offset: 0

Views

Author

Antti Karttunen, Mar 30 1999

Keywords

Comments

In binary expansion, 1-bits occur only in groups of two or more, separated from other such groups by at least two 0-bits.
Integers that satisfy A048727(n) = 3*n.

Crossrefs

Row 3 of A115872. Superset of A048719. Cf. A048733.

Programs

  • Mathematica
    filterQ[n_] := !MatchQ[IntegerDigits[n, 2], {1}|{1, 0, _}|{_, 0, 1}|{_, 1, 0, 1, _}|{_, 0, 1, 0, _}];
    Select[Range[0, 400], filterQ] (* Jean-François Alcover, Dec 31 2020 *)

A048718 Binary expansion matches ((0)*0001)*(0*); or, Zeckendorf-like expansion of n using recurrence f(n) = f(n-1) + f(n-4).

Original entry on oeis.org

0, 1, 2, 4, 8, 16, 17, 32, 33, 34, 64, 65, 66, 68, 128, 129, 130, 132, 136, 256, 257, 258, 260, 264, 272, 273, 512, 513, 514, 516, 520, 528, 529, 544, 545, 546, 1024, 1025, 1026, 1028, 1032, 1040, 1041, 1056, 1057
Offset: 0

Views

Author

Antti Karttunen, Mar 30 1999

Keywords

Comments

Max. 1 one-bit occur in each range of four bits.
Constructed from A003269 in the same way as A003714 is constructed from A000045.

Crossrefs

Programs

  • Mathematica
    filterQ[n_] := With[{bb = IntegerDigits[n, 2]}, !MemberQ[{{1, 1}, {1, 0, 1}, {1, 1, 0}, {1, 1, 1}}, bb] && SequencePosition[bb, {a_, b_, c_, d_} /; Count[{a, b, c, d}, 1] > 1] == {}];
    Select[Range[0, 1057], filterQ] (* Jean-François Alcover, Dec 31 2020 *)
  • PARI
    is(n)=!bitand(n, 14*n) \\ Charles R Greathouse IV, Oct 03 2016

Formula

a(0) = 0, a(n) = (2^(invfyy(n)-1))+a(n-fyy(invfyy(n))) where fyy(n) is fyy(n-1) + fyy(n-4) (A003269) and invfyy is its "integral" (floored down) inverse.
a(n) XOR 14*a(n) = 15*a(n); 3*a(n) XOR 9*a(n) = 10*a(n); 3*a(n) XOR 13*a(n) = 14*a(n); 5*a(n) XOR 9*a(n) = 12*a(n); 5*a(n) XOR 11*a(n) = 14*a(n); 6*a(n) XOR 11*a(n) = 13*a(n); 7*a(n) XOR 9*a(n) = 14*a(n); 7*a(n) XOR 10*a(n) = 13*a(n); 7*a(n) XOR 11*a(n) = 12*a(n); 12*a(n) XOR 21*a(n) = 25*a(n); 12*a(n) XOR 37*a(n) = 41*a(n); etc. (conjectures). - Paul D. Hanna, Jan 22 2006
The conjectures can be verified using the Walnut theorem-prover (see links). - Sebastian Karlsson, Dec 31 2022

A115767 Integers i such that 2*i XOR 5*i = 3*i.

Original entry on oeis.org

0, 3, 6, 11, 12, 22, 24, 43, 44, 48, 51, 86, 88, 96, 99, 102, 171, 172, 176, 179, 192, 195, 198, 203, 204, 342, 344, 352, 355, 358, 384, 387, 390, 395, 396, 406, 408, 683, 684, 688, 691, 704, 707, 710, 715, 716, 768, 771, 774, 779, 780, 790, 792, 811, 812
Offset: 0

Views

Author

Antti Karttunen, Jan 30 2006

Keywords

Comments

XOR is A003987.

Crossrefs

Superset of A048719. A115768 gives the (?) terms which do not occur in A048719. Cf. A115424.

Programs

A115768 Integers i such that 2*i XOR 5*i = 3*i, but 4*i XOR i is not 5*i.

Original entry on oeis.org

11, 22, 43, 44, 86, 88, 171, 172, 176, 179, 203, 342, 344, 352, 355, 358, 395, 406, 683, 684, 688, 691, 704, 707, 710, 715, 716, 779, 790, 811, 812, 1366, 1368, 1376, 1379, 1382, 1408, 1411, 1414, 1419, 1420, 1430, 1432, 1547, 1558, 1579, 1580
Offset: 1

Views

Author

Antti Karttunen, Jan 30 2006

Keywords

Comments

XOR is A003987.

Crossrefs

Cf. Setwise difference of A115767 and A048719 ? A115769 shows this sequence in binary.

A115807 Integers i such that 15*i = 27 X i.

Original entry on oeis.org

0, 3, 6, 12, 24, 48, 51, 96, 102, 192, 195, 204, 384, 387, 390, 408, 768, 771, 774, 780, 816, 819, 1536, 1539, 1542, 1548, 1560, 1632, 1638, 3072, 3075, 3078, 3084, 3096, 3120, 3123, 3264, 3267, 3276, 6144, 6147, 6150, 6156, 6168, 6192, 6195, 6240
Offset: 0

Views

Author

Antti Karttunen, Feb 01 2006

Keywords

Comments

Here * stands for ordinary multiplication and X means carryless (GF(2)[X]) multiplication (A048720).

Crossrefs

Cf. Subset of A048719 ? Differs from A048719 for the first time at n=8, where A048719(8)=99, while a(8)=102. (Note: 99 = 1100011 in binary). A115808 shows this sequence in binary.
Showing 1-7 of 7 results.