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-10 of 12 results. Next

A261392 Largest term in row n of A261019.

Original entry on oeis.org

1, 1, 3, 6, 11, 21, 40, 73, 144, 274, 509, 931, 1771, 3555, 7021, 13964, 27789, 54536, 105854, 210655, 415349, 812461, 1578752, 3050921, 5868562, 11244267, 21472441, 40887802, 77668032, 147222550, 278556477, 540784632, 1116709696, 2292646735, 4682550808, 9519363902
Offset: 1

Views

Author

Reinhard Zumkeller, Aug 18 2015

Keywords

Comments

a(n) = Max(A261019(n,k): k = 0..A261017(n)).

Crossrefs

Programs

  • Haskell
    a261392 = maximum . a261019_row

Extensions

a(26)-a(36) from Alois P. Heinz, Aug 19 2015

A001911 a(n) = Fibonacci(n+3) - 2.

Original entry on oeis.org

0, 1, 3, 6, 11, 19, 32, 53, 87, 142, 231, 375, 608, 985, 1595, 2582, 4179, 6763, 10944, 17709, 28655, 46366, 75023, 121391, 196416, 317809, 514227, 832038, 1346267, 2178307, 3524576, 5702885, 9227463, 14930350, 24157815, 39088167, 63245984
Offset: 0

Views

Author

Keywords

Comments

This is the sequence A(0,1;1,1;2) of the family of sequences [a,b:c,d:k] considered by G. Detlefs, and treated as A(a,b;c,d;k) in the W. Lang link given below. - Wolfdieter Lang, Oct 17 2010
Ternary words of length n - 1 with subwords (0, 1), (0, 2) and (2, 2) not allowed. - Olivier Gérard, Aug 28 2012
For subsets of (1, 2, 3, 5, 8, 13, ...) Fibonacci Maximal terms (Cf. A181631) equals the number of leading 1's per subset. For example, (7-11) in Fibonacci Maximal = (1010, 1011, 1101, 1110, 1111), numbers of leading 1's = (1 + 1 + 2 + 3 + 4) = 11 = a(4) = row 4 of triangle A181631. - Gary W. Adamson, Nov 02 2010
As in our 2009 paper, we use two types of Fibonacci trees: - Ta: Fibonacci analog of binomial trees; Tb: Binary Fibonacci trees. Let D(r(k)) be the sum over all distances of the form d(r, x), across all vertices x of the tree rooted at r of order k. Ignoring r, but overloading, let D(a(k)) and D(b(k)) be the distance sums for the Fibonacci trees Ta and Tb respectively of the order k. Using the sum-of-product form in Equations (18) and (21) in our paper it follows that F(k+4) - 2 = D(a(k+1)) - D(b(k-1)). - K.V.Iyer and P. Venkata Subba Reddy, Apr 30 2011
a(n) is the length of the n-th palindromic prefix of the infinite Fibonacci word A003849. - Dimitri Hendriks, May 19 2014
The first k terms of the infinite Fibonacci word A014675 are palindromic if and only if k is a positive term of this sequence. - Clark Kimberling, Jul 14 2014
Can be expressed in terms of a rule similar to Recamán's sequence (A005132). Instead of following the Recamán rule "subtract if possible, otherwise add", this sequence follows the rule "If subtraction is possible, do nothing; otherwise add." For example when at the fourth term, 6, it is possible to subtract 4 (giving 2 which is not in {0, 1, 3, 6}) so nothing is done with 4. It is not possible to subtract 5 (6-5=1, which is in {0, 1, 3, 6}), so it is added, resulting in 11. - Matthew Malone, Jan 03 2020
For n>=1, a(n) is the maximum number of vertices (Moore bound) of a (1,1)-regular mixed graph with diameter n-1. - Miquel A. Fiol, Jun 24 2024
Repunits in the lazy Fibonacci representation (A104326), and which is the first row of array A372501. - A.H.M. Smeets, Jun 25 2025

Examples

			G.f. = x + 3*x^2 + 6*x^3 + 11*x^4 + 19*x^5 + 32*x^6 + 53*x^7 + 87*x^8 + ...
		

References

  • J. Riordan, An Introduction to Combinatorial Analysis, Wiley, 1958, p. 233.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A001611, A000071, A157725, A001911, A157726, A006327, A157727, A157728, A157729, A167616. [Added by N. J. A. Sloane, Jun 25 2010 in response to a comment from Aviezri S. Fraenkel]
Partial sums of A000045(n+1).
Right-hand column 3 of triangle A011794.
See also A165910.
Subsequence of A226538.
Column k=3 of A261019.

Programs

  • Haskell
    a001911 n = a001911_list !! n
    a001911_list = 0 : 1 : map (+ 2) (zipWith (+) a001911_list $ tail a001911_list)
    -- Reinhard Zumkeller, Jun 18 2013
    
  • Magma
    [(Fibonacci(n+3))-2: n in [0..85]]; // Vincenzo Librandi, Apr 23 2011
    
  • Maple
    a[0]:=0:a[1]:=1:for n from 2 to 50 do a[n]:=a[n-1]+a[n-2]+2 od: seq(a[n],n=0..50); # Miklos Kristof, Mar 09 2005
    A001911:=(1+z)/(z-1)/(z**2+z-1); # Simon Plouffe in his 1992 dissertation with another offset
    a:= n-> (Matrix([[0,-1,1]]). Matrix([[1,1,0], [1,0,0], [2,0,1]])^n)[1,1]: seq(a(n), n=0..50); # Alois P. Heinz, Jul 24 2008
  • Mathematica
    Table[Fibonacci[n+3] -2, {n,0,50}] (* Vladimir Joseph Stephan Orlovsky, Nov 19 2010 *)
    LinearRecurrence[{2,0,-1}, {0,1,3}, 40] (* Harvey P. Dale, Jun 06 2011 *)
    Fibonacci[Range[3,40]]-2 (* Harvey P. Dale, Jun 28 2015 *)
  • PARI
    a(n)=fibonacci(n+3)-2 \\ Charles R Greathouse IV, Mar 14 2012
    
  • SageMath
    [fibonacci(n+3)-2 for n in range(60)] # G. C. Greubel, Oct 21 2024

Formula

From Michael Somos, Jun 09 1999: (Start)
a(n) = A000045(n+3) - 2.
a(n) = a(n-1) + a(n-2) + 2, a(0) = 0, a(1) = 1. (End)
G.f.: x*(1+x)/((1-x)*(1-x-x^2)).
Sum of consecutive pairs of A000071 (partial sums of Fibonacci numbers). - Paul Barry, Apr 17 2004
a(n) = A101220(2, 1, n). - Ross La Haye, Jan 28 2005
a(n) = A108617(n+1, 2) = A108617(n+1, n-1) for n > 0. - Reinhard Zumkeller, Jun 12 2005
a(n) = term (1,1) in the 1 X 3 matrix [0,-1,1].[1,1,0; 1,0,0; 2,0,1]^n. - Alois P. Heinz, Jul 24 2008
a(0) = 0, a(1) = 1, a(2) = 3, a(n) = 2*a(n-1)-a(n-3). - Harvey P. Dale, Jun 06 2011
Eigensequence of an infinite lower triangular matrix with the natural numbers as the left border and (1, 0, 1, 0, ...) in all other columns. - Gary W. Adamson, Jan 30 2012
a(n) = (-2+(2^(-n)*((1-sqrt(5))^n*(-2+sqrt(5))+(1+sqrt(5))^n*(2+sqrt(5))))/sqrt(5)). - Colin Barker, May 12 2016
a(n) = A000032(6+n)-1 mod A000045(6+n). - Mario C. Enriquez, Apr 01 2017
E.g.f.: 2*exp(x/2)*(5*cosh(sqrt(5)*x/2) + 2*sqrt(5)*sinh(sqrt(5)*x/2))/5 - 2*exp(x). - Stefano Spezia, May 08 2022

Extensions

More terms and better description from Michael Somos

A260273 Successively add the smallest nonzero binary number that is not a substring.

Original entry on oeis.org

1, 3, 5, 8, 11, 15, 17, 20, 23, 27, 31, 33, 36, 39, 44, 51, 56, 61, 65, 68, 71, 76, 81, 84, 87, 91, 95, 99, 104, 111, 115, 120, 125, 129, 132, 135, 140, 145, 148, 151, 157, 165, 168, 171, 175, 179, 186, 190, 194, 199, 204, 209, 216, 223, 227, 232, 241, 246
Offset: 1

Views

Author

Alex Meiburg, Jul 22 2015

Keywords

Comments

a(n) is at least Omega(n), at most O(n*log(n)).
The empirical approximation n*(log(n)/2 + exp(1)) is startlingly close to tight, compared with many increasing upper bounds.
A261644(n) = A062383(a(n)) - a(n). - Reinhard Zumkeller, Aug 30 2015

Examples

			Begin with a(1)=1, in binary, "1". This contains the string "1" but not "10", so we add 2. Thus a(2)=1+2=3. This also contains "1" but not "10", so we move to a(3)=3+2=5. This contains "1" and "10" but not "11", so we add 3. Thus a(4)=5+3=8. (See A261018 for the successive numbers that are added. - _N. J. A. Sloane_, Aug 17 2015)
		

Crossrefs

See A261922 and A261461 for the smallest missing number function; also A261923, A262279, A261281.
See also A261396 (when a(n) just passes a power of 2), A261416 (the limiting behavior just past a power of 2).
First differences are A261018.
A262288 is the decimal analog.

Programs

  • Haskell
    a260273 n = a260273_list !! (n-1)
    a260273_list = iterate (\x -> x + a261461 x) 1
    -- Reinhard Zumkeller, Aug 30 2015, Aug 17 2015
    
  • Java
    public static void main(String[] args) {
       int a=1;
       for(int iter=0;iter<100;iter++){
           System.out.print(a+", ");
           int inc;
           for(inc=1; contains(a,inc); inc++);
           a+=inc;
       }
    }
    static boolean contains(int a,int test){
       int mask=(Integer.highestOneBit(test)<<1)-1;
       while(a >= test){
           if((a & mask) == test) return true;
           a >>= 1;
       }
       return false;
    }
    
  • Mathematica
    sublistQ[L1_, L2_] := Module[{l1 = Length[L1], l2 = Length[L2], k}, If[l2 <= l1, For[k = 1, k <= l1 - l2 + 1, k++, If[L1[[k ;; k + l2 - 1]] == L2, Return[True]]]]; False];
    a[1] = 1; a[n_] := a[n] = Module[{bb = IntegerDigits[a[n-1], 2], k}, For[k = 1, sublistQ[bb, IntegerDigits[k, 2]], k++]; a[n-1] + k]; Table[a[n], {n, 1, 60}] (* Jean-François Alcover, Apr 01 2016 *)
    NestList[Function[k, k + FromDigits[#, 2] &@ SelectFirst[IntegerDigits[Range[2^8], 2], Length@ SequencePosition[IntegerDigits[k, 2], #] == 0 &]], 1, 64] (* Michael De Vlieger, Apr 01 2016, Version 10.1 *)
  • Python
    A260273_list, a = [1], 1
    for i in range(10**3):
        b, s = 1, format(a,'b')
        while format(b,'b') in s:
            b += 1
        a += b
        s = format(a,'b')
        A260273_list.append(a) # Chai Wah Wu, Aug 26 2015

Formula

a(n+1) = a(n) + A261461(a(n)). - Reinhard Zumkeller, Aug 30 2015

A261015 Irregular triangle read by rows: T(n,k) (0 <= k <= 2^n-1) = number of binary strings of length n such that the smallest number whose binary representation is not visible in the string is k.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 1, 0, 0, 0, 1, 1, 3, 6, 4, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 4, 11, 10, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 5, 19, 21, 15, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
Offset: 1

Views

Author

N. J. A. Sloane, Aug 16 2015

Keywords

Comments

Suggested by A260273.

Examples

			Triangle begins:
  1,1,
  1,1,1,1,
  1,1,2,3,1,0,0,0,
  1,1,3,6,4,1,0,0,0,0,0,0,0,0,0,0,
...
For row 3, here are the 8 strings of length 3 and for each one, the smallest missing number k:
 000 1
 001 2
 010 3
 011 2
 100 3
 101 3
 110 4
 111 0
		

Crossrefs

See A261019 for a more compact version (which has further information about the columns).

Programs

  • Mathematica
    notVis[bits_] := For[i = 0, True, i++, If[SequencePosition[bits, IntegerDigits[i, 2]] == {}, Return[i]]];
    T[n_, k_] := Select[Rest[IntegerDigits[#, 2]]& /@ Range[2^n, 2^(n+1)-1], notVis[#] == k&] // Length;
    Table[T[n, k], {n, 1, 6}, {k, 0, 2^n-1}] // Flatten (* Jean-François Alcover, Aug 02 2018 *)

Extensions

More terms from Alois P. Heinz, Aug 17 2015

A261016 a(n) = Sum_{k=0..2^n-1} k*A261015(n,k).

Original entry on oeis.org

1, 6, 18, 46, 107, 241, 535, 1178, 2569, 5546, 11859, 25156, 53058, 111379, 232966, 486023, 1012185, 2104729, 4370644, 9064924, 18778766, 38856079, 80307630, 165790125, 341872016, 704171185, 1448812630, 2977673003, 6113469501, 12538958895, 25693167881, 52598980642
Offset: 1

Views

Author

N. J. A. Sloane, Aug 16 2015

Keywords

Comments

The scaled values a(n)/2^n are (to nine decimal places) 0.5000000000, 1.500000000, 2.250000000, 2.875000000, 3.343750000, 3.765625000, 4.179687500, 4.601562500, 5.017578125, 5.416015625, 5.790527344, 6.141601562, 6.476806641, 6.798034668, 7.109558105, 7.416122437, 7.722358704, 8.028903961, 8.336341858, 8.644985199, 8.954413414, 9.264011145, 9.573415518, 9.881861508, 10.18858004, 10.49296834, 10.79449527, 11.09269635, 11.38722431, 11.67781548, 11.96431363, 12.24665452, ...

Crossrefs

Programs

  • Haskell
    a261016 = sum . zipWith (*) [0..] . a261019_row'
    -- Reinhard Zumkeller, Aug 18 2015
  • Mathematica
    (* This program is not suitable to compute more than a dozen terms. *)
    notVis[bits_] := For[i = 0, True, i++, If[SequencePosition[bits, IntegerDigits[i, 2]] == {}, Return[i]]];
    T[n_, k_] := Select[Rest[IntegerDigits[#, 2]] & /@ Range[2^n, 2^(n+1) - 1], notVis[#] == k &] // Length;
    a[n_] := Sum[k*T[n, k], {k, 0, 2^n - 1}];
    Table[an = a[n]; Print["a(", n, ") = ", an]; an, {n, 1, 12}] (* Jean-François Alcover, Aug 02 2018 *)

Extensions

a(5)-a(16) from Alois P. Heinz, Aug 17 2015
a(17)-a(25) from Reinhard Zumkeller, Aug 18 2015
a(26)-a(32) from Alois P. Heinz, Aug 19 2015

A261017 a(n) = max k such that A261015(n,k) is not zero.

Original entry on oeis.org

1, 3, 4, 5, 5, 7, 8, 9, 9, 9, 11, 11, 13, 15, 16, 17, 17, 17, 17, 19, 19, 19, 21, 21, 23, 23, 23, 27, 29, 31, 32, 33, 33, 33, 33, 33, 35, 35, 35, 35, 37, 37, 37, 39, 39, 39, 39, 41, 41, 43, 43, 45, 45, 45, 47, 47, 47, 47
Offset: 1

Views

Author

N. J. A. Sloane, Aug 17 2015

Keywords

Crossrefs

Programs

  • Haskell
    a261017 = subtract 1 . length . a261019_row
    -- Reinhard Zumkeller, Aug 18 2015
  • Mathematica
    (* This program is not suitable to compute more than a dozen terms. *)
    notVis[bits_] := For[i = 0, True, i++, If[SequencePosition[bits, IntegerDigits[i, 2]] == {}, Return[i]]];
    T[n_, k_] := Select[Rest[IntegerDigits[#, 2]] & /@ Range[2^n, 2^(n+1) - 1], notVis[#] == k &] // Length;
    a[n_] := Do[If[T[n, k] > 0, Return[k]], {k, 2^n - 1, 0, -1}];
    Table[an = a[n]; Print["a(", n, ") = ", an]; an, {n, 1, 12}] (* Jean-François Alcover, Aug 02 2018 *)

Extensions

a(5)-a(17) from Alois P. Heinz, Aug 17 2015
a(18)-a(25) from Reinhard Zumkeller, Aug 18 2015
a(26)-a(36) from Alois P. Heinz, Aug 19 2015
a(37)-a(58) from Hiroaki Yamanouchi, Aug 23 2015

A261441 Number of binary strings of length n+3 such that the smallest number whose binary representation is not visible in the string is 5.

Original entry on oeis.org

0, 1, 5, 15, 35, 73, 144, 274, 509, 931, 1685, 3027, 5409, 9628, 17088, 30261, 53497, 94447, 166563, 293489, 516772, 909402, 1599585, 2812479, 4943461, 8686739, 15261105, 26806184, 47077920, 82669241, 145152429, 254839087, 447378963, 785340873, 1378536968
Offset: 0

Views

Author

Reinhard Zumkeller, Aug 18 2015

Keywords

Crossrefs

Column k=5 of A261019.

Programs

  • Haskell
    a261441 0 = 0
    a261441 n = a261019' (n + 3) 5

Formula

a(n) = A261019(n+3,5).
G.f.: -(x^5+2*x^3-1)*x/((x^3-x^2+2*x-1)*(x^3+x-1)*(x-1)^2). - Alois P. Heinz, Aug 19 2015

Extensions

More terms from Alois P. Heinz, Aug 19 2015

A261442 Number of binary strings of length n+6 such that the smallest number whose binary representation is not visible in the string is 6.

Original entry on oeis.org

0, 2, 6, 15, 32, 64, 120, 218, 385, 668, 1142, 1933, 3245, 5415, 8992, 14876, 24534, 40362, 66263, 108597, 177714, 290454, 474195, 773433, 1260447, 2052608, 3340437, 5433105, 8832176, 14351131, 23309037, 37844339, 61423189, 99662849, 161665292, 262176955
Offset: 0

Views

Author

Reinhard Zumkeller, Aug 18 2015

Keywords

Crossrefs

Column k=6 of A261019.

Programs

  • Haskell
    a261442 n = a261019' (n + 6) 6

Formula

a(n) = A261019(n+6,6).
G.f.: (x^2+2*x-2)*x/((x+1)*(x^2+x-1)*(x^3+x-1)*(x-1)^3). - Alois P. Heinz, Aug 19 2015

Extensions

More terms from Alois P. Heinz, Aug 19 2015

A261443 Number of binary strings of length n+5 such that the smallest number whose binary representation is not visible in the string is 7.

Original entry on oeis.org

0, 2, 9, 31, 79, 185, 408, 864, 1771, 3555, 7021, 13696, 26453, 50700, 96565, 182983, 345269, 649188, 1217000, 2275699, 4246229, 7908427, 14705711, 27307682, 50648414, 93841900, 173714334, 321316013, 593922885, 1097150252, 2025690002, 3738341466, 6896182121
Offset: 0

Views

Author

Reinhard Zumkeller, Aug 18 2015

Keywords

Crossrefs

Column k=7 of A261019.

Programs

  • Haskell
    a261443 n = a261019' (n + 5) 7

Formula

a(n) = A261019(n+5,7).
G.f.: -(x^12+3*x^11+3*x^10-8*x^8-13*x^7-14*x^6-x^5+9*x^4+12*x^3-x^2-x-2)*x / ((x+1)*(x^2+1)*(x^2+x-1)*(x^3+x^2-1)*(x^3+x^2+x-1)*(x^3+x-1)*(x-1)^2). - Alois P. Heinz, Aug 19 2015

Extensions

More terms from Alois P. Heinz, Aug 19 2015

A261473 Number of binary strings of length n+6 such that the smallest number whose binary representation is not visible in the string is 8.

Original entry on oeis.org

0, 2, 10, 40, 116, 296, 699, 1557, 3325, 6893, 13964, 27789, 54536, 105854, 203645, 388970, 738596, 1395718, 2626914, 4927664, 9217604, 17201570, 32036763, 59564873, 110586325, 205056292, 379823379, 702897160, 1299744979, 2401747773, 4435467036, 8187063102
Offset: 0

Views

Author

Alois P. Heinz, Aug 20 2015

Keywords

Crossrefs

Column k=8 of A261019.

Programs

  • Mathematica
    CoefficientList[Series[(x^16+5x^15+11x^14+10x^13-9x^12-40x^11-52x^10-19x^9+36x^8+61x^7+31x^6-13x^5-26x^4- 14x^3+ 4x^2+ 2x+2)x/((x+1)(x^2+x+1)(x^3+x^2-1)(x^2+x-1)(x^3+x^2+x-1)(x^4+x^3-1)(x^3+x-1)(x-1)^3),{x,0,40}],x] (* or *) LinearRecurrence[{4,-2,-5,-6,10,21,0,-29,-33,11,44,30,-16,-36,-17,9,16,6,-2,-3,-1},{0,2,10,40,116,296,699,1557,3325,6893,13964,27789,54536,105854,203645,388970,738596,1395718,2626914,4927664,9217604},40] (* Harvey P. Dale, Oct 30 2024 *)

Formula

G.f.: (x^16 +5*x^15 +11*x^14 +10*x^13 -9*x^12 -40*x^11 -52*x^10 -19*x^9 +36*x^8 +61*x^7 +31*x^6 -13*x^5 -26*x^4 -14*x^3 +4*x^2 +2*x+2) *x / ((x+1) *(x^2+x+1) *(x^3+x^2-1) *(x^2+x-1) *(x^3+x^2+x-1) *(x^4+x^3-1) *(x^3+x-1) *(x-1)^3).
a(n) = A261019(n+6,8).
Showing 1-10 of 12 results. Next