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

A023105 Number of distinct quadratic residues mod 2^n.

Original entry on oeis.org

1, 2, 2, 3, 4, 7, 12, 23, 44, 87, 172, 343, 684, 1367, 2732, 5463, 10924, 21847, 43692, 87383, 174764, 349527, 699052, 1398103, 2796204, 5592407, 11184812, 22369623, 44739244, 89478487, 178956972, 357913943, 715827884, 1431655767, 2863311532
Offset: 0

Views

Author

Keywords

Comments

Number of distinct n-digit suffixes of base 2 squares.
a(n) counts the elements of A234000 smaller than 2^n plus the zero: a(7)=23 counts the elements of {0, 1, 4, 9, ..., 113, 121}, for example. - R. J. Mathar, Oct 11 2014
Conjecture: a(n) = 2 + (the number of A004215 entries < 2^n), for n>0. - Tilman Neumann, Sep 20 2020

Crossrefs

Programs

  • Haskell
    a 0 = 1
    a 1 = 2
    a n | even n = 2*a(n-1)-2
    a n | odd  n = 2*a(n-1)-1
    -- James Spahlinger, Oct 07 2012
    
  • Magma
    [Floor((2^n+10)/6): n in [0..30]]; // Vincenzo Librandi, Apr 21 2012
    
  • Mathematica
    CoefficientList[Series[(1-3*x^2-x^3)/((1-x)*(1+x)*(1-2*x)),{x,0,35}],x] (* Vincenzo Librandi, Apr 21 2012 *)
    LinearRecurrence[{2,1,-2},{1,2,2,3},40] (* Harvey P. Dale, Mar 05 2016 *)
  • PARI
    a(n)=(2^n+10)\6 \\ Charles R Greathouse IV, Apr 21 2012
    
  • Python
    def A023105(n): return ((1<Chai Wah Wu, Aug 22 2023
  • SageMath
    [(2^n +9 -(-1)^n -3*bool(n==0))/6 for n in (0..30)] # G. C. Greubel, Aug 10 2022
    

Formula

a(n) = floor( (2^n+10)/6 ).
a(n) = (2^n + 9 - (-1)^n)/6 for n > 0. - David S. Dodson, Jan 06 2013
G.f.: (1-3*x^2-x^3)/((1-x)*(1+x)*(1-2*x)). - Colin Barker, Mar 08 2012
a(0)=1, a(1)=2. a(n) = 2*a(n-1)-2 if n is even, a(n) = 2*a(n-1)-1 if n is odd. - Vincenzo Librandi, Apr 21 2012
a(n) = 2*a(n-1) + a(n-2) - 2*a(n-3) for n > 0. - Joerg Arndt, Apr 21 2012
a(0)=1, a(1)=2, a(n+2) = a(n+1) + A001045(n) for n >= 1. - Lee Hae-hwang, Jun 16 2014
a(n) = A000224(2^n). - R. J. Mathar, Oct 10 2014
a(n) = A005578(n-1) + 1, n > 0. - Carl Joshua Quines, Jul 17 2019
E.g.f.: (exp(2*x) + 9*exp(x) - 3 - exp(-x))/6. - G. C. Greubel, Aug 10 2022

A007302 Optimal cost function between two processors at distance n.

Original entry on oeis.org

0, 1, 1, 2, 1, 2, 2, 2, 1, 2, 2, 3, 2, 3, 2, 2, 1, 2, 2, 3, 2, 3, 3, 3, 2, 3, 3, 3, 2, 3, 2, 2, 1, 2, 2, 3, 2, 3, 3, 3, 2, 3, 3, 4, 3, 4, 3, 3, 2, 3, 3, 4, 3, 4, 3, 3, 2, 3, 3, 3, 2, 3, 2, 2, 1, 2, 2, 3, 2, 3, 3, 3, 2, 3, 3, 4, 3, 4, 3, 3, 2, 3, 3, 4, 3
Offset: 0

Views

Author

Keywords

Comments

Also the number of nonzero digits in the symmetric signed digit expansion of n with q=2 (i.e., the representation of n in the (-1,0,1)2 number system). - _Ralf Stephan, Jun 30 2003
Volger (1985) proves that a(n) <= ceiling(log_2(3n/2) / 2) and uses a(n) to derive an upper bound on the length of the minimum addition-subtraction chain for n. - Steven G. Johnson (stevenj(AT)math.mit.edu), May 01 2007
Starting from 0, the smallest number of steps to reach n, where each step involves moving a power of 2 in either direction. - Dmitry Kamenetsky, Jul 04 2023

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Subtracting 1 gives A280737.
Cf. A007583 (indices of record highs).

Programs

  • Haskell
    import Data.Bits (xor)
    a007302 n = a000120 $ xor n (3 * n) :: Integer
    -- Reinhard Zumkeller, Jun 17 2012
  • Mathematica
    a[n_] := Count[ BitXor[ b1 = IntegerDigits[n, 2]; b3 = IntegerDigits[3*n, 2]; PadLeft[b1, Length[b3]], b3], 1]; Table[a[n], {n, 0, 100}] (* Jean-François Alcover, May 20 2014, after Ramasamy Chandramouli *)
  • PARI
    ep(r,n)=local(t=n/2^(r+2));floor(t+5/6)-floor(t+4/6)-floor(t+2/6)+floor(t+1/6)
    a(n)=sum(r=0,log(3*n)\log(2)-1,!!ep(r,n))
    for(n=1,100,print1(a(n)", "))
    /* corrected by Charles R Greathouse IV, Jun 16 2012 */
    
  • PARI
    a(n)=hammingweight(bitxor(n,3*n)) \\ Charles R Greathouse IV, Jan 03 2017
    

Formula

a(0) = 0; a(n) = 1 if n is a power of 2; a(n) = 1 + min { a(n-2^k), a(2^(k+1)-n) } if 2^k < n < 2^(k+1).
a(n) = 0 if n = 0, = 1 if n = 1, = a(n/2) if n > 1 and n even and = min(a(n-1), a(n+1))+1 if n > 1 and n odd. - David W. Wilson, Dec 28 2005
a(n) = hammingweight( XOR(n, 3*n) ). - Ramasamy Chandramouli, Aug 20 2010
A007302(n) = A000120(n) - sum (A213629(n,A136412(k))). - Reinhard Zumkeller, Jun 17 2012
a(0) = 0; a(2n) = a(n); a(4n-1) = a(n) + 1; a(4n+1) = a(n) + 1. - Nathan Fox, Mar 12 2013

A262472 T(n,k)=Number of (n+1)X(k+1) 0..1 arrays with each row divisible by 3 and each column divisible by 5, read as a binary number with top and left being the most significant bits.

Original entry on oeis.org

1, 1, 2, 1, 3, 4, 1, 6, 9, 7, 1, 11, 36, 17, 13, 1, 22, 121, 115, 37, 26, 1, 43, 484, 457, 469, 107, 52, 1, 86, 1849, 3055, 2413, 2622, 321, 103, 1, 171, 7396, 16081, 30229, 22907, 15732, 865, 205, 1, 342, 29241, 107731, 234421, 552430, 239281, 85723, 2449, 410, 1
Offset: 1

Views

Author

R. H. Hardin, Sep 23 2015

Keywords

Comments

Table starts
...1....1.......1.........1...........1............1............1............1
...2....3.......6........11..........22...........43...........86..........171
...4....9......36.......121.........484.........1849.........7396........29241
...7...17.....115.......457........3055........16081.......107731.......655001
..13...37.....469......2413.......30229.......234421......2924245.....29005981
..26..107....2622.....22907......552430......8080915....194647694...3858564731
..52..321...15732....239281....11489332....326748241..15659602612.630055962801
.103..865...85723...2028469...198237391..10190636521.997197229531
.205.2449..494605..19072681..3805146805.367750753321
.410.7299.2942190.195594107.77803476910

Examples

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

Crossrefs

Column 1 is A262267(n-1).
Row 2 is A005578(n+1).

Formula

Empirical for column k:
k=1: a(n) = 3*a(n-1) -3*a(n-2) +3*a(n-3) -2*a(n-4)
k=2: [order 8]
k=3: [order 15]
k=4: [order 73]
Empirical for row n:
n=1: a(n) = a(n-1)
n=2: a(n) = 2*a(n-1) +a(n-2) -2*a(n-3)
n=3: a(n) = 4*a(n-1) +5*a(n-2) -20*a(n-3) -4*a(n-4) +16*a(n-5)
n=4: [order 13]
n=5: [order 33]
n=6: [order 67]

A262917 T(n,k)=Number of (n+1)X(k+1) 0..1 arrays with each row divisible by 3 and each column divisible by 7, read as a binary number with top and left being the most significant bits.

Original entry on oeis.org

1, 1, 2, 1, 3, 3, 1, 6, 5, 5, 1, 11, 15, 9, 10, 1, 22, 33, 53, 27, 19, 1, 43, 99, 137, 318, 61, 37, 1, 86, 261, 853, 1411, 1207, 145, 74, 1, 171, 783, 2953, 18190, 7417, 5797, 435, 147, 1, 342, 2241, 17333, 121507, 152587, 51769, 34782, 1253, 293, 1, 683, 6723, 71721
Offset: 1

Views

Author

R. H. Hardin, Oct 04 2015

Keywords

Comments

Table starts
...1....1.......1........1...........1...........1............1...........1
...2....3.......6.......11..........22..........43...........86.........171
...3....5......15.......33..........99.........261..........783........2241
...5....9......53......137.........853........2953........17333.......71721
..10...27.....318.....1411.......18190......121507......1444558....12031011
..19...61....1207.....7417......152587.....1550557.....30497815...420921961
..37..145....5797....51769.....2045269....33948145...1282949605.32134185721
..74..435...34782...529931....42299374..1361585275.102437680622
.147.1253..189135..4701201...727767387.42115306149
.293.3593.1089701.44632313.13958567845

Examples

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

Crossrefs

Column 1 is A046630(n-1).
Column 2 is A262314(n-1).
Row 2 is A005578(n+1).
Row 3 is A262326.

Formula

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

A263132 Positive values of m such that binomial(4*m - 1, m) is odd.

Original entry on oeis.org

1, 2, 3, 4, 6, 8, 11, 12, 16, 22, 24, 32, 43, 44, 48, 64, 86, 88, 96, 128, 171, 172, 176, 192, 256, 342, 344, 352, 384, 512, 683, 684, 688, 704, 768, 1024, 1366, 1368, 1376, 1408, 1536, 2048, 2731, 2732, 2736, 2752, 2816, 3072, 4096, 5462, 5464, 5472, 5504
Offset: 1

Views

Author

Peter Bala, Oct 10 2015

Keywords

Comments

This sequence, when viewed as a set, equals the set of numbers of the form 4^n * ceiling(2^k/3) for n >= 0, k >= 1, i.e., the product subset in Z of A000302 and A005578 regarded as sets. See the example below.
Equivalently, this sequence, when viewed as a set, equals the set of numbers of the form 2^n * (2^(2*k + 1) + 1)/3 for n,k >= 0, i.e., the product subset in Z of A000079 and A007583 regarded as sets. See the example below.
2*a(n) gives the values of m such that binomial(4*m - 2,m) is odd. 4*a(n) gives the values of m such that binomial(4*m - 3,m) is odd (other than m = 1) and also the values of m such that binomial(4*m - 4,m) is odd.

Examples

			1) Notice how this sequence can be read from Table 1 below by moving through the table in a sequence of 'knight moves' (1 down and 2 to the left) starting from the first row. For example, starting at 11 on the top row we move in a series of knights moves 11 -> 12 -> 16, then return to the top row at 22 and move 22 -> 24 -> 32, return to the top row at 43 and move 43 -> 44 -> 48 -> 64, then return to top row at 86 and so on.
........................................................
.   Table 1: 4^n * ceiling(2^k/3) for n >= 0, k >= 1   .
........................................................
n\k|   1    2    3    4     5     6    7    8     9
---+----------------------------------------------------
0  |   1    2    3    6    11    22   43   86   171 ...
1  |   4    8   12   24    44    88  172  ...
2  |  16   32   48   96   176    ...
3  |  64  128  192  ...
4  | 256  ...
...
2) Notice how this sequence can be read from Table 2 below in a sequence of 'knight moves' (2 down and 1 to the left) starting from the first two rows. For example, starting at 43 in the first row we jump 43 -> 44 -> 48 -> 64, then return to the second row at 86 and jump 86 -> 88 -> 96 -> 128, followed by 171 -> 172 -> 176 -> 192 -> 256, and so on.
....................................................
.   Table 2: 2^n * (2^(2*k + 1) + 1)/3, n,k >= 0   .
....................................................
n\k|   0    1     2     3      4      5
---+----------------------------------------------
0  |   1    3    11    43    171    683  ...
1  |   2    6    22    86    342   1366  ...
2  |   4   12    44   172    684   2732  ...
3  |   8   24    88   344   1368   5464  ...
4  |  16   48   176   688   2736  10928  ...
5  |  32   96   352  1376   5472  21856  ...
6  |  64  192   704  2752  10944  43712  ...
7  | 128  384  1408  5504  21888  87424  ...
8  | 256 ...
		

Crossrefs

Other odd binomials: A002450 (4*m+1,m), A020988 (4*m+2,m), A263133 (4*m+3,m), A080674 (4*m+4,m), A118113 (3*m-2,m), A003714 (3*m,m).

Programs

  • Magma
    [n: n in [1..6000] | Binomial(4*n-1, n) mod 2 eq 1]; // Vincenzo Librandi, Oct 12 2015
    
  • Maple
    for n from 1 to 5000 do if mod(binomial(4*n-1, n), 2) = 1 then print(n) end if end do;
  • Mathematica
    Select[Range[6000],OddQ[Binomial[4#-1,#]]&] (* Harvey P. Dale, Dec 26 2015 *)
  • PARI
    for(n=1, 1e4, if (binomial(4*n-1, n) % 2 == 1, print1(n", "))) \\ Altug Alkan, Oct 11 2015
    
  • PARI
    a(n) = my(r,s=sqrtint(4*n-3,&r)); (1<Kevin Ryde, Jun 14 2025
    
  • Python
    A263132_list = [m for m in range(1,10**6) if not ~(4*m-1) & m] # Chai Wah Wu, Feb 07 2016

Formula

a(n) = A263133(n) + 1.
m is a term if and only if m AND NOT (4*m-1) = 0 where AND and NOT are bitwise operators. - Chai Wah Wu, Feb 07 2016
a(n) = (2^A000267(n-1) + 2^A384688(n-1)) / 3. - Kevin Ryde, Jun 14 2025

Extensions

More terms from Vincenzo Librandi, Oct 12 2015

A199647 T(n,k)=Number of nXk 0..2 arrays with values 0..2 introduced in row major order and each element equal to one or two horizontal and vertical neighbors.

Original entry on oeis.org

0, 1, 1, 1, 3, 1, 2, 13, 13, 2, 3, 60, 112, 60, 3, 6, 288, 1265, 1265, 288, 6, 11, 1384, 12748, 29229, 12748, 1384, 11, 22, 6628, 134748, 658770, 658770, 134748, 6628, 22, 43, 31772, 1396083, 15066222, 32177372, 15066222, 1396083, 31772, 43, 86, 152304
Offset: 1

Author

R. H. Hardin Nov 08 2011

Keywords

Comments

Table starts
..0......1..........1.............2................3..................6
..1......3.........13............60..............288...............1384
..1.....13........112..........1265............12748.............134748
..2.....60.......1265.........29229...........658770...........15066222
..3....288......12748........658770.........32177372.........1614250077
..6...1384.....134748......15066222.......1614250077.......176701683386
.11...6628....1396083.....342328663......80053957248.....19161971644783
.22..31772...14584050....7797114144....3988024796446...2085499380111100
.43.152304..151837464..177447181083..198328767139736.226676302441401393
.86.730036.1582988477.4039488090307.9869645990489747

Examples

			Some solutions for n=5 k=3
..0..0..0....0..1..1....0..0..1....0..0..1....0..1..1....0..1..1....0..0..0
..1..1..0....0..2..2....2..2..1....0..1..1....0..0..1....0..2..2....1..2..2
..0..0..2....1..0..2....0..0..2....1..2..2....2..1..1....0..0..2....1..2..0
..0..1..2....1..0..0....1..1..2....1..2..1....2..2..0....2..1..1....1..1..0
..0..1..1....2..2..2....2..2..2....2..2..1....0..0..0....2..1..1....2..2..0
		

Crossrefs

Column 1 is A005578(n-2)

A231227 T(n,k)=Number of (n+2)X(k+2) 0..2 arrays with no element unequal to a strict majority of its horizontal, vertical, diagonal and antidiagonal neighbors, with values 0..2 introduced in row major order.

Original entry on oeis.org

1, 2, 2, 3, 4, 3, 6, 8, 8, 6, 11, 17, 21, 17, 11, 22, 45, 54, 54, 45, 22, 43, 103, 185, 182, 185, 103, 43, 86, 264, 552, 812, 812, 552, 264, 86, 171, 676, 1799, 2962, 4298, 2962, 1799, 676, 171, 342, 1724, 5900, 12179, 19935, 19935, 12179, 5900, 1724, 342, 683, 4501
Offset: 1

Author

R. H. Hardin, Nov 05 2013

Keywords

Comments

Table starts
...1....2.....3......6.......11........22.........43.........86........171
...2....4.....8.....17.......45.......103........264........676.......1724
...3....8....21.....54......185.......552.......1799.......5900......19185
...6...17....54....182......812......2962......12179......50196.....205057
..11...45...185....812.....4298.....19935.....102113.....524113....2687777
..22..103...552...2962....19935....117178.....748665....4870988...31483476
..43..264..1799..12179...102113....748665....5930126...48317804..390225796
..86..676..5900..50196...524113...4870988...48317804..495739986.5038813008
.171.1724.19185.205057..2687777..31483476..390225796.5038813008
.342.4501.63834.864270.14197596.210326324.3267809753

Examples

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

Crossrefs

Column 1 is A005578

Formula

Empirical for column k:
k=1: a(n) = 2*a(n-1) +a(n-2) -2*a(n-3)
k=2: [order 11]
k=3: [order 13]
k=4: [order 96]

A262332 T(n,k) = Number of (n+1) X (k+1) 0..1 arrays with each row and column divisible by 3, read as a binary number with top and left being the most significant bits.

Original entry on oeis.org

2, 3, 3, 6, 5, 6, 11, 15, 15, 11, 22, 33, 90, 33, 22, 43, 99, 351, 351, 99, 43, 86, 261, 2106, 2399, 2106, 261, 86, 171, 783, 10935, 26131, 26131, 10935, 783, 171, 342, 2241, 65610, 252097, 570922, 252097, 65610, 2241, 342, 683, 6723, 378351, 2767631, 10789339
Offset: 1

Author

R. H. Hardin, Sep 18 2015

Keywords

Comments

Table starts
...2.....3........6.........11............22...............43
...3.....5.......15.........33............99..............261
...6....15.......90........351..........2106............10935
..11....33......351.......2399.........26131...........252097
..22....99.....2106......26131........570922.........10789339
..43...261....10935.....252097......10789339........394241389
..86...783....65610....2767631.....237172426......16940254423
.171..2241...378351...29452071....5028462531.....699094613961
.342..6723..2270106..323841891..110616890922...30056993215803
.683.19845.13482855.3532758473.2411745951979.1279198648576981

Examples

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

Crossrefs

Column 1 is A005578(n+1).

Formula

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

A268327 T(n,k)=Number of length-(n+1) 0..k arrays with new values introduced in sequential order, and with new repeated values introduced in sequential order, both starting with zero.

Original entry on oeis.org

2, 2, 3, 2, 4, 6, 2, 4, 10, 11, 2, 4, 11, 25, 22, 2, 4, 11, 32, 66, 43, 2, 4, 11, 33, 102, 177, 86, 2, 4, 11, 33, 113, 337, 485, 171, 2, 4, 11, 33, 114, 418, 1148, 1348, 342, 2, 4, 11, 33, 114, 434, 1644, 3984, 3797, 683, 2, 4, 11, 33, 114, 435, 1806, 6729, 14030, 10812, 1366, 2, 4
Offset: 1

Author

R. H. Hardin, Feb 01 2016

Keywords

Comments

Table starts
...2.....2.....2......2......2......2......2......2......2......2......2......2
...3.....4.....4......4......4......4......4......4......4......4......4......4
...6....10....11.....11.....11.....11.....11.....11.....11.....11.....11.....11
..11....25....32.....33.....33.....33.....33.....33.....33.....33.....33.....33
..22....66...102....113....114....114....114....114....114....114....114....114
..43...177...337....418....434....435....435....435....435....435....435....435
..86...485..1148...1644...1806...1828...1829...1829...1829...1829...1829...1829
.171..1348..3984...6729...8052...8347...8376...8377...8377...8377...8377...8377
.342..3797.14030..28306..37851..40967..41466..41503..41504..41504..41504..41504
.683.10812.49973.121290.184910.213476.220115.220911.220957.220958.220958.220958

Examples

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

Crossrefs

Column 1 is A005578(n+1).

Formula

Empirical for column k:
k=1: a(n) = 2*a(n-1) +a(n-2) -2*a(n-3)
k=2: a(n) = 7*a(n-1) -14*a(n-2) +21*a(n-4) -7*a(n-5) -6*a(n-6)
k=3: [order 12]
k=4: [order 19]
k=5: [order 29]
k=6: [order 40]
k=7: [order 54]

A259095 Triangle read by rows: T(n,r) = number of arrangements of n pennies in rows, with r contiguous pennies in the bottom row, and each higher row consisting of contiguous pennies, each touching two pennies in the row below (1 <= r <= n).

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 0, 0, 2, 1, 0, 0, 1, 3, 1, 0, 0, 1, 2, 4, 1, 0, 0, 0, 3, 3, 5, 1, 0, 0, 0, 2, 5, 4, 6, 1, 0, 0, 0, 1, 5, 7, 5, 7, 1, 0, 0, 0, 1, 5, 8, 9, 6, 8, 1, 0, 0, 0, 0, 4, 10, 11, 11, 7, 9, 1, 0, 0, 0, 0, 3, 11, 15, 14, 13, 8, 10, 1, 0, 0, 0, 0, 2, 9, 19, 20, 17, 15, 9, 11, 1, 0, 0, 0, 0, 1, 9, 20, 27, 25, 20, 17, 10, 12, 1, 0, 0, 0, 0, 1, 7, 20, 32, 35, 30, 23, 19, 11, 13, 1
Offset: 1

Author

N. J. A. Sloane, Jun 19 2015

Keywords

Comments

Computed by R. K. Guy (see link).

Examples

			Triangle begins:
  1,
  0,1,
  0,1,1,
  0,0,2,1,
  0,0,1,3,1,
  0,0,1,2,4,1,
  0,0,0,3,3,5,1,
  0,0,0,2,5,4,6,1,
  0,0,0,1,5,7,5,7,1,
  0,0,0,1,5,8,9,6,8,1,
  0,0,0,0,4,10,11,11,7,9,1,
  0,0,0,0,3,11,15,14,13,8,10,1,
  0,0,0,0,2,9,19,20,17,15,9,11,1,
  0,0,0,0,1,9,20,27,25,20,17,10,12,1,
  0,0,0,0,1,7,20,32,35,30,23,19,11,13,1,
  ...
(An unusually large number of rows are shown in order to explain the related sequences A005575-A005578.)
		

Crossrefs

Cf. A001524 (row sums), A001519 (column sums).
Cf. also A005575 (a diagonal), A005576, A005577 (row maxima), A005578.

Programs

  • Maple
    b:= proc(n, i, d) option remember; `if`(i*(i+1)/2n, 0, d*b(n-i, i-1, 1))))
        end:
    T:= (n, r)-> b(n-r, r-1, 1):
    seq(seq(T(n,r), r=1..n), n=1..15);  # Alois P. Heinz, Jul 08 2016
  • Mathematica
    b[n_, i_, d_] := b[n, i, d] = If[i*(i+1)/2 < n, 0, If[n == 0, 1, b[n, i-1, d+1] + If[i > n, 0, d*b[n-i, i-1, 1]]]];
    T[n_, r_] := b[n-r, r-1, 1];
    Table[T[n, r], {n, 1, 15}, {r, 1, n}] // Flatten (* Jean-François Alcover, Jul 27 2016, after Alois P. Heinz *)

Formula

T(n,r) = Sum_{D(n,r)} Product_{k=2..m} abs(p[k]-p[k-1]) where the sum ranges over all partitions of n into distinct parts with maximal part r and the product over the m-1 pairs of successive parts; m is the number of parts in the partition under consideration. [Joerg Arndt, Apr 09 2016]
Previous Showing 11-20 of 60 results. Next