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 61-70 of 86 results. Next

A346300 Positions of words in A076478 in which #0's > #1's.

Original entry on oeis.org

1, 3, 7, 8, 9, 11, 15, 16, 17, 19, 23, 31, 32, 33, 34, 35, 36, 37, 39, 40, 41, 43, 47, 48, 49, 51, 55, 63, 64, 65, 66, 67, 68, 69, 71, 72, 73, 75, 79, 80, 81, 83, 87, 95, 96, 97, 99, 103, 111, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139
Offset: 1

Views

Author

Clark Kimberling, Jul 21 2021

Keywords

Comments

The sequences A258410, A346299, A346300 partition the positive integers.
See A076478 for a guide to related sequences.

Examples

			The first fourteen words w(n) are 0, 1, 00, 01, 10, 11, 000, 001, 010, 011, 100, 101, 110, 111, so that a(1) = 1, a(2) = 3.
		

Crossrefs

Programs

A346301 Positions of words in A076478 such that first digit = last digit.

Original entry on oeis.org

1, 2, 3, 6, 7, 9, 12, 14, 15, 17, 19, 21, 24, 26, 28, 30, 31, 33, 35, 37, 39, 41, 43, 45, 48, 50, 52, 54, 56, 58, 60, 62, 63, 65, 67, 69, 71, 73, 75, 77, 79, 81, 83, 85, 87, 89, 91, 93, 96, 98, 100, 102, 104, 106, 108, 110, 112, 114, 116, 118, 120, 122, 124
Offset: 1

Views

Author

Clark Kimberling, Jul 21 2021

Keywords

Comments

The sequences A346301 and A346302 partition the positive integers.
See A076478 for a guide to related sequences.

Examples

			The first fourteen words w(n) are 0, 1, 00, 01, 10, 11, 000, 001, 010, 011, 100, 101, 110, 111, so that a(3) = 6.
		

Crossrefs

Programs

A346302 Positions of words in A076478 such that first digit != last digit.

Original entry on oeis.org

4, 5, 8, 10, 11, 13, 16, 18, 20, 22, 23, 25, 27, 29, 32, 34, 36, 38, 40, 42, 44, 46, 47, 49, 51, 53, 55, 57, 59, 61, 64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94, 95, 97, 99, 101, 103, 105, 107, 109, 111, 113, 115, 117, 119, 121, 123, 125
Offset: 1

Views

Author

Clark Kimberling, Jul 21 2021

Keywords

Comments

The sequences A346301 and A346302 partition the positive integers.
See A076478 for a guide to related sequences.

Examples

			The first fourteen words w(n) are 0, 1, 00, 01, 10, 11, 000, 001, 010, 011, 100, 101, 110, 111, so that a(1) = 4.
		

Crossrefs

Programs

A346305 Positions of words in A076478 that start with 1 and end with 1.

Original entry on oeis.org

2, 6, 12, 14, 24, 26, 28, 30, 48, 50, 52, 54, 56, 58, 60, 62, 96, 98, 100, 102, 104, 106, 108, 110, 112, 114, 116, 118, 120, 122, 124, 126, 192, 194, 196, 198, 200, 202, 204, 206, 208, 210, 212, 214, 216, 218, 220, 222, 224, 226, 228, 230, 232, 234, 236, 238
Offset: 1

Views

Author

Clark Kimberling, Aug 16 2021

Keywords

Comments

The sequences A346303, A171757, A346304, and this sequence partition the positive integers. See A076478 for a guide to related sequences.
Is this A079946 with a 2 added in front? - R. J. Mathar, Sep 07 2021

Examples

			The first fourteen words w(n) are 0, 1, 00, 01, 10, 11, 000, 001, 010, 011, 100, 101, 110, 111, so that a(1) = 2.
		

Crossrefs

Programs

A384868 a(n) = Sum_{i=1...|b|} i*(-1)^b_i where b is the lexicographically n-th binary string.

Original entry on oeis.org

0, 1, -1, 3, -1, 1, -3, 6, 0, 2, -4, 4, -2, 0, -6, 10, 2, 4, -4, 6, -2, 0, -8, 8, 0, 2, -6, 4, -4, -2, -10, 15, 5, 7, -3, 9, -1, 1, -9, 11, 1, 3, -7, 5, -5, -3, -13, 13, 3, 5, -5, 7, -3, -1, -11, 9, -1, 1, -9, 3, -7, -5, -15, 21, 9, 11, -1, 13, 1, 3, -9, 15, 3, 5, -7, 7, -5, -3, -15, 17
Offset: 0

Views

Author

Christopher Purcell, Jun 11 2025

Keywords

Comments

The first binary string is the empty string and is indexed n=0.

Examples

			The lexicographically 8th binary string is 001; therefore, a(8) = 1 + 2 - 3 = 0.
Sequence can be written as triangle T(n,k) with row lengths 2^n:
   0;
   1, -1;
   3, -1, 1, -3;
   6,  0, 2, -4, 4, -2, 0, -6;
  10,  2, 4, -4, 6, -2, 0, -8, 8, 0, 2, -6, 4, -4, -2, -10;
  ...
		

Crossrefs

Programs

  • PARI
    a(n) = my(b=[d|d<-binary(n+1)[^1]]); sum(i=1, #b, i*(-1)^b[i]); \\ Michel Marcus, Jun 11 2025
    
  • Python
    from math import comb
    def A384868(n): return comb(len(s:=bin(n+1)[3:])+1,2)-(sum(i for i,j in enumerate(s,1) if j=='1')<<1) # Chai Wah Wu, Jun 13 2025
    
  • Python
    def a384868(n): return sum(i if b == '0' else -i for i, b in enumerate(bin(n + 1)[3:], 1)) # David Radcliffe, Jun 15 2025

Formula

From Alois P. Heinz, Jun 13 2025: (Start)
a(A000225(n)) = A000217(n).
a(2*(2^n-1)) = (-1)*A000217(n).
Sum_{i=0..2^n-1} a(i+2^n-1) = 0.
Sum_{i=0..2^n-1} i*a(i+2^n-1) = (-1)*A100575(n+1).
Sum_{i=0..2^n-1} abs(a(i+2^n-1)) = 2*A377170(n). (End)

A062258 Number of (0,1)-strings of length n not containing the substring 0100100.

Original entry on oeis.org

1, 2, 4, 8, 16, 32, 64, 127, 252, 500, 993, 1972, 3916, 7776, 15441, 30662, 60887, 120906, 240088, 476753, 946709, 1879921, 3733040, 7412858, 14720031, 29230199, 58043664, 115259801, 228876346, 454489608, 902499570, 1792132228
Offset: 0

Views

Author

Vladeta Jovovic, Jun 14 2001

Keywords

Comments

Also, number of (0,1)-strings of length n not containing the substring 1001001. - N. J. A. Sloane, Apr 02 2012

References

  • I. P. Goulden and D. M. Jackson, Combinatorial Enumeration, Wiley, N.Y., 1983, (Problem 2.8.2).
  • Reilly, J. W.; Stanton, R. G. Variable strings with a fixed substring. Proceedings of the Second Louisiana Conference on Combinatorics, Graph Theory and Computing (Louisiana State Univ., Baton Rouge, La., 1971), pp. 483--494. Louisiana State Univ., Baton Rouge, La.,1971. MR0319775 (47 #8317) [From N. J. A. Sloane, Apr 02 2012]

Crossrefs

Programs

  • Mathematica
    CoefficientList[Series[(1+x^3+x^6)/(1-2x+x^3-2x^4+x^6-x^7),{x,0,40}],x] (* or *) LinearRecurrence[{2,0,-1,2,0,-1,1},{1,2,4,8,16,32,64},40] (* Harvey P. Dale, Aug 10 2021 *)

Formula

G.f.: (1 + x^3 + x^6)/(1 - 2*x + x^3 - 2*x^4 + x^6 - x^7).
a(n) = 2*a(n-1) - a(n-3) + 2*a(n-4) - a(n-6) + a(n-7).

A066067 Number of binary strings u of any length with property that length(u) + number of 0's in u <= n (only one of a string and its reversal are counted).

Original entry on oeis.org

1, 2, 3, 6, 10, 18, 29, 49, 78, 128, 203, 329, 523, 844, 1347, 2172, 3480, 5614, 9023, 14567, 23466, 37910, 61165, 98865, 159677, 258190, 417283, 674890, 1091214, 1765146, 2854793, 4618373, 7470614, 12086436, 19552903, 31635193, 51181367, 82809832
Offset: 1

Views

Author

Frank Ellermann, Dec 02 2001

Keywords

Comments

If 0 is replaced by 2 (as in A007931) "length + 0-bits" is simply the total of ternary digits (e.g., 3 for 21 instead of 01).

Examples

			a(3) = 3: 0 01 111 (e.g. 01: length 2 + 1 zero = 3).
a(4) = 6: 0 01 00 011 101 1111.
a(5) =10: 0 01 00 011 101 001 010 0111 1011 11111.
		

Crossrefs

If reversals are counted as distinct then we obtain A000126.
A007931 (binary strings represented by ternary numbers),
Cf. A035615 (binary "same game").

Programs

  • Mathematica
    CoefficientList[Series[x (-x^7-x^4+3x^3-2x^2-x+1)/((1-x-x^2) (1-x^2-x^4) (1-x)^2),{x,0,50}],x] (* Harvey P. Dale, Jun 15 2011 *)

Formula

G.f.: x*(-x^7-x^4+3x^3-2x^2-x+1)/((1-x-x^2)*(1-x^2-x^4)*(1-x)^2).

Extensions

More terms from Harvey P. Dale, Jun 15 2011

A066346 Number of winning binary "same game" templates with ternary digits totaling n.

Original entry on oeis.org

1, 0, 1, 0, 2, 2, 4, 9, 13, 28, 46, 84, 146, 252, 433, 736, 1242, 2087, 3482, 5791, 9587, 15823, 26038, 42743, 70016, 114485, 186903, 304728, 496260, 807395, 1312504, 2132102, 3461407, 5616609, 9109732
Offset: 0

Views

Author

Frank Ellermann, Dec 23 2001

Keywords

Comments

Equivalently, templates whose minimum matching string has length n.

Examples

			a(1)..a(5) correspond to the winning templates -;2;-; 121,22; 122,221.
a(6) = 4 winning templates 11211,1212,2121 and 222 have a total of 6.
		

Crossrefs

Cf. A066345 (definition), A007931 (templates). A035615 (binary same game).

Extensions

a(17)-a(35) from Sean A. Irvine, Oct 09 2023

A085652 Fibonacci sequence in base 2 of the alternate number system.

Original entry on oeis.org

1, 1, 2, 11, 21, 112, 221, 1221, 11122, 22111, 122121, 1121112, 2212121, 12222121, 112211122, 222122211, 2111222221, 12111122112, 111112121221, 212112212221, 1212122111122, 11121211221111, 21222222221121, 122121211211112, 1121121211121121, 2212212111221121
Offset: 1

Views

Author

Bob Forslund (forslund(AT)tbaytel.net), Jul 11 2003

Keywords

References

  • R. R. Forslund, A Logical Alternative to the existing positional number system. Souhtwest Journal of Pure and Applied Mathematics. Dec. 1995. Vol. 1

Crossrefs

Programs

  • Maple
    a:= proc(n) local d, l, m;
          m:= combinat[fibonacci](n); l:= NULL;
          while m>0 do d:= irem(m, 2, 'm');
            if d=0 then d:=2; m:= m-1 fi;
            l:= d, l
          od; parse(cat(l))
        end:
    seq(a(n), n=1..30);  # Alois P. Heinz, Jul 25 2012

Formula

a(n) = A007931(A000045(n)).

Extensions

More terms from David Wasserman, Feb 08 2005

A111090 Successive generations of an alternating Kolakoski rule.

Original entry on oeis.org

1, 2, 11, 21, 112, 2122, 1121122, 2122121122, 1121122122121122, 212212112212211211212211, 112112212212112212211212212112112212
Offset: 1

Views

Author

Benoit Cloitre, Oct 12 2005

Keywords

Comments

Strings are obtained using the Kolakoski substitution and the additional rule: start with 1 if previous string begins with 2, start with 2 if previous string begins with 1.
a(n+1) > a(n), and a(n) is always composed of 1s and 2s, hence a subsequence of A007931. - Charles R Greathouse IV, Nov 20 2024

Examples

			1-->2-->11-->21-->112-->2122
		

Crossrefs

Subsequence of A007931.

Formula

As n grows a(2n-1) converges toward A025142 (red as a word) and a(2n) converges toward A025143. Conjecture : a(n) is asymptotic to c*(3/2)^n for some c.
Previous Showing 61-70 of 86 results. Next