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-4 of 4 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

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 *)

A048730 Differences between A008589 (multiples of 7) and A048727, a(n) = ((n*7)-Xmult(n,7)).

Original entry on oeis.org

0, 0, 0, 12, 0, 8, 24, 28, 0, 0, 16, 28, 48, 56, 56, 60, 0, 0, 0, 12, 32, 40, 56, 60, 96, 96, 112, 124, 112, 120, 120, 124, 0, 0, 0, 12, 0, 8, 24, 28, 64, 64, 80, 92, 112, 120, 120, 124, 192, 192, 192, 204, 224, 232, 248
Offset: 0

Views

Author

Antti Karttunen, Apr 26 1999

Keywords

Comments

For n = binary n[k],n[k-1],...,n[0], bits a(n) = binary b[k+1],b[k],...,b[0] are b[i] = 1 when n[i-1] + n[i-2] + n[i-3] >= 2, so the majority bit 0 or 1 among the 3 bits of n below position i (with 0 bits below the radix point of n as necessary). This is since 7*n = 4*n + 2*n + n is n[i-1] + n[i-2] + n[i-3] at position i-1, and 4*n XOR 2*n XOR n is the same but no carry, so b[i] is the carry only. - Kevin Ryde, Mar 26 2021

Crossrefs

Positions of zeros are given by A048715. Cf. A048733, A342697.
Diagonal 7 of A061858.

Programs

A342697 For any number n with binary expansion Sum_{k >= 0} b(k) * 2^k, the binary expansion of a(n) is Sum_{k >= 0} floor((b(k) + b(k+1) + b(k+2))/2) * 2^k.

Original entry on oeis.org

0, 0, 0, 1, 0, 1, 3, 3, 0, 0, 2, 3, 6, 7, 7, 7, 0, 0, 0, 1, 4, 5, 7, 7, 12, 12, 14, 15, 14, 15, 15, 15, 0, 0, 0, 1, 0, 1, 3, 3, 8, 8, 10, 11, 14, 15, 15, 15, 24, 24, 24, 25, 28, 29, 31, 31, 28, 28, 30, 31, 30, 31, 31, 31, 0, 0, 0, 1, 0, 1, 3, 3, 0, 0, 2, 3, 6
Offset: 0

Views

Author

Rémy Sigrist, Mar 18 2021

Keywords

Comments

The value of the k-th bit in a(n) corresponds to the most frequent value in the bit triple starting at the k-th bit in n.

Examples

			The first terms, in decimal and in binary, are:
  n   a(n)  bin(n)  bin(a(n))
  --  ----  ------  ---------
   0     0       0          0
   1     0       1          0
   2     0      10          0
   3     1      11          1
   4     0     100          0
   5     1     101          1
   6     3     110         11
   7     3     111         11
   8     0    1000          0
   9     0    1001          0
  10     2    1010         10
  11     3    1011         11
  12     6    1100        110
  13     7    1101        111
  14     7    1110        111
  15     7    1111        111
		

Crossrefs

Programs

  • Mathematica
    A342697[n_] := Quotient[7*n - BitXor[n, 2*n, 4*n], 8];
    Array[A342697, 100, 0] (* Paolo Xausa, Aug 06 2025 *)
  • PARI
    a(n) = sum(k=0, #binary(n), ((bittest(n, k)+bittest(n, k+1)+bittest(n, k+2))>=2) * 2^k)

Formula

a(n) = 0 iff n belongs to A048715.
a(n) = floor(A048730(n)/8) = floor(A048733(n)/2). - Kevin Ryde, Mar 26 2021
Showing 1-4 of 4 results.