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 11-20 of 126 results. Next

A287819 Number of nonary sequences of length n such that no two consecutive terms have distance 4.

Original entry on oeis.org

1, 9, 71, 561, 4433, 35031, 276827, 2187585, 17287073, 136608591, 1079529611, 8530826457, 67413620993, 532726379847, 4209793089371, 33267280400913, 262889866978817, 2077449112980255, 16416740845208075, 129730917736941417, 1025179795159015841
Offset: 0

Views

Author

David Nacin, Jun 02 2017

Keywords

Examples

			For n=2 the a(2) = 81 - 10 = 71 sequences contain every combination except these ten: 04,40,15,51,26,62,37,73,48,84.
		

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{8, 1, -14}, {1, 9, 71, 561}, 40]
  • Python
    def a(n):
        if n in [0, 1, 2, 3]:
            return [1, 9, 71, 561][n]
        return 8*a(n-1)+a(n-2)-14*a(n-3)

Formula

For n>2, a(n) = 8*a(n-1) + a(n-2) - 14*a(n-3), a(0)=1, a(1)=9, a(2)=71, a(3)=561.
G.f.: (1 + x - 2 x^2 - 2 x^3)/(1 - 8 x - x^2 + 14 x^3).

A292480 p-INVERT of the odd positive integers, where p(S) = 1 - S^2.

Original entry on oeis.org

0, 1, 6, 20, 56, 160, 480, 1456, 4384, 13136, 39360, 118064, 354272, 1062928, 3188736, 9565936, 28697632, 86093264, 258280512, 774841520, 2324523104, 6973567888, 20920705152, 62762119792, 188286360736, 564859074896, 1694577214656, 5083731648560
Offset: 0

Views

Author

Clark Kimberling, Oct 02 2017

Keywords

Comments

Suppose s = (c(0), c(1), c(2), ...) is a sequence and p(S) is a polynomial. Let S(x) = c(0)*x + c(1)*x^2 + c(2)*x^3 + ... and T(x) = (-p(0) + 1/p(S(x)))/x. The p-INVERT of s is the sequence t(s) of coefficients in the Maclaurin series for T(x). Taking p(S) = 1 - S gives the "INVERT" transform of s, so that p-INVERT is a generalization of the "INVERT" transform (e.g., A033453).
In the following guide to p-INVERT sequences using s = (1,3,5,7,9,...) = A005408, in some cases t(1,3,5,7,9,...) is a shifted (or differently indexed) version of the cited sequence:
p(S) *********** t(1,3,5,7,9,...)
1 - S A003946
1 - S^2 A292480
1 - S^3 (not yet in OEIS)
(1 - S)^2 (not yet in OEIS)
(1 - S)^3 (not yet in OEIS)
1 - S - S^2 A289786
1 + S - S^2 A289484
1 - S - 2 S^2 A289785
1 - S - 3 S^2 A289786
1 - S - 4 S^2 A289787
1 - S - 5 S^2 A289788
1 - S - 6 S^2 A289789
1 - S - 7 S^2 A289790
1 + S - 2 S^2 A289791
1 - S + S^2 - S^3 A289792
1 + S - 3 S^2 A289793
1 - S - S^2 - S^3 A289794

Examples

			s = (1,3,5,7,9,...), S(x) = x + 3 x^2 + 5 x^3 + 7 x^4 + ...,
p(S(x)) = 1 - ( x + 3 x^2 + 5 x^3 + 7 x^4 + ...)^2,
1/p(S(x)) = 1 + x^2 + 6 x^3 + 20 x^4 + 56 x^5 + ...
T(x) = (-1 + 1/p(S(x)))/x = x + 6 x^2 + 20 x^3 + 56 x^4 + ...
t(s) = (0,1,2,20,56,...).
		

Crossrefs

Programs

  • Magma
    I:=[0,1,6,20]; [n le 4 select I[n] else 4*Self(n-1)- 5*Self(n-2)+6*Self(n-3): n in [1..30]]; // Vincenzo Librandi, Oct 03 2017
  • Mathematica
    z = 60; s = x (x + 1)/(1 - x)^2; p = 1 - s^2;
    Drop[CoefficientList[Series[s, {x, 0, z}], x], 1] (* A005408 *)
    Drop[CoefficientList[Series[1/p, {x, 0, z}], x], 1]  (* A292480 *)
    Join[{0}, LinearRecurrence[{4, -5, 6}, {1, 6, 20}, 30]] (* Vincenzo Librandi, Oct 03 2017 *)

Formula

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

A287825 Number of sequences over the alphabet {0,1,...,9} such that no two consecutive terms have distance 1.

Original entry on oeis.org

1, 10, 82, 674, 5540, 45538, 374316, 3076828, 25291120, 207889674, 1708825732, 14046322404, 115458919774, 949057110644, 7801124426174, 64124215108032, 527092600834054, 4332631742719370, 35613662169258228, 292739611493034596, 2406281042646218328
Offset: 0

Views

Author

David Nacin, Jun 02 2017

Keywords

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{9, -4, -21, 9, 5}, {1, 10, 82, 674, 5540, 45538}, 40]
  • Python
    def a(n):
        if n in [0, 1, 2, 3, 4, 5]:
            return [1, 10, 82, 674, 5540, 45538][n]
        return 9*a(n-1) - 4*a(n-2) - 21*a(n-3) + 9*a(n-4) + 5*a(n-5)

Formula

For n>5, a(n) = 9*a(n-1) - 4*a(n-2) - 21*a(n-3) + 9*a(n-4) + 5*a(n-5), a(0)=1, a(1)=10, a(2)=82, a(3)=674, a(4)=5540, a(5)=45538.
G.f.: (-1 - x + 4*x^2 + 3*x^3 - 3*x^4 - x^5)/(-1 + 9*x - 4*x^2 - 21*x^3 + 9*x^4 + 5*x^5).

A155116 a(n) = 3*a(n-1) + 3*a(n-2), n>2, a(0)=1, a(1)=2, a(2)=8.

Original entry on oeis.org

1, 2, 8, 30, 114, 432, 1638, 6210, 23544, 89262, 338418, 1283040, 4864374, 18442242, 69919848, 265086270, 1005018354, 3810313872, 14445996678, 54768931650, 207644784984, 787241149902, 2984657804658, 11315696863680, 42901064005014
Offset: 0

Views

Author

Philippe Deléham, Jan 20 2009

Keywords

Comments

From Johannes W. Meijer, Aug 14 2010: (Start)
A berserker sequence, see A180140 and A180147. For the central square 16 A[5] vectors with decimal values between 3 and 384 lead to this sequence. These vectors lead for the corner squares to A123620 and for the side squares to A180142.
This sequence belongs to a family of sequences with GF(x)=(1-(2*k-1)*x-k*x^2)/(1-3*x+(k-4)*x^2). Berserker sequences that are members of this family are A000007 (k=2), A155116 (k=1; this sequence), A000302 (k=0), 6*A179606 (k=-1; with leading 1 added) and 2*A180141 (k=-2; n>=1 and a(0)=1). Some other members of this family are (-2)*A003688 (k=3; with leading 1 added), (-4)*A003946 (k=4; with leading 1 added), (-6)*A002878 (k=5; with leading 1 added) and (-8)*A033484 (k=6; with leading 1 added).
Inverse binomial transform of A101368 (without the first leading 1).
(End)

Crossrefs

Sequences of the form a(n) = m*(a(n-1) + a(n-2)) with a(0)=1, a(1) = m-1, a(2) = m^2 -1: A155020 (m=2), this sequence (m=3), A155117 (m=4), A155119 (m=5), A155127 (m=6), A155130 (m=7), A155132 (m=8), A155144 (m=9), A155157 (m=10).

Programs

  • Magma
    m:=3; [1] cat [n le 2 select (m-1)*(m*n-(m-1)) else m*(Self(n-1) + Self(n-2)): n in [1..30]]; // G. C. Greubel, Mar 25 2021
    
  • Mathematica
    With[{m=3}, LinearRecurrence[{m, m}, {1, m-1, m^2-1}, 30]] (* G. C. Greubel, Mar 25 2021 *)
  • PARI
    Vec((1-x-x^2)/(1-3*x-3*x^2)+O(x^99)) \\ Charles R Greathouse IV, Jan 12 2012
    
  • Sage
    m=3; [1]+[-(m-1)*(sqrt(m)*i)^(n-2)*chebyshev_U(n, -sqrt(m)*i/2) for n in (1..30)] # G. C. Greubel, Mar 25 2021

Formula

G.f.: (1-x-x^2)/(1-3*x-3*x^2).
a(n) = 2*A125145(n-1), n>=1 .
a(n) = ( (2+4*A)*A^(-n-1) + (2+4*B)*B^(-n-1) )/21 with A=(-3+sqrt(21))/6 and B=(-3-sqrt(21))/6 for n>=1 with a(0)=1. [corrected by Johannes W. Meijer, Aug 12 2010]
Contribution from Johannes W. Meijer, Aug 14 2010: (Start)
a(n) = A123620(n)/2 for n>=1.
(End)
a(n) = (1/3)*[n=0] - 2*(sqrt(3)*i)^(n-2)*ChebyshevU(n, -sqrt(3)*i/2). - G. C. Greubel, Mar 25 2021

A141725 a(n) = 4^(n+1) - 3.

Original entry on oeis.org

1, 13, 61, 253, 1021, 4093, 16381, 65533, 262141, 1048573, 4194301, 16777213, 67108861, 268435453, 1073741821, 4294967293, 17179869181, 68719476733, 274877906941, 1099511627773, 4398046511101, 17592186044413, 70368744177661
Offset: 0

Views

Author

Paul Curtz, Sep 13 2008

Keywords

Comments

Inverse binomial transform yields A003946 with A003946(1)=4 deleted. - R. J. Mathar, Sep 13 2008
Starting with n=1, binary numbers of the form 1X01 where X is an odd number of 1's. - Brad Clardy, Mar 22 2011
Column 4 of A193871. - Omar E. Pol, Aug 22 2011
The Sierpinski square curve is a representation of this sequence, where a(n) is the number squares filled by the Sierpinski (space-filling) square curve. The square footprint expands at a rate of (2^n-1)^2 (A000225)^2. The number of nodes per iteration grows at a rate of (4^n-1)/3 (A002450). See illustration in links. - John Elias, Jul 25 2022

Crossrefs

Programs

Formula

a(n) = 10*A001045(2*n) + A001045(2*n+1).
a(n) = 4*a(n-1) + 9 for n > 0, a(0) = 1.
a(n) = A036563(2*n+2).
G.f.: (1 + 8*x)/((1 - x)*(1 - 4*x)). - R. J. Mathar, Sep 13 2008
a(n) = 4^n - 3, with offset 1. - Omar E. Pol, Aug 22 2011
a(n) = 5*a(n-1) - 4*a(n-2) for n > 1, a(0) = 1, a(1) = 13. - Harvey P. Dale, Sep 25 2011
E.g.f.: exp(4*x) - 3*exp(x). - Elmo R. Oliveira, Nov 15 2023

Extensions

Edited by N. J. A. Sloane, Sep 13 2008
More terms from R. J. Mathar, Sep 13 2008

A276299 T(n,k)=Number of nXk 0..2 arrays with no element equal to any value at offset (-2,-1) (-1,1) or (0,-1) and new values introduced in order 0..2.

Original entry on oeis.org

1, 1, 2, 2, 4, 5, 4, 12, 11, 14, 8, 36, 45, 31, 41, 16, 108, 173, 189, 88, 122, 32, 324, 693, 1017, 805, 250, 365, 64, 972, 2765, 5909, 5965, 3437, 710, 1094, 128, 2916, 11061, 33461, 50949, 34865, 14693, 2016, 3281, 256, 8748, 44237, 191289, 408105, 442001
Offset: 1

Views

Author

R. H. Hardin, Aug 28 2016

Keywords

Comments

Table starts
....1.....1.......2........4..........8...........16............32
....2.....4......12.......36........108..........324...........972
....5....11......45......173........693.........2765.........11061
...14....31.....189.....1017.......5909........33461........191289
...41....88.....805.....5965......50949.......408105.......3363533
..122...250....3437....34865.....442001......4988145......59728757
..365...710...14693...203933....3861469.....61239977....1073114625
.1094..2016...62829..1192701...33851605....752660245...19398127957
.3281..5724..268677..6974781..297360321...9254592049..352134188049
.9842.16252.1148973.40786925.2615328377.113817204341.6411366745009

Examples

			Some solutions for n=4 k=4
..0..1..0..2. .0..1..2..0. .0..1..0..1. .0..1..0..1. .0..1..0..1
..0..1..0..1. .2..1..2..1. .0..1..2..1. .0..1..0..1. .0..1..0..2
..0..2..0..1. .2..1..2..0. .2..1..0..1. .2..1..2..1. .0..2..0..2
..0..1..0..2. .0..1..2..0. .0..1..2..0. .0..1..0..1. .1..2..0..1
		

Crossrefs

Column 1 is A007051(n-1).
Row 1 is A000079(n-2).
Row 2 is A003946(n-1).

Formula

Empirical for column k:
k=1: a(n) = 4*a(n-1) -3*a(n-2)
k=2: a(n) = 4*a(n-1) -4*a(n-2) +2*a(n-3) for n>4
k=3: a(n) = 6*a(n-1) -8*a(n-2) +4*a(n-3) -7*a(n-4) +6*a(n-5) for n>7
k=4: [order 11] for n>13
k=5: [order 33] for n>37
k=6: [order 70] for n>75
Empirical for row n:
n=1: a(n) = 2*a(n-1) for n>2
n=2: a(n) = 3*a(n-1) for n>2
n=3: a(n) = 4*a(n-1) +a(n-2) -4*a(n-3) for n>4
n=4: a(n) = 4*a(n-1) +10*a(n-2) -6*a(n-4) -22*a(n-5) +15*a(n-6) for n>8
n=5: [order 15] for n>17
n=6: [order 30] for n>32
n=7: [order 59] for n>61

A224158 T(n,k)=Number of nXk 0..1 arrays with diagonals and rows unimodal and antidiagonals nondecreasing.

Original entry on oeis.org

2, 4, 4, 7, 12, 8, 11, 28, 36, 16, 16, 56, 89, 108, 32, 22, 101, 187, 281, 324, 64, 29, 169, 373, 574, 900, 972, 128, 37, 267, 702, 1156, 1783, 2935, 2916, 256, 46, 403, 1252, 2271, 3469, 5657, 9681, 8748, 512, 56, 586, 2130, 4339, 6786, 10562, 18408, 32020, 26244
Offset: 1

Views

Author

R. H. Hardin Mar 31 2013

Keywords

Comments

Table starts
....2.....4......7.....11......16......22......29......37.......46.......56
....4....12.....28.....56.....101.....169.....267.....403......586......826
....8....36.....89....187.....373.....702....1252....2130.....3479.....5486
...16...108....281....574....1156....2271....4339....8008....14257....24519
...32...324....900...1783....3469....6786...13283...25624....48339....88755
...64...972...2935...5657...10562...20065...39037...76393...148637...284937
..128..2916...9681..18408...32910...60214..114537..222841...437497...857104
..256..8748..32020..61140..105020..184233..340134..650819..1271950..2506424
..512.26244.105937.205390..342575..575410.1025559.1918648..3705824..7278086
.1024.78732.350311.694018.1136503.1833641.3143071.5721195.10873402.21181267

Examples

			Some solutions for n=3 k=4
..0..0..0..0....1..1..0..0....0..0..1..0....0..1..1..0....0..0..1..0
..0..0..0..0....1..0..0..0....1..1..0..0....1..1..1..1....1..1..1..0
..0..0..1..0....0..0..0..0....1..1..1..0....1..1..1..1....1..1..1..1
		

Crossrefs

Column 1 is A000079
Column 2 is A003946
Row 1 is A000124
Row 2 is A223764

Formula

Empirical: columns k=1..7 have recurrences of order 1,1,9,13,20,24,33 for n>0,0,0,14,22,27,37
Empirical: rows n=1..7 are polynomials of degree 2*n for k>0,0,2,4,6,8,10

A224409 T(n,k)=Number of nXk 0..1 arrays with rows unimodal and antidiagonals nondecreasing.

Original entry on oeis.org

2, 4, 4, 7, 12, 8, 11, 28, 36, 16, 16, 56, 100, 108, 32, 22, 101, 228, 358, 324, 64, 29, 169, 465, 884, 1288, 972, 128, 37, 267, 879, 1928, 3436, 4636, 2916, 256, 46, 403, 1568, 3902, 7812, 13440, 16684, 8748, 512, 56, 586, 2668, 7490, 16420, 31710, 52700, 60040
Offset: 1

Views

Author

R. H. Hardin Apr 05 2013

Keywords

Comments

Table starts
....2.....4......7......11......16.......22.......29.......37........46
....4....12.....28......56.....101......169......267......403.......586
....8....36....100.....228.....465......879.....1568.....2668......4362
...16...108....358.....884....1928.....3902.....7490....13784.....24467
...32...324...1288....3436....7812....16420....32814....63202....118117
...64...972...4636...13440...31710....68282...139638...275766....530583
..128..2916..16684...52700..129402...284254...590254..1183226...2313915
..256..8748..60040..206708..529846..1187830..2496332..5055858...9988498
..512.26244.216064..810664.2172346..4979464.10583872.21606456..42996954
.1024.78732.777544.3178940.8908986.20913026.44986080.92478100.185065944

Examples

			Some solutions for n=3 k=4
..0..0..0..0....0..1..0..0....0..0..1..1....0..0..0..1....1..1..0..0
..0..0..0..1....1..0..0..0....1..1..1..1....1..1..1..1....1..0..0..0
..1..1..1..0....0..0..1..1....1..1..1..1....1..1..1..1....0..0..1..1
		

Crossrefs

Column 1 is A000079
Column 2 is A003946
Row 1 is A000124
Row 2 is A223764

Formula

Empirical: columns k=1..7 have recurrences of order 1,1,3,4,5,6,7 for n>0,0,0,0,0,7,8
Empirical: rows n=1..7 are polynomials of degree 2*n for k>0,0,0,2,3,4,5

A264490 T(n,k)=Number of (n+1)X(k+1) arrays of permutations of 0..(n+1)*(k+1)-1 with each element having directed index change 2,-1 1,0 2,1 0,-1 -2,-2 or -1,0.

Original entry on oeis.org

1, 1, 3, 1, 1, 4, 1, 10, 12, 12, 1, 8, 36, 16, 25, 1, 35, 108, 212, 214, 52, 1, 42, 324, 788, 2144, 324, 121, 1, 130, 972, 4772, 21466, 9714, 2960, 261, 1, 194, 2916, 23076, 217049, 142352, 92052, 6442, 576, 1, 501, 8748, 122628, 2186741, 2517024, 2870927, 581575
Offset: 1

Views

Author

R. H. Hardin, Nov 14 2015

Keywords

Comments

Table starts
....1......1........1..........1...........1...........1...........1
....3......1.......10..........8..........35..........42.........130
....4.....12.......36........108.........324.........972........2916
...12.....16......212........788........4772.......23076......122628
...25....214.....2144......21466......217049.....2186741....22085009
...52....324.....9714.....142352.....2517024....42169152...714303376
..121...2960....92052....2870927....89130069..2775259622.86190450233
..261...6442...581575...30309632..1749889912.98973991195
..576..42656..4510937..463508815.47485981944
.1280.113575.31398740.5517128232

Examples

			Some solutions for n=4 k=4
..5..6..7..8..9....5..6..7..4..9....5..6..7..8..9....5..2..7..8..9
..0.11..2.13.14...10.11.12.13.14...10.11..2.13..4....0.11.12..3..4
.22.16..1..4..3...22..0..1..2..3...22..0..1.14..3...22.16..1.18.19
.20.21.18.23.24...20.21..8.23.24...20.21.18.23.24...20.21..6.23.14
.15.10.17.12.19...15.16.17.18.19...15.16.17.12.19...15.10.17.24.13
		

Crossrefs

Row 3 is A003946.

Formula

Empirical for column k:
k=1: a(n) = 2*a(n-1) +a(n-3) -2*a(n-4) +4*a(n-5) +a(n-6) -a(n-9)
k=2: [order 36]
Empirical for row n:
n=1: a(n) = a(n-1)
n=2: a(n) = 3*a(n-2) +2*a(n-3) +a(n-4) -a(n-5)
n=3: a(n) = 3*a(n-1)
n=4: a(n) = a(n-1) +16*a(n-2) +24*a(n-3) +16*a(n-4) +32*a(n-5) +32*a(n-6)
n=5: [order 39]
n=6: [order 10] for n>11

A264878 T(n,k)=Number of (n+1)X(k+1) arrays of permutations of 0..(n+1)*(k+1)-1 with each element having directed index change 0,1 0,-1 -2,0 or 1,1.

Original entry on oeis.org

1, 0, 1, 1, 0, 1, 0, 1, 0, 2, 1, 1, 5, 0, 3, 0, 7, 4, 20, 0, 4, 1, 20, 65, 12, 56, 0, 5, 0, 49, 228, 572, 36, 137, 0, 6, 1, 175, 1101, 2348, 3613, 108, 295, 0, 8, 0, 323, 4832, 22152, 22400, 19372, 324, 709, 0, 11, 1, 1085, 18501, 129230, 356692, 207424, 103585, 972, 1983, 0
Offset: 1

Views

Author

R. H. Hardin, Nov 27 2015

Keywords

Comments

Table starts
..1.0....1....0........1..........0............1..............0
..1.0....1....1........7.........20...........49............175
..1.0....5....4.......65........228.........1101...........4832
..2.0...20...12......572.......2348........22152.........129230
..3.0...56...36.....3613......22400.......356692........3303808
..4.0..137..108....19372.....207424......4747695.......78535556
..5.0..295..324...103585....1946752.....68488297.....1924357508
..6.0..709..972...629654...18265856...1050281271....47123513432
..8.0.1983.2916..3930725..171168256..16268725036..1152731721920
.11.0.5280.8748.23940621.1602206720.247512489984.28078658475952

Examples

			Some solutions for n=4 k=4
..1..2..3..4.14...10..2.12..4.14....1..2.12..4.14...10..2..3..4.14
.15..0..8..9.19....6..0..1..9..3...15..0..8..9..3....6..0..1..9.19
.20..5..6..7.24...20..5.22..7..8...20..5..6..7.24...20..5.22..7..8
.16.10.11.12.13...16.17.11.19.13...16.10.11.19.13...16.17.11.12.13
.21.22.23.17.18...21.15.23.24.18...21.22.23.17.18...21.15.23.24.18
		

Crossrefs

Column 1 is A003520(n+1).
Column 4 is A003946(n-2).

Formula

Empirical for column k:
k=1: a(n) = a(n-1) +a(n-5)
k=2: a(n) = a(n-1)
k=3: [order 45]
k=4: a(n) = 3*a(n-1) for n>3
Empirical for row n:
n=1: a(n) = a(n-2)
n=2: [order 20]
n=3: [order 46]
Previous Showing 11-20 of 126 results. Next