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 18 results. Next

A294262 a(n) = 3*a(n-1) + 5*a(n-2) + a(n-3), with a(0) = a(1) = 1 and a(2) = 7, a linear recurrence which is a trisection of A005252.

Original entry on oeis.org

1, 1, 7, 27, 117, 493, 2091, 8855, 37513, 158905, 673135, 2851443, 12078909, 51167077, 216747219, 918155951, 3889371025, 16475640049, 69791931223, 295643364939, 1252365390981, 5305104928861, 22472785106427, 95196245354567, 403257766524697, 1708227311453353, 7236167012338111, 30652895360805795, 129847748455561293, 550043889183050965
Offset: 0

Views

Author

Keywords

Crossrefs

Programs

  • Magma
    [(Fibonacci(3*n+1) +(-1)^n)/2 : n in [0..30]]; // G. C. Greubel, Apr 19 2019
    
  • Mathematica
    LinearRecurrence[{3,5,1},{1,1,7},30]
  • PARI
    {a(n) = (fibonacci(3*n+1) +(-1)^n)/2}; \\ G. C. Greubel, Apr 19 2019
    
  • Sage
    [(fibonacci(3*n+1) +(-1)^n)/2 for n in (0..30)] # G. C. Greubel, Apr 19 2019
  • bc
    a=1
    b=1
    c=7
    print 0," ",a,"\n"
    print 1," ",b,"\n"
    print 2," ",c,"\n"
    for(x=3;x<=1000;++x){
    d=3*c+5*b+1*a
    print x," ",d,"\n"
    a=b
    b=c
    c=d
    } # Hermann Stamm-Wilbrandt, Apr 18 2019
    

Formula

G.f.: (1 - 2*x - x^2)/(1 - 3*x - 5*x^2 - x^3).
a(n) = (1/20)*(10*(-1)^n + (2-sqrt(5))^n*(5-sqrt(5)) + (2+sqrt(5))^n*(5+sqrt(5))).
a(n) = A005252(3*n).
a(n) = 4*a(n-1) + a(n-2) + 2*(-1)^n for n >= 2.
a(n) = Sum_{k=0..floor(3*n/4)} binomial(3*n-2*k, 2*k).
a(n) = A110679(n) - A001076(n).
a(n) = (Fibonacci(3*n + 1) + (-1)^n)/2.
a(2*n) = A232970(2*n); a(2*n+1) = A049651(2*n+1). See "6 interlaced bisections" link. - Hermann Stamm-Wilbrandt, Apr 18 2019

A108479 Antidiagonal sums of number triangle A086645.

Original entry on oeis.org

1, 1, 2, 7, 17, 44, 117, 305, 798, 2091, 5473, 14328, 37513, 98209, 257114, 673135, 1762289, 4613732, 12078909, 31622993, 82790070, 216747219, 567451585, 1485607536, 3889371025, 10182505537, 26658145586, 69791931223, 182717648081
Offset: 0

Views

Author

Paul Barry, Jun 04 2005

Keywords

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{2,1,2,-1},{1,1,2,7},30] (* Harvey P. Dale, Jun 01 2021 *)

Formula

G.f.: (1 - x - x^2)/(1 - 2*x - x^2 - 2*x^3 + x^4).
a(n) = 2*(n-1) + a(n-2) + 2*a(n-3) - a(n-4).
a(n) = Sum_{k=0..floor(n/2)} C(2*(n-k), 2*k).
a(n) = Sum_{k=0..floor(n/2)} Sum_{j=0..n-k} C(2*(n-2*k), j) * C(2*k, j).
a(n) = A005252(2*n). - Seiichi Manyama, Aug 11 2024

A094686 A Fibonacci convolution.

Original entry on oeis.org

1, 0, 1, 2, 2, 4, 7, 10, 17, 28, 44, 72, 117, 188, 305, 494, 798, 1292, 2091, 3382, 5473, 8856, 14328, 23184, 37513, 60696, 98209, 158906, 257114, 416020, 673135, 1089154, 1762289, 2851444, 4613732, 7465176, 12078909, 19544084, 31622993, 51167078, 82790070
Offset: 0

Views

Author

Paul Barry, May 19 2004

Keywords

Comments

Convolution of A000045 and A049347.
Diagonal sums of number triangle A116088. - Paul Barry, Feb 04 2006
Let (b(n)) be the p-INVERT of (1,1,0,0,0,0,0,0,...) using p(S) = 1 - S^2; then b(n) = a(n+1) for n >=0. See A292324. - Clark Kimberling, Sep 15 2017

Crossrefs

Programs

  • Magma
    [(Fibonacci(n+1) +((n+2) mod 3) -1)/2: n in [0..40]]; // G. C. Greubel, Feb 09 2023
    
  • Mathematica
    LinearRecurrence[{0,1,2,1}, {1,0,1,2}, 40] (* Jean-François Alcover, Sep 21 2017 *)
  • PARI
    Vec(1/((1-x-x^2)*(1+x+x^2)) + O(x^50)) \\ Michel Marcus, Sep 27 2014
    
  • SageMath
    [(fibonacci(n+1) + (n+2)%3 - 1)/2 for n in range(41)] # G. C. Greubel, Feb 09 2023

Formula

G.f.: 1/((1-x-x^2)*(1+x+x^2)).
a(n) = 2*sqrt(3)*Sum_{k=0..n} Fibonacci(k+1)*cos((4*(n-k)+1)*Pi/6)/3.
a(n) = a(n-2) + 2*a(n-3) + a(n-4).
From Paul Barry, Jan 13 2005: (Start)
a(n) = A005252(n) - (-cos((2*n+1)*Pi/3)/2 - sqrt(3)*sin((2*n+1)*Pi/3)/6 + sqrt(3)*cos(Pi*n/3+Pi/6)/6 + sin((2*n+1)*Pi/6)/2).
a(n) = Sum_{k=0..floor(n/2)} if(mod(n-k, 2)=0, binomial(n-k, k), 0).
a(n) = A093040(n-1) - Fibonacci(n). (End)
a(n) = Sum_{k=0..floor(n/2)} C(n-k, k)*(1+(-1)^(n-k))/2. - Paul Barry, Sep 09 2005
From Paul Barry, Feb 04 2006: (Start)
a(n) = Sum_{k=0..floor(n/2)} C(2*k, n-2*k).
a(n) = Sum_{k=0..floor(n/2)} C(n-k,k)*C(3*k,n-k)/C(3*k,k). (End)
2*a(n) = A000045(n+1) + A049347(n). - R. J. Mathar, Feb 13 2020
a(n) = (1/2)*(A000045(n+1) + A049347(n)). - G. C. Greubel, Feb 09 2023

A130578 Number of different possible rows (or columns) in an n X n crossword puzzle.

Original entry on oeis.org

0, 0, 1, 3, 6, 10, 16, 26, 43, 71, 116, 188, 304, 492, 797, 1291, 2090, 3382, 5472, 8854, 14327, 23183, 37512, 60696, 98208, 158904, 257113, 416019, 673134, 1089154, 1762288, 2851442, 4613731, 7465175, 12078908, 19544084
Offset: 1

Views

Author

Marc A. Brodie (mbrodie(AT)wju.edu), Aug 10 2007, Aug 24 2007

Keywords

Comments

The number of linear arrangements of n black and white squares subject to the conditions that there must be at least one run of white squares and all runs of white squares must be of length at least three.
Crossword puzzles such as those in the New York Times do not include one-letter or two-letter words. Since the daily NYT puzzle is 15 X 15, there are a(15) = 797 different possible arrangements for each row.

Examples

			a(5) = 6 because using 0's for white squares and 1's for black, the possible rows are: 00011, 10001, 11000, 00001, 10000, 00000.
		

Programs

  • Haskell
    a130578 n = a130578_list !! (n-1)
    a130578_list = 0 : 0 : 1 : 3 : zipWith (+)
       (map (* 2) $ drop 3 a130578_list)
       (zipWith (-) (map (+ 1) a130578_list) (drop 2 a130578_list))
    -- Reinhard Zumkeller, May 23 2013
    
  • Mathematica
    possiblerows = {}; For[n = 1, n <= 36, n++, table = Table[{n, k, Coefficient[(x^0 + Sum[x^i, {i, 3, n - k}])^(k + 1), x, n - k]}, {k, 0, n}]; total = Sum[table[[j, 3]], {j, 1, n}]; possiblerows = Append[possiblerows, total]; totalstable = Table[{t, possiblerows[[t]]}, {t, 1, Length[ possiblerows]}]]; TableForm[totalstable, TableHeadings -> {None, {" n = squares", "total number of permissible rows"}}]
  • PARI
    a(n)=([0,1,0,0,0;0,0,1,0,0;0,0,0,1,0;0,0,0,0,1;-1,1,1,-3,3]^n*[0;0;0;1;3])[1,1] \\ Charles R Greathouse IV, Jun 11 2015

Formula

Recurrence: a(n+4) = 2*a(n+3) - a(n+2) + a(n) + 1, with a(1) = 0, a(2) = 0, a(3) = 1, a(4) = 3.
Formula: a(n) = (30 - 30*sqrt(5) - 30*(1/2 - sqrt(5)/2)^n + 12*sqrt(5)*(1/2 - sqrt(5)/2)^n + 15*(1/2 + sqrt(5)/2)^n + 3*sqrt(5)*(1/2 + sqrt(5)/2)^n - 15*cos((n*Pi)/3) + 15*sqrt(5)*cos((n*Pi)/3) + 5*sqrt(3)*sin((n*Pi)/3) - 5*sqrt(15)*sin((n*Pi)/3))/(30*(-1 + sqrt(5))).
O.g.f.: x^3/((-1+x)*(x^2+x-1)*(x^2-x+1)). - R. J. Mathar, Nov 23 2007
a(n) = A005252(n+1) - 1. - R. J. Mathar, Nov 15 2011
G.f.: Q(0)*x^2/(2-2*x), where Q(k) = 1 + 1/(1 - x*( 4*k+2 -x +x^3)/( x*( 4*k+4 -x +x^3) +1/Q(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Jan 07 2014

A228461 Two-dimensional array read by antidiagonals: T(n,k) = number of arrays of maxima of three adjacent elements of some length n+2 0..k array.

Original entry on oeis.org

2, 3, 4, 4, 9, 7, 5, 16, 22, 11, 6, 25, 50, 46, 17, 7, 36, 95, 130, 91, 27, 8, 49, 161, 295, 310, 183, 44, 9, 64, 252, 581, 821, 736, 383, 72, 10, 81, 372, 1036, 1847, 2227, 1821, 819, 117, 11, 100, 525, 1716, 3703, 5615, 6254, 4673, 1749, 189, 12, 121, 715, 2685, 6812
Offset: 1

Views

Author

R. H. Hardin Aug 22 2013

Keywords

Comments

There are two arrays (or lists, or vectors) involved, a length n+2 array with free elements from 0..k (thus (k+1)^(n+2) of them) and an array that is being enumerated of length n, each element of the latter being the maximum of three adjacent elements of the first array.
Many different first arrays can give the same second array.

Examples

			Table starts
...2....3.....4.....5......6......7.......8.......9......10.......11.......12
...4....9....16....25.....36.....49......64......81.....100......121......144
...7...22....50....95....161....252.....372.....525.....715......946.....1222
..11...46...130...295....581...1036....1716....2685....4015.....5786.....8086
..17...91...310...821...1847...3703....6812...11721...19117....29843....44914
..27..183...736..2227...5615..12453...25096...46941...82699...138699...223224
..44..383..1821..6254..17487..42386...92430..185727..349558...623513..1063283
..72..819..4673.18394..57303.151882..357510..768231.1535578..2893605..5191407
.117.1749.12107.55285.194064.567835.1453506.3357985.7152815.14263777.26930773
Some solutions for n=4 k=4
..3....4....4....3....3....4....3....4....3....0....3....3....4....2....0....2
..0....4....1....3....2....0....2....4....1....0....3....3....1....2....0....0
..4....1....1....0....1....0....4....0....0....0....2....1....4....2....2....3
..4....0....3....3....2....0....4....2....3....1....3....1....4....0....4....3
		

Crossrefs

Column 1 is A005252(n+3)
Column 2 is A217878
Column 3 is A217949.
A228464 is another column.
Row 1 is A000027(n+1)
Row 2 is A000290(n+1)
Row 3 is A002412(n+1)
Row 4 is A006324(n+1)
See A217883, A217954 for similar arrays.

Formula

Empirical for column k:
k=1: a(n) = 2*a(n-1) -a(n-2) +a(n-4)
k=2: a(n) = 3*a(n-1) -3*a(n-2) +a(n-3) +3*a(n-4) -a(n-5) +a(n-6) +a(n-7)
k=3: [order 10]
k=4: [order 13]
k=5: [order 16]
k=6: [order 19]
k=7: [order 22]
Empirical for row n:
n=1: a(n) = n + 1
n=2: a(n) = n^2 + 2*n + 1
n=3: a(n) = (2/3)*n^3 + (5/2)*n^2 + (17/6)*n + 1
n=4: a(n) = (1/3)*n^4 + 2*n^3 + (25/6)*n^2 + (7/2)*n + 1
n=5: a(n) = (2/15)*n^5 + (7/6)*n^4 + (25/6)*n^3 + (19/3)*n^2 + (21/5)*n + 1
n=6: [polynomial of degree 6]
n=7: [polynomial of degree 7]

Extensions

Edited by N. J. A. Sloane, Sep 02 2013

A024490 a(n) = C(n-1,1) + C(n-3,3) + ... + C(n-2*m-1,2*m+1), where m = floor((n-2)/4).

Original entry on oeis.org

1, 2, 3, 4, 6, 10, 17, 28, 45, 72, 116, 188, 305, 494, 799, 1292, 2090, 3382, 5473, 8856, 14329, 23184, 37512, 60696, 98209, 158906, 257115, 416020, 673134, 1089154, 1762289, 2851444, 4613733, 7465176, 12078908, 19544084, 31622993, 51167078, 82790071
Offset: 2

Views

Author

Keywords

Comments

Essentially both the first difference sequence and partial sum of A005252, so its own shifted second difference and indeed virtually the same as A005252, so close to being its own shifted first difference.
From Paul Curtz, Jun 22 2011: (Start)
b(n) = 0,0,0,1,2,3,4,6, and differences are
0, 0, 0, 1, 2, 3, 4, 6,
0, 0, 1, 1, 1, 1, 2, 4,
0, 1, 0, 0, 0, 1, 2, 3,
1, -1, 0, 0, 1, 1, 1, 1,
-2, 1, 0, 1, 0, 0, 0, 1,
3, -1, 1 -1, 0, 0, 1, 1,
-4, 2, -2, 1, 0, 1, 0, 0,
6, -4, 3, -1, 1, -1, 0, 0;
b(n) is an autosequence (sequence identical to its inverse binomial transform signed) of first kind, i.e., its main diagonal is A000004.
Examples: A000045, A001045, A113405, A191754 (array). (End)
a(n) is the number of vertices of the Fibonacci cube Gamma(n-1) having an odd number of ones. The Fibonacci cube Gamma(n) can be defined as the graph whose vertices are the binary strings of length n without two consecutive 1's and in which two vertices are adjacent when their Hamming distance is exactly 1. Example: a(4) = 3; indeed, the Fibonacci cube Gamma(3) has the five vertices 000, 010, 001, 100, 101, three of which have an odd number of ones. See the E. Munarini et al. reference, p. 323. - Emeric Deutsch, Jun 28 2015
a(n) is the number of odd permutations p of 1..n such that |p(i)-i| <= 1 for i=1..n. - Dmitry Efimov, Jan 08 2016

Crossrefs

Programs

  • Magma
    [n le 4 select n else 2*Self(n-1)-Self(n-2)+Self(n-4): n in [1..50]]; // Vincenzo Librandi, Jan 09 2016
    
  • Mathematica
    LinearRecurrence[{2,-1,0,1},{1,2,3,4},39] (* Ray Chandler, Sep 23 2015 *)
    CoefficientList[Series[1/((1-x-x^2)(1-x+x^2)), {x,0,40}], x] (* Vincenzo Librandi, Jan 09 2016 *)
  • PARI
    Vec(x^2/((1-x-x^2)*(1-x+x^2)) + O(x^50)) \\ Michel Marcus, Feb 03 2016
    
  • SageMath
    def A024490(n): return (fibonacci(n+1) -chebyshev_U(n,1/2))/2
    [A024490(n) for n in range(2,60)] # G. C. Greubel, Apr 10 2023

Formula

a(n) = A000045(n+1) - A005252(n).
a(n) = (A000045(n+1) - A010892(n))/2. - Mario Catalani (mario.catalani(AT)unito.it), Jan 08 2003
a(n) = Sum_{k=0..n} Fibonacci(k+1)*2*sin(Pi*(n-k)/3 + Pi/3)/sqrt(3). - Paul Barry, May 18 2004
G.f.: x^2/((1-x-x^2)(1-x+x^2)). - Jon Perry, Jun 22 2004
a(n) = Sum_{k=0..floor(n/2)} binomial(n-k+1,k+1)*(1+(-1)^k)/2. - Paul Barry, Jul 05 2007
G.f.: (1 + Q(0)*x^4/2)/(1-x)^2, where Q(k) = 1 + 1/(1 - x*( 4*k + 2 - x + x^3)/( x*(4*k + 4 - x + x^3) + 1/Q(k+1))); (continued fraction). - Sergei N. Gladkovskii, Jan 07 2014
E.g.f.: exp(x/2)*(15*cosh(sqrt(5)*x/2) - 5*(3*cos(sqrt(3)*x/2) + sqrt(3)*sin(sqrt(3)*x/2)) + 3*sqrt(5)*sinh(sqrt(5)*x/2))/30. - Stefano Spezia, Aug 03 2022

Extensions

Additional comments from Henry Bottomley, Apr 07 2000
Corrected by Mario Catalani (mario.catalani(AT)unito.it), Jan 08 2003
Further corrections from Hugo van der Sanden, Oct 05 2006

A093040 Expansion of (1+x)/((1+x+x^2)(1-x-x^2)).

Original entry on oeis.org

1, 1, 1, 3, 4, 6, 11, 17, 27, 45, 72, 116, 189, 305, 493, 799, 1292, 2090, 3383, 5473, 8855, 14329, 23184, 37512, 60697, 98209, 158905, 257115, 416020, 673134, 1089155, 1762289, 2851443, 4613733, 7465176, 12078908, 19544085, 31622993, 51167077
Offset: 0

Views

Author

Paul Barry, Mar 15 2004

Keywords

Comments

The sequence 0,1,1,1,3... has a(n) = Fib(n+1)/2-A049347(n)/2. It counts paths of length n between two of the vertices of the graph with adjacency matrix [0,1,0,0;0,0,1,1;1,1,0,0;0,0,1,0].
Diagonal sums of Riordan array ((1+x), x(1+x)^2). - Paul Barry, May 31 2006
a(n) is the number of compositions of n into parts 1,2,3 with no two consecutive 1's. For example a(5) = 6 because we have: 3+2, 2+3, 1+3+1, 2+2+1, 2+1+2, 1+2+2. - Geoffrey Critzer, Mar 15 2014
a(n) is the number of compositions of n+1 into an odd number of parts 1 and 2, that is, the number of barcodes of width n+1 with alternating black and white bars of width 1 or 2 and black border (see the first recurrence formula). - Grégoire Nicollier, Apr 04 2022

Examples

			G.f. = 1 + x + x^2 + 3*x^3 + 4*x^4 + 6*x^5 + 11*x^6 + 17*x^7 + 27*x^8 + 45*x^9 + ...
		

References

  • MacKay, Information Theory, Inference and Learning Algorithms, CUP, 2003, p. 251

Crossrefs

Programs

  • Magma
    [Floor(Fibonacci(n+3)/2)-Floor(Fibonacci(n+1)/2): n in [1..50]]; // Vincenzo Librandi, Jul 10 2012
    
  • Mathematica
    CoefficientList[Series[((1+x)/(1-x-x^2)+(1-x^2)/(1-x^3))/2,{x,0,50}],x] (* Vincenzo Librandi, Jul 10 2012 *)
    a[ n_] := SeriesCoefficient[ If[ n < 0, x^3 (1 + x) / (1 + 2 x + x^2 - x^4), (1 + x) / (1 - x^2 - 2 x^3 - x^4)], {x, 0, Abs@n}]; (* Michael Somos, Mar 19 2014 *)
    LinearRecurrence[{0, 1, 2, 1}, {1, 1, 1, 3}, 39] (* Jean-François Alcover, Sep 21 2017 *)
  • PARI
    Vec(((1+x)/(1-x-x^2)+(1-x^2)/(1-x^3))/2 + O(x^50)) \\ Michel Marcus, Sep 27 2014

Formula

G.f.: ((1+x)/(1-x-x^2)+(1-x^2)/(1-x^3))/2.
a(n) = a(n-2) + 2*a(n-3) + a(n-4).
a(n) = Fib(n+2)/2+sqrt(3)sin(2*Pi*n/3+Pi/3)/3 = Fib(n+2)/2+A057078(n)/2.
a(n-1) = Sum_{k=0..floor(n/2)} if(mod(n-k, 2)=1, binomial(n-k, k), 0).
a(n-1) = A094686(n) - Fib(n). - Paul Barry, Jan 13 2005
a(n) = Sum_{k=0..floor(n/2)} binomial(2k+1,n-2k). - Paul Barry, May 31 2006
a(n) = floor(Fibonacci(n+3)/2) - floor(Fibonacci(n+1)/2). - Gary Detlefs, Mar 13 2011
a(n) = a(n-2) + 2*a(n-3) + a(n-4), a(-3-n) = (-1)^n * A005252(n) for all n in Z. - Michael Somos, Mar 19 2014
a(n-1) + 2*a(n) - a(n+2) = a(n) - a(n-1) - a(n-2) = A057078(n) for all n in Z. - Michael Somos, Mar 19 2014
2*a(n) = A057078(n) + A000045(n+2). - R. J. Mathar, Sep 16 2017

A132971 a(2*n) = a(n), a(4*n+1) = -a(n), a(4*n+3) = 0, with a(0) = 1.

Original entry on oeis.org

1, -1, -1, 0, -1, 1, 0, 0, -1, 1, 1, 0, 0, 0, 0, 0, -1, 1, 1, 0, 1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 1, 1, 0, 1, -1, 0, 0, 1, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 1, 1, 0, 1, -1, 0, 0, 1, -1, -1, 0, 0, 0, 0, 0, 1, -1
Offset: 0

Views

Author

Michael Somos, Sep 17 2007, Sep 19 2007

Keywords

Comments

If binary(n) has adjacent 1 bits then a(n) = 0 else a(n) = (-1)^A000120(n).
Fibbinary numbers (A003714) gives the numbers n for which a(n) = A106400(n). - Antti Karttunen, May 30 2017

Examples

			G.f. = 1 - x - x^2 - x^4 + x^5 - x^8 + x^9 + x^10 - x^16 + x^17 + x^18 + ...
		

Crossrefs

Cf. A085357 (gives the absolute values: -1 -> 1), A286576 (when reduced modulo 3: -1 -> 2).

Programs

  • Mathematica
    m = 100; A[_] = 1;
    Do[A[x_] = A[x^2] - x A[x^4] + O[x]^m // Normal, {m}];
    CoefficientList[A[x], x] (* Jean-François Alcover, Nov 16 2019 *)
  • PARI
    {a(n) = if( n<1, n==0, if( n%2, if( n%4 > 1, 0, -a((n-1)/4) ), a(n/2) ) )};
    
  • PARI
    {a(n) = my(A, m); if( n<0, 0, m = 1; A = 1 + O(x); while( m<=n, m *= 2; A = subst(A, x, x^2) - x * subst(A, x, x^4) ); polcoeff(A, n)) };
    
  • Python
    from sympy import mobius, prime, log
    import math
    def A(n): return n - 2**int(math.floor(log(n, 2)))
    def b(n): return n + 1 if n<2 else prime(1 + (len(bin(n)[2:]) - bin(n)[2:].count("1"))) * b(A(n))
    def a(n): return mobius(b(n)) # Indranil Ghosh, May 30 2017
  • Scheme
    (define (A132971 n) (cond ((zero? n) 1) ((even? n) (A132971 (/ n 2))) ((= 1 (modulo n 4)) (- (A132971 (/ (- n 1) 4)))) (else 0))) ;; Antti Karttunen, May 30 2017
    

Formula

A024490(n) = number of solutions to 2^n <= k < 2^(n+1) and a(k) = 1.
A005252(n) = number of solutions to 2^n <= k < 2^(n+1) and a(k) = -1.
A027935(n-1) = number of solutions to 2^n <= k < 2^(n+1) and a(k) = 0.
G.f. A(x) satisfies A(x) = A(x^2) - x * A(x^4).
G.f. B(x) of A000621 satisfies B(x) = x * A(x^2) / A(x).
a(n) = A008683(A005940(1+n)). [Analogous to Moebius mu] - Antti Karttunen, May 30 2017

A173021 Number of numbers <= n whose binary representation is without isolated ones or isolated double ones.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 9, 9, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11
Offset: 0

Views

Author

Reinhard Zumkeller, Feb 07 2010

Keywords

Examples

			a(30) = #{0, 7, 14, 15, 28, 30} = #{0, 111, 1110, 1111, 11100, 11110} = 6.
		

Crossrefs

Programs

  • Mathematica
    ioQ[n_]:=Module[{idn2=Split[IntegerDigits[n,2]]},FreeQ[idn2,{1}]&&FreeQ[ idn2,{1,1}]]; Accumulate[Table[If[ioQ[n],1,0],{n,0,90}]] (* Harvey P. Dale, May 15 2016 *)

Formula

a(A173024(n+1)) = a(A173024(n)) + 1.
a(2^n - 1) = A005252(n+1).
a(n) <= A173022(n) <= A173023(n).

A348289 a(n) = Sum_{k=0..floor(n/8)} binomial(n-4*k,4*k).

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 2, 6, 16, 36, 71, 127, 211, 331, 497, 725, 1047, 1531, 2316, 3668, 6064, 10312, 17717, 30309, 51165, 84893, 138417, 222329, 353285, 558253, 881918, 1399274, 2236480, 3604588, 5853067, 9553715, 15631615, 25570103, 41734433, 67889133, 110035211, 177778263
Offset: 0

Views

Author

Seiichi Manyama, Oct 10 2021

Keywords

Crossrefs

Programs

  • PARI
    a(n) = sum(k=0, n\8, binomial(n-4*k, 4*k));
    
  • PARI
    my(N=66, x='x+O('x^N)); Vec((1-x)^3/((1-x)^4-x^8))

Formula

G.f.: (1-x)^3/((1-x)^4 - x^8).
a(n) = 4*a(n-1) - 6*a(n-2) + 4*a(n-3) - a(n-4) + a(n-8).
Showing 1-10 of 18 results. Next