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 10 results.

A297395 T(n,k)=Number of nXk 0..1 arrays with every 1 horizontally, diagonally or antidiagonally adjacent to 1 neighboring 1.

Original entry on oeis.org

1, 2, 1, 3, 5, 1, 4, 9, 9, 1, 6, 13, 19, 20, 1, 9, 33, 37, 57, 41, 1, 13, 69, 127, 126, 139, 85, 1, 19, 121, 323, 700, 385, 369, 178, 1, 28, 253, 763, 2569, 3175, 1243, 963, 369, 1, 41, 529, 2121, 7779, 14940, 15541, 3924, 2489, 769, 1, 60, 1013, 5557, 31081, 58901, 99682
Offset: 1

Views

Author

R. H. Hardin, Dec 29 2017

Keywords

Comments

Table starts
.1...2....3.....4.......6........9........13.........19...........28
.1...5....9....13......33.......69.......121........253..........529
.1...9...19....37.....127......323.......763.......2121.........5557
.1..20...57...126.....700.....2569......7779......31081.......117084
.1..41..139...385....3175....14940.....58901.....325922......1616869
.1..85..369..1243...15541....99682....514945....3977868.....27131403
.1.178..963..3924...74736...640562...4279111...46261441....428200086
.1.369.2489.12477..358341..4101278..35870939..540319235...6780786267
.1.769.6523.39625.1729617.26607999.302197213.6362528482.108762242579

Examples

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

Crossrefs

Column 2 is A105309(n+1).
Row 1 is A000930(n+1).
Row 2 is A089977(n+1).

Formula

Empirical for column k:
k=1: a(n) = a(n-1)
k=2: a(n) = a(n-1) +2*a(n-2) +a(n-3) -a(n-4)
k=3: a(n) = a(n-1) +4*a(n-2) +2*a(n-3) -4*a(n-4)
k=4: a(n) = a(n-1) +6*a(n-2) +4*a(n-3) -3*a(n-4) -a(n-5) -2*a(n-6) -a(n-7)
k=5: [order 20]
k=6: [order 25]
k=7: [order 55]
Empirical for row n:
n=1: a(n) = a(n-1) +a(n-3)
n=2: a(n) = a(n-1) +4*a(n-3)
n=3: a(n) = a(n-1) +a(n-2) +8*a(n-3) +a(n-4) -2*a(n-6)
n=4: [order 8]
n=5: [order 21]
n=6: [order 31]
n=7: [order 69]

A297595 T(n,k) = Number of n X k 0..1 arrays with every 1 horizontally, diagonally or antidiagonally adjacent to 1 or 5 neighboring 1s.

Original entry on oeis.org

1, 2, 1, 3, 5, 1, 4, 9, 9, 1, 6, 13, 25, 20, 1, 9, 33, 49, 69, 41, 1, 13, 69, 145, 154, 205, 85, 1, 19, 121, 443, 752, 577, 597, 178, 1, 28, 253, 1141, 3145, 3747, 1977, 1701, 369, 1, 41, 529, 3009, 10131, 23066, 18577, 6962, 4949, 769, 1, 60, 1013, 8455, 37929, 103673
Offset: 1

Views

Author

R. H. Hardin, Jan 01 2018

Keywords

Comments

Table starts
.1...2.....3.....4.......6........9........13..........19...........28
.1...5.....9....13......33.......69.......121.........253..........529
.1...9....25....49.....145......443......1141........3009.........8455
.1..20....69...154.....752.....3145.....10131.......37929.......150388
.1..41...205...577....3747....23066....103673......514290......2834897
.1..85...597..1977...18577...163704....975485.....6551844.....50398161
.1.178..1701..6962...93150..1172288...9403199....85828150....919035936
.1.369..4949.24441..464697..8419996..90862063..1120526916..16723808887
.1.769.14389.85803.2320289.60354437.875241087.14592832760.303459238317

Examples

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

Crossrefs

Column 2 is A105309(n+1).
Row 1 is A000930(n+1).
Row 2 is A089977(n+1).

Formula

Empirical for column k:
k=1: a(n) = a(n-1)
k=2: a(n) = a(n-1) +2*a(n-2) +a(n-3) -a(n-4)
k=3: a(n) = a(n-1) +2*a(n-2) +10*a(n-3) +4*a(n-4) -8*a(n-5) -8*a(n-6)
k=4: [order 9]
k=5: [order 22]
k=6: [order 40]
k=7: [order 83]
Empirical for row n:
n=1: a(n) = a(n-1) +a(n-3)
n=2: a(n) = a(n-1) +4*a(n-3)
n=3: a(n) = a(n-1) +a(n-2) +8*a(n-3) +7*a(n-4) -8*a(n-6) -6*a(n-7)
n=4: [order 12]
n=5: [order 26]
n=6: [order 49]

A183450 T(n,k)=Number of nXk binary arrays with every 1 having exactly two king-move neighbors equal to 1.

Original entry on oeis.org

1, 1, 1, 1, 5, 1, 1, 9, 9, 1, 1, 13, 18, 13, 1, 1, 33, 30, 30, 33, 1, 1, 69, 107, 72, 107, 69, 1, 1, 121, 265, 283, 283, 265, 121, 1, 1, 253, 553, 831, 2054, 831, 553, 253, 1, 1, 529, 1505, 2399, 9208, 9208, 2399, 1505, 529, 1, 1, 1013, 3852, 7761, 34867, 53608, 34867, 7761
Offset: 1

Views

Author

R. H. Hardin Jan 04 2011

Keywords

Comments

Table starts
.1....1....1.....1.......1........1..........1...........1............1
.1....5....9....13......33.......69........121.........253..........529
.1....9...18....30.....107......265........553........1505.........3852
.1...13...30....72.....283......831.......2399........7761........23840
.1...33..107...283....2054.....9208......34867......176949.......833001
.1...69..265...831....9208....53608.....257733.....1817225.....11414889
.1..121..553..2399...34867...257733....1744887....16192521....132651622
.1..253.1505..7761..176949..1817225...16192521...216103851...2491241396
.1..529.3852.23840..833001.11414889..132651622..2491241396..39184763856
.1.1013.8922.72396.3619285.65073225.1038281076.26807184942.568464533358

Examples

			Some solutions for 6X5
..0..1..0..0..0....1..1..0..1..1....1..1..0..0..1....0..0..0..1..1
..1..0..1..0..0....0..1..0..1..0....1..0..0..1..1....0..0..0..1..0
..1..0..1..0..0....0..0..0..0..0....0..0..0..0..0....0..1..0..0..0
..1..0..0..1..0....0..0..1..1..0....0..0..0..1..1....1..0..1..0..0
..0..1..0..1..0....0..1..0..0..1....1..1..0..0..1....1..0..1..0..0
..0..0..1..0..0....0..0..1..1..0....1..0..0..0..0....0..1..0..0..0
		

Crossrefs

Column 2 is A089977(n+1)

A296128 T(n,k)=Number of nXk 0..1 arrays with each 1 adjacent to 2 or 5 king-move neighboring 1s.

Original entry on oeis.org

1, 1, 1, 1, 5, 1, 1, 9, 9, 1, 1, 13, 18, 13, 1, 1, 33, 30, 30, 33, 1, 1, 69, 107, 74, 107, 69, 1, 1, 121, 265, 287, 287, 265, 121, 1, 1, 253, 553, 841, 2098, 841, 553, 253, 1, 1, 529, 1505, 2463, 9344, 9344, 2463, 1505, 529, 1, 1, 1013, 3852, 7953, 35733, 54286, 35733, 7953
Offset: 1

Views

Author

R. H. Hardin, Dec 05 2017

Keywords

Comments

Table starts
.1...1....1.....1......1........1.........1..........1...........1............1
.1...5....9....13.....33.......69.......121........253.........529.........1013
.1...9...18....30....107......265.......553.......1505........3852.........8922
.1..13...30....74....287......841......2463.......7953.......24428........74660
.1..33..107...287...2098.....9344.....35733.....182881......859151......3752449
.1..69..265...841...9344....54286....263489....1867837....11720327.....67180741
.1.121..553..2463..35733...263489...1810441...16855693...138016847...1087543621
.1.253.1505..7953.182881..1867837..16855693..227074899..2614792001..28292082465
.1.529.3852.24428.859151.11720327.138016847.2614792001.41069612676.599261543598

Examples

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

Crossrefs

Column 2 is A089977(n+1).
Column 3 is A183444.

Formula

Empirical for column k:
k=1: a(n) = a(n-1)
k=2: a(n) = a(n-1) +4*a(n-3)
k=3: a(n) = 2*a(n-1) -a(n-2) +8*a(n-3) -7*a(n-4) +2*a(n-5) -2*a(n-6)
k=4: [order 9]
k=5: [order 39]

A097334 a(n) = Sum_{k=0..n} C(n-k, floor(k/2))*2^k.

Original entry on oeis.org

1, 3, 3, 7, 19, 31, 59, 135, 259, 495, 1035, 2071, 4051, 8191, 16475, 32679, 65443, 131343, 262059, 523831, 1049203, 2097439, 4192763, 8389575, 16779331, 33550383, 67108683, 134226007, 268427539, 536862271, 1073766299, 2147476455
Offset: 0

Views

Author

Paul Barry, Aug 05 2004

Keywords

Crossrefs

Programs

  • Mathematica
    Table[Sum[Binomial[n-k,Floor[k/2]]2^k,{k,0,n}],{n,0,40}] (* or *) LinearRecurrence[{1,0,4},{1,3,3},40] (* Harvey P. Dale, May 17 2021 *)

Formula

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

A113726 A Jacobsthal convolution.

Original entry on oeis.org

1, 0, 1, 4, 5, 8, 25, 44, 77, 176, 353, 660, 1365, 2776, 5417, 10876, 21981, 43648, 87153, 175076, 349669, 698280, 1398585, 2797260, 5590381, 11184720, 22373761, 44735284, 89474165, 178969208, 357910345, 715807004, 1431683837, 2863325216
Offset: 0

Views

Author

Paul Barry, Nov 08 2005

Keywords

Comments

Convolution of A001045(n+1) and A001607(n+1).

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{0,1,4,4},{1,0,1,4},40] (* Harvey P. Dale, Apr 30 2025 *)

Formula

G.f.: 1/((1-x-2*x^2)*(1+x+2*x^2)).
a(n) = a(n-2) + 4*a(n-3) + 4*a(n-4).
a(n) = Sum_{k=0..floor(n/2)} C(n-k, k)*2^k*(1+(-1)^(n-k))/2.
a(n) = 2^n/3 + (-1)^n/6 + A001607(n+1)/2. - R. J. Mathar, Aug 23 2011
a(n) = sum(A128099(n, n-2*k), k=0..floor(n/2)). - Johannes W. Meijer, Aug 28 2013

A122946 a(0)=a(1)=0, a(2)=2; for n >= 3, a(n) = a(n-1) + 4*a(n-3).

Original entry on oeis.org

0, 0, 2, 2, 2, 10, 18, 26, 66, 138, 242, 506, 1058, 2026, 4050, 8282, 16386, 32586, 65714, 131258, 261602, 524458, 1049490, 2095898, 4193730, 8391690, 16775282, 33550202, 67116962, 134218090, 268418898, 536886746, 1073759106, 2147434698, 4294981682, 8590018106
Offset: 0

Views

Author

Benoit Cloitre, Oct 24 2006

Keywords

Comments

See lemma 5.2 of Reznick's preprint.
Conjecture: count of even Markov numbers in generation n (with generations 0, 1 and 2 labeled as {5}, {13, 29} and {34, 194, 433, 169}. (Checked up to generation 20.) - Wouter Meeussen, Jan 16 2024
Wouter Meeussen's conjecture is true. Proof: label the Markov tree with Markov triples according to the scheme described at A368546. Mod 2, the triples are: row 0: (1,1,0); row 1: (1,1,1), (1,1,0); row 2: (1,0,1), (1,0,1), (1,1,1), (1,1,0); row 3: (1,1,0), (0,1,1), (1,1,0), (0,1,1), (1,0,1), (1,0,1), (1,1,1), (1,1,0); etc. Note that the Markov number labels of the tree (the center numbers of the triples) in rows 0 and 1 include no even numbers, while those in row 2 include two even numbers. Observing that the second triple in row 1 and the first four triples in row 3 are the same or the reverse of the root triple, and noting that every vertex in row 3 and beyond is in a subtree with one of these triples as root, the recurrence follows. - William P. Orrick, Mar 05 2024

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{1,0,4},{0,0,2},36] (* James C. McMahon, Jan 16 2024 *)
  • PARI
    a0=a1=0;a2=2;for(n=3,50,a3=a2+4*a0;a0=a1;a1=a2;a2=a3;print1(a3,","))

Formula

a(n) = (1/7)*2^(-2 + n/2)*(7*2^(n/2) - 7*cos(n*(Pi - arctan(sqrt(7)))) + 5*sqrt(7)*sin(n*(-Pi + arctan(sqrt(7))))). - Zak Seidov, Oct 26 2006
G.f.: 2*x^2 / ((1-2*x)*(2*x^2+x+1)). - Colin Barker, Jun 20 2013
a(n) = 2 * A089977(n-2) for n >= 2. - Alois P. Heinz, Jan 16 2024
From A.H.M. Smeets, Jan 16 2024: (Start)
Limit_{n -> oo} a(n)/a(n-1) = 2.
a(n) = 2^(n-2) + A110512(n-2), for n >= 2. (End)

Extensions

Entries checked by Zak Seidov, Oct 26 2006

A193515 T(n,k) = number of ways to place any number of 3X1 tiles of k distinguishable colors into an nX1 grid.

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 1, 1, 3, 3, 1, 1, 4, 5, 4, 1, 1, 5, 7, 7, 6, 1, 1, 6, 9, 10, 13, 9, 1, 1, 7, 11, 13, 22, 23, 13, 1, 1, 8, 13, 16, 33, 43, 37, 19, 1, 1, 9, 15, 19, 46, 69, 73, 63, 28, 1, 1, 10, 17, 22, 61, 101, 121, 139, 109, 41, 1, 1, 11, 19, 25, 78, 139, 181, 253, 268, 183, 60, 1, 1, 12
Offset: 1

Views

Author

R. H. Hardin, with proof and formula from Robert Israel in the Sequence Fans Mailing List, Jul 29 2011

Keywords

Comments

Table starts:
..1...1...1...1...1....1....1....1....1....1....1....1.....1.....1.....1.....1
..1...1...1...1...1....1....1....1....1....1....1....1.....1.....1.....1.....1
..2...3...4...5...6....7....8....9...10...11...12...13....14....15....16....17
..3...5...7...9..11...13...15...17...19...21...23...25....27....29....31....33
..4...7..10..13..16...19...22...25...28...31...34...37....40....43....46....49
..6..13..22..33..46...61...78...97..118..141..166..193...222...253...286...321
..9..23..43..69.101..139..183..233..289..351..419..493...573...659...751...849
.13..37..73.121.181..253..337..433..541..661..793..937..1093..1261..1441..1633
.19..63.139.253.411..619..883.1209.1603.2071.2619.3253..3979..4803..5731..6769
.28.109.268.529.916.1453.2164.3073.4204.5581.7228.9169.11428.14029.16996.20353

Examples

			Some solutions for n=7 k=3; colors=1,2,3 and empty=0
..3....0....0....2....0....1....3....0....0....0....1....0....3....1....0....0
..3....0....0....2....2....1....3....2....1....0....1....3....3....1....0....0
..3....1....0....2....2....1....3....2....1....2....1....3....3....1....0....3
..1....1....3....0....2....0....0....2....1....2....3....3....0....2....0....3
..1....1....3....0....0....2....2....2....1....2....3....2....1....2....1....3
..1....0....3....0....0....2....2....2....1....0....3....2....1....2....1....0
..0....0....0....0....0....2....2....2....1....0....0....2....1....0....1....0
		

Crossrefs

Column 1 is A000930,
Column 2 is A003229(n-1),
Column 3 is A084386,
Column 4 is A089977,
Column 10 is A178205,
Row 6 is A028872(n+2),
Row 7 is A144390(n+1),
Row 8 is A003154(n+1).

Programs

  • Maple
    T:= proc(n, k) option remember;
          `if`(n<0, 0,
          `if`(n<3 or k=0, 1, k*T(n-3, k) +T(n-1, k)))
        end:
    seq(seq(T(n, d+1-n), n=1..d), d=1..13); # Alois P. Heinz, Jul 29 2011
  • Mathematica
    nmax = 13; t[?Negative, ] = 0; t[n_, k_] /; (n < 3 || k == 0) = 1; t[n_, k_] := t[n, k] = k*t[n-3, k] + t[n-1, k]; Flatten[ Table[ t[n-k+1, k], {n , 1, nmax}, {k, n, 1, -1}]](* Jean-François Alcover, Nov 28 2011, after Maple *)

Formula

With z X 1 tiles of k colors on an n X 1 grid (with n >= z), either there is a tile (of any of the k colors) on the first spot, followed by any configuration on the remaining (n-z) X 1 grid, or the first spot is vacant, followed by any configuration on the remaining (n-1) X 1. So T(n,k) = T(n-1,k) + k*T(n-z,k), with T(n,k) = 1 for n=0,1,...,z-1. The solution is T(n,k) = sum_r r^(-n-1)/(1 + z k r^(z-1)) where the sum is over the roots of the polynomial k x^z + x - 1.
T(n,k) = sum {s=0..[n/3]} (binomial(n-2*s,s)*k^s).
For z X 1 tiles, T(n,k,z) = sum{s=0..[n/z]} (binomial(n-(z-1)*s,s)*k^s). - R. H. Hardin, Jul 31 2011

A242763 a(n) = 1 for n <= 7; a(n) = a(n-5) + a(n-7) for n>7.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 4, 4, 4, 5, 5, 7, 7, 8, 9, 9, 12, 12, 15, 16, 17, 21, 21, 27, 28, 32, 37, 38, 48, 49, 59, 65, 70, 85, 87, 107, 114, 129, 150, 157, 192, 201, 236, 264, 286, 342, 358, 428, 465, 522, 606, 644, 770, 823, 950, 1071, 1166, 1376
Offset: 1

Views

Author

Keywords

Comments

Generalized Fibonacci growth sequence using i = 2 as maturity period, j = 5 as conception period, and k = 2 as growth factor.
Maturity period is the number of periods that a Fibonacci tree node needs for being able to start developing branches. Conception period is the number of periods in a Fibonacci tree node needed to develop new branches since its maturity. Growth factor is the number of additional branches developed by a Fibonacci tree node, plus 1, and equals the base of the exponential series related to the given tree if maturity factor would be zero. Standard Fibonacci would use 1 as maturity period, 1 as conception period, and 2 as growth factor as the series becomes equal to 2^n with a maturity period of 0. Related to Lucas sequences.

Examples

			For n = 13 the a(13) = a(8) + a(6) = 2 + 1 = 3.
		

Crossrefs

Cf. A000079 (i = 0, j = 1, k = 2), A000244 (i = 0, j = 1, k = 3), A000302 (i = 0, j = 1, k = 4), A000351 (i = 0, j = 1, k = 5), A000400 (i = 0, j = 1, k = 6), A000420 (i = 0, j = 1, k = 7), A001018 (i = 0, j = 1, k = 8), A001019 (i = 0, j = 1, k = 9), A011557 (i = 0, j = 1, k = 10), A001020 (i = 0, j = 1, k = 11), A001021 (i = 0, j = 1, k = 12), A016116 (i = 0, j = 2, k = 2), A108411 (i = 0, j = 2, k = 3), A213173 (i = 0, j = 2, k = 4), A074872 (i = 0, j = 2, k = 5), A173862 (i = 0, j = 3, k = 2), A127975 (i = 0, j = 3, k = 3), A200675 (i = 0, j = 4, k = 2), A111575 (i = 0, j = 4, k = 3), A000045 (i = 1, j = 1, k = 2), A001045 (i = 1, j = 1, k = 3), A006130 (i = 1, j = 1, k = 4), A006131 (i = 1, j = 1, k = 5), A015440 (i = 1, j = 1, k = 6), A015441 (i = 1, j = 1, k = 7), A015442 (i = 1, j = 1, k = 8), A015443 (i = 1, j = 1, k = 9), A015445 (i = 1, j = 1, k = 10), A015446 (i = 1, j = 1, k = 11), A015447 (i = 1, j = 1, k = 12), A000931 (i = 1, j = 2, k = 2), A159284 (i = 1, j = 2, k = 3), A238389 (i = 1, j = 2, k = 4), A097041 (i = 1, j = 2, k = 10), A079398 (i = 1, j = 3, k = 2), A103372 (i = 1, j = 4, k = 2), A103373 (i = 1, j = 5, k = 2), A103374 (i = 1, j = 6, k = 2), A000930 (i = 2, j = 1, k = 2), A077949 (i = 2, j = 1, k = 3), A084386 (i = 2, j = 1, k = 4), A089977 (i = 2, j = 1, k = 5), A178205 (i = 2, j = 1, k = 11), A103609 (i = 2, j = 2, k = 2), A077953 (i = 2, j = 2, k = 3), A226503 (i = 2, j = 3, k = 2), A122521 (i = 2, j = 6, k = 2), A003269 (i = 3, j = 1, k = 2), A052942 (i = 3, j = 1, k = 3), A005686 (i = 3, j = 2, k = 2), A237714 (i = 3, j = 2, k = 3), A238391 (i = 3, j = 2, k = 4), A247049 (i = 3, j = 3, k = 2), A077886 (i = 3, j = 3, k = 3), A003520 (i = 4, j = 1, k = 2), A108104 (i = 4, j = 2, k = 2), A005708 (i = 5, j = 1, k = 2), A237716 (i = 5, j = 2, k = 3), A005709 (i = 6, j = 1, k = 2), A122522 (i = 6, j = 2, k = 2), A005710 (i = 7, j = 1, k = 2), A237718 (i = 7, j = 2, k = 3), A017903 (i = 8, j = 1, k = 2).

Programs

  • Magma
    [n le 7 select 1 else Self(n-5)+Self(n-7): n in [1..70]]; // Vincenzo Librandi, Nov 30 2016
    
  • Mathematica
    LinearRecurrence[{0, 0, 0, 0, 1, 0, 1}, {1, 1, 1, 1, 1, 1, 1}, 70] (*  or *)
    CoefficientList[ Series[(1+x+x^2+x^3+x^4)/(1-x^5-x^7), {x, 0, 70}], x] (* Robert G. Wilson v, Nov 25 2016 *)
    nxt[{a_,b_,c_,d_,e_,f_,g_}]:={b,c,d,e,f,g,a+c}; NestList[nxt,{1,1,1,1,1,1,1},70][[;;,1]] (* Harvey P. Dale, Oct 22 2024 *)
  • PARI
    Vec(x*(1+x+x^2+x^3+x^4)/((1-x+x^2)*(1+x-x^3-x^4-x^5)) + O(x^100)) \\ Colin Barker, Oct 27 2016
    
  • SageMath
    @CachedFunction # a = A242763
    def a(n): return 1 if n<8 else a(n-5) +a(n-7)
    [a(n) for n in range(1,76)] # G. C. Greubel, Oct 23 2024

Formula

Generic a(n) = 1 for n <= i+j; a(n) = a(n-j) + (k-1)*a(n-(i+j)) for n>i+j where i = maturity period, j = conception period, k = growth factor.
G.f.: x*(1+x+x^2+x^3+x^4) / ((1-x+x^2)*(1+x-x^3-x^4-x^5)). - Colin Barker, Oct 09 2016
Generic g.f.: x*(Sum_{l=0..j-1} x^l) / (1-x^j-(k-1)*x^(i+j)), with i > 0, j > 0 and k > 1.

A071911 Numbers m such that Stern's diatomic A002487(m) is divisible by 3.

Original entry on oeis.org

0, 5, 7, 10, 14, 20, 28, 33, 35, 40, 45, 47, 49, 51, 56, 61, 63, 66, 70, 73, 75, 80, 85, 87, 90, 94, 98, 102, 105, 107, 112, 117, 119, 122, 126, 132, 140, 146, 150, 153, 155, 160, 165, 167, 170, 174, 180, 188, 196, 204, 210, 214, 217, 219, 224, 229, 231, 234, 238, 244, 252
Offset: 0

Views

Author

N. J. A. Sloane, Jun 13 2002

Keywords

Comments

From Kevin Ryde, Jan 09 2021: (Start)
Dijkstra gives bit pattern {0}1{?0{1}0|?1{0}1}?1{0} for the terms of this sequence, where | is alternative, {x} is zero or more of x, and ? is a single 0 or 1. Dijkstra formed this from a finite state automaton (states as pairs of Stern diatomic values mod 3 = A071412). The minimized automaton is as follows. State A is the start and the sole accepting state.
+---+
1 +----> | B | <-----+ 0
| +---+ |
0 +-- +===+ | +---+ --+ 1
+-> | A | |0,1 | D | <-+
start +===+ v +---+
^ +---+ ^
1 +----- | C | ------+ 0
+---+
a(n) can be calculated from n by a usual unranking in this automaton, using the number of strings of a given length k accepted from each state. Reznick's A122946(k) is the number of strings accepted starting from B. A089977(k-1) is the number accepted starting from C.
Dijkstra shows that for any m, a bit reversal (A030101) or an internal bit complement (A122155) of m are no change to the resulting Diatomic(m) value. So here if m is a term then so are A030101(m) and A122155(m). In the bit pattern, a reversal or complement between (but not including) the outermost 1's is no change.
(End)

Crossrefs

Cf. A071412 (diatomic mod 3), A122946 (count by bit length), A089977 (half that).

Programs

  • PARI
    { my(M=Mod('x, 'x^2+'x+2),
                f=[2,1, 0,-'x-1, -2,1, 0,'x-1],
                table=[1,3, 5,5, 7,1, 3,7]);
    a(n) = n<<=2; my(k=if(n,logint(n,2)+1), p=M^k, s=1);
      while(k>=0,
        my(t = n + (3<>2; }  \\ Kevin Ryde, Jan 09 2021
    
  • Python
    def aupto(nn):
      ok = [1] + [0 for i in range(nn)]
      for m in range(nn+1):
        if ok[m]:  # from formula
          for i in [2*m, 8*m-5, 8*m+5, 8*m-7, 8*m+7]:
            if 0 <= i <= nn: ok[i] = 1
      return [m for m in range(nn+1) if ok[m]]
    print(aupto(252)) # Michael S. Branicky, Jan 09 2021
    
  • Python
    from itertools import count, islice
    from functools import reduce
    def inA071911(n): return not (n and sum(reduce(lambda x,y:(x[0],(x[0]+x[1])%3) if int(y) else ((x[0]+x[1])%3,x[1]),bin(n)[-1:2:-1],(1,0)))%3)
    def A071911_gen(startvalue=0): # generator of terms >= startvalue
        return filter(inA071911, count(max(startvalue,0)))
    A071911_list = list(islice(A071911_gen(),20)) # Chai Wah Wu, May 18 2023

Formula

If m is in the sequence, then 2*m, 8*m +- 5, and 8*m +- 7 (when nonnegative) are in the sequence. Starting from m=0, this rule generates the sequence. [Reznick section 5 theorem 18] - Kevin Ryde, Jan 09 2021
Showing 1-10 of 10 results.