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 21-30 of 44 results. Next

A257285 a(n) = 4*5^n - 3*4^n.

Original entry on oeis.org

1, 8, 52, 308, 1732, 9428, 50212, 263348, 1365892, 7026068, 35916772, 182729588, 926230852, 4681485908, 23608756132, 118849087028, 597466660612, 3000218204948, 15052630632292, 75469311591668, 378171191679172, 1894154493279188, 9483966605929252
Offset: 0

Views

Author

M. F. Hasler, May 03 2015

Keywords

Comments

First differences of 5^n - 4^n = A005060.
a(n-1) is the number of numbers with n digits having the largest digit equal to 4. Note that this is independent of the base b>4. Equivalently, number of n-letter words over a 5-letter alphabet {a,b,c,d,e}, which must not start with the first letter of the alphabet, and in which the last letter of the alphabet must appear.

Crossrefs

Programs

  • Magma
    [4*5^n-3*4^n: n in [0..30]]; // Vincenzo Librandi, May 04 2015
  • Mathematica
    Table[4 5^n - 3 4^n, {n, 0, 30}] (* Vincenzo Librandi, May 04 2015 *)
  • PARI
    a(n)=4*5^n-3*4^n
    

Formula

From Vincenzo Librandi, May 04 2015: (Start)
G.f.: (1-x)/((1-4*x)*(1-5*x)).
a(n) = 9*a(n-1) - 20*a(n-2). - (End)
E.g.f.: exp(4*x)*(4*exp(x) - 3). - Stefano Spezia, Nov 15 2023

A257287 a(n) = 6*7^n - 5*6^n.

Original entry on oeis.org

1, 12, 114, 978, 7926, 61962, 472614, 3541578, 26190726, 191733162, 1392520614, 10049975178, 72163811526, 516030592362, 3677517616614, 26134444136778, 185292033880326, 1311149786699562, 9262681804120614, 65346572412186378
Offset: 0

Views

Author

M. F. Hasler, May 03 2015

Keywords

Comments

First differences of 7^n - 6^n = A016169.
a(n-1) is the number of numbers with n digits having the largest digit equal to 6. Note that this is independent of the base b > 6.
Equivalently, number of n-letter words over a 7-letter alphabet {a,b,c,d,e,f,g}, which must not start with the first letter of the alphabet, and in which the last letter of the alphabet must appear.

Crossrefs

Programs

  • Magma
    [6*7^n-5*6^n: n in [0..30]]; // Vincenzo Librandi, May 04 2015
  • Mathematica
    Table[6 7^n - 5 6^n, {n, 0, 30}] (* Vincenzo Librandi, May 04 2015 *)
    LinearRecurrence[{13,-42},{1,12},20] (* Harvey P. Dale, Dec 10 2023 *)
  • PARI
    a(n)=6*7^n-5*6^n
    

Formula

From Vincenzo Librandi, May 04 2015: (Start)
G.f.: (1-x)/((1-6*x)*(1-7*x)).
a(n) = 13*a(n-1) - 42*a(n-2). (End)
E.g.f.: exp(6*x)*(6*exp(x) - 5). - Stefano Spezia, Nov 15 2023

A257289 a(n) = 8*9^n - 7*8^n.

Original entry on oeis.org

1, 16, 200, 2248, 23816, 243016, 2416520, 23583688, 226933256, 2159839816, 20378082440, 190918934728, 1778399954696, 16486635929416, 152228014061960, 1400838452135368, 12853836673840136, 117654854901535816, 1074656292809619080, 9798007424852945608
Offset: 0

Views

Author

M. F. Hasler, May 03 2015

Keywords

Comments

First differences of 9^n - 8^n = A016185.
a(n-1) is the number of numbers with n digits having the largest digit equal to 8. Note that this is independent of the base b > 8.
Equivalently, number of n-letter words over a 9-letter alphabet, which must not start with the last letter of the alphabet, and in which the first letter of the alphabet must appear.

Crossrefs

Programs

  • Magma
    [8*9^n-7*8^n: n in [0..20]]; // Vincenzo Librandi, May 04 2015
    
  • Mathematica
    Table[8 9^n - 7 8^n, {n, 0, 20}] (* Vincenzo Librandi, May 04 2015 *)
    LinearRecurrence[{17,-72},{1,16},30] (* Harvey P. Dale, May 26 2019 *)
  • PARI
    a(n)=8*9^n-7*8^n
    
  • Sage
    [8*9^n-7*8^n for n in (0..20)] # Bruno Berselli, May 04 2015

Formula

G.f.: (1-x)/((1-8*x)*(1-9*x)). - Vincenzo Librandi, May 04 2015
E.g.f.: exp(8*x)*(8*exp(x) - 7). - Stefano Spezia, Nov 15 2023

A281891 Square array A(n,k): number of integers having k or more factors less than prime(n+1) in their prime factorization, within any interval of primorial(n)^k positive integers.

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 0, 1, 4, 1, 0, 1, 14, 22, 1, 0, 1, 46, 412, 162, 1, 0, 1, 146, 7072, 22164, 1830, 1, 0, 1, 454, 115432, 2744088, 2822340, 24270, 1, 0, 1, 1394, 1827592, 319881696, 3913037880, 496348740, 418350, 1, 0, 1, 4246, 28390552, 35924741232, 5079363328560, 9082206410040, 147569907780, 8040810, 1
Offset: 0

Views

Author

Peter Munn, Feb 08 2017

Keywords

Comments

Square array read by descending antidiagonals; A(n,k) with rows n >= 0, columns k >= 0. Prime factors are counted with multiplicity. Primorial(n) = A002110(n): product of first n primes.
Visualize the prime factorizations of the positive integers as a table with row headings giving each successive integer, and the primes of which the row heading is the product listed across the columns in nondecreasing order, repeated when necessary. Except for 1, which lacks prime factors, column 1 has the row heading's least prime factor, column 2 has a value for composite numbers but is blank for primes, and so on. This sequence measures precisely how frequently values up to and including the various primes occur in each column. This is possible because any given prime occurs cyclically in any given column, for the reason following.
The occurrence pattern of up to k factors of prime(n) in such prime factorizations has a fundamental period over the positive integers of prime(n)^k. The least common period for up to k factors of each of the first n primes is primorial(n)^k, and this covers everything that can affect the occurrence of prime(n) in the least k factors. Thus prime(n) is k-th least prime factor of integer m if and only if it is k-th least prime factor of m + primorial(n)^k.
Intermediate values in the calculation of this sequence appear in A281890.
If n > 0, A(n,1) = A053144(n) in accordance with the comment on A053144 dated Apr 08 2010.
A(2,k) = A027649(k) = 2*(3^k) - 2^k.

Examples

			The table starts:
   1     0         0             0             0           0        0 ...
   1     1         1             1             1           1        1 ...
   1     4        14            46           146         454     1394 ...
   1    22       412          7072        115432     1827592 28390552 ...
   1   162     22164       2744088     319881696 35924741232    ...
   1  1830   2822340    3913037880 5079363328560      ...
   1 24270 496348740 9082206410040       ...
   ...
Primes less than prime(2+1)=5 occur as second least factor 14 times in the prime factorizations of every interval of 36 = primorial(2)^2 positive integers (cf. A014673). Therefore, A(2,2) = 14.
		

Crossrefs

A079474 re-read as a square array gives values of primorial(n)^k = A002110(n)^k.
The values in the body of the factorization table described in the author's comments are in the irregular array A027746.
A096294 gives the equivalent array for integers expressed as a product of prime powers.

Formula

A(n,0) = 1 for n >= 0, A(0,k) = 0 for k >= 1.
A(n,k) = prime(n)^k * A(n-1,k) + A281890(n,k) for n >= 1, k >= 1.

Extensions

Edited by M. F. Hasler, Apr 14 2017

A085351 Expansion of (1-3*x)/((1-4*x)*(1-5*x)).

Original entry on oeis.org

1, 6, 34, 186, 994, 5226, 27154, 139866, 715714, 3644106, 18482674, 93461946, 471504034, 2374297386, 11938595794, 59961414426, 300880813954, 1508699037066, 7560675054514, 37872094749306, 189635351653474
Offset: 0

Views

Author

Paul Barry, Jun 24 2003

Keywords

Comments

Binomial transform of A085350. Second binomial transform of poly-Bernoulli numbers A027649.

Crossrefs

Programs

  • Mathematica
    CoefficientList[Series[(1-3x)/((1-4x)(1-5x)),{x,0,20}],x] (* or *) LinearRecurrence[{9,-20},{1,6},30] (* Harvey P. Dale, Jan 07 2022 *)
  • PARI
    Vec((1 - 3*x) / ((1 - 4*x)*(1 - 5*x)) + O(x^25)) \\ Colin Barker, Jun 25 2020

Formula

G.f.: (1-3*x)/((1-4*x)*(1-5*x)).
a(n) = 2*5^n - 4^n.
a(n) = 9*a(n-1) - 20*a(n-2) for n>1. - Colin Barker, Jun 25 2020

A123685 Counts compositions as described by table A047969; however, only those ending with an odd part are considered.

Original entry on oeis.org

1, 1, 0, 1, 1, 1, 1, 3, 4, 0, 1, 7, 14, 2, 1, 1, 15, 46, 14, 7, 0, 1, 31, 146, 74, 43, 3, 1, 1, 63, 454, 350, 247, 33, 10, 0, 1, 127, 1394, 1562, 1363, 273, 88, 4, 1, 1, 255, 4246, 6734, 7327, 2013, 724, 60, 13, 0, 1, 511, 12866, 28394, 38683, 13953, 5716, 676, 149, 5, 1, 1
Offset: 1

Views

Author

Alford Arnold, Oct 11 2006

Keywords

Examples

			Row four of table A047969 counts the 14 compositions
4
31 13 32 23 33
211 121 112 221 212 122 222
1111
whereas A123685 only counts
31 13 32 33
121 112 122
and 1111
		

Crossrefs

Diagonals include A000012, A059841, A000225, A123684 and A027649.

Programs

  • Maple
    g:= proc(b, t, l, m) option remember; `if`(t=0, b*l, add(
          g(b, t-1, irem(k, 2), m), k=1..m-1)+g(1, t-1, irem(m, 2), m))
        end:
    A:= (n, k)-> g(0, k, 0, n):
    seq(seq(A(n, d+1-n), n=1..d), d=1..13); # Alois P. Heinz, Nov 06 2009
  • Mathematica
    g[b_, t_, l_, m_] := g[b, t, l, m] = If[t == 0, b*l, Sum[g[b, t-1, Mod[k, 2], m], {k, 1, m-1}] + g[1, t-1, Mod[m, 2], m]]; A[n_, k_] := g[0, k, 0, n]; Table [Table [A[n, d+1-n], {n, 1, d}], {d, 1, 13}] // Flatten (* Jean-François Alcover, Feb 20 2015, after Alois P. Heinz *)

Extensions

More terms from Alois P. Heinz, Nov 06 2009

A124929 Triangle read by rows: T(n,k) = (2^k-1)*binomial(n-1,k-1) (1<=k<=n).

Original entry on oeis.org

1, 1, 3, 1, 6, 7, 1, 9, 21, 15, 1, 12, 42, 60, 31, 1, 15, 70, 150, 155, 63, 1, 18, 105, 300, 465, 378, 127, 1, 21, 147, 525, 1085, 1323, 889, 255, 1, 24, 196, 840, 2170, 3528, 3556, 2040, 511, 1, 27, 252, 1260, 3906, 7938, 10668, 9180, 4599, 1023
Offset: 1

Views

Author

Gary W. Adamson, Nov 12 2006

Keywords

Comments

Row sums give A027649.

Examples

			First few rows of the triangle are:
  1;
  1,  3;
  1,  6,  7;
  1,  9, 21,  15;
  1, 12, 42,  60,  31;
  1, 15, 70, 150, 155, 63;
...
		

Crossrefs

Cf. A027649.

Programs

  • GAP
    Flat(List([1..12], n-> List([1..n], k-> (2^k -1)*Binomial(n-1,k-1) ))); # G. C. Greubel, Nov 19 2019
  • Magma
    [(2^k -1)*Binomial(n-1,k-1): k in [1..n], n in [1..12]]; // G. C. Greubel, Nov 19 2019
    
  • Maple
    T:=(n,k)->(2^k-1)*binomial(n-1,k-1): for n from 1 to 11 do seq(T(n,k),k=1..n) od; # yields sequence in triangular form
  • Mathematica
    Table[(2^k -1)*Binomial[n-1, k-1], {n,12}, {k,n}]//Flatten (* G. C. Greubel, Jun 08 2017 *)
  • PARI
    for(n=1,12, for(k=1,n, print1((2^k -1)*binomial(n-1,k-1), ", "))) \\ G. C. Greubel, Jun 08 2017
    
  • Sage
    [[(2^k -1)*binomial(n-1,k-1) for k in (1..n)] for n in (1..12)] # G. C. Greubel, Nov 19 2019
    

Extensions

Edited by N. J. A. Sloane, Nov 29 2006

A329718 The number of open tours by a biased rook on a specific f(n) X 1 board, where f(n) = A070941(n) and cells are colored white or black according to the binary representation of 2n.

Original entry on oeis.org

1, 2, 4, 4, 8, 6, 14, 8, 16, 10, 24, 10, 46, 24, 46, 16, 32, 18, 44, 14, 84, 34, 68, 18, 146, 68, 138, 44, 230, 84, 146, 32, 64, 34, 84, 22, 160, 54, 112, 22, 276, 106, 224, 54, 376, 106, 192, 34, 454, 192, 406, 112, 690, 224, 406, 84, 1066, 376, 690, 160
Offset: 0

Views

Author

Mikhail Kurkov, Nov 19 2019 [verification needed]

Keywords

Comments

A cell is colored white if the binary digit is 0 and a cell is colored black if the binary digit is 1. A biased rook on a white cell moves only to the left and otherwise moves only to the right.

Examples

			a(1) = 2 because the binary expansion of 2 is 10 and there are 2 open biased rook's tours, namely 12 and 21.
a(2) = 4 because the binary expansion of 4 is 100 and there are 4 open biased rook's tours, namely 132, 213, 231 and 321.
a(3) = 4 because the binary expansion of 6 is 110 and there are 4 open biased rook's tours, namely 123, 132, 231 and 312.
		

Crossrefs

Formula

a(n) = f(n) + f(A059894(n)) = f(n) + f(2*A053645(n)) for n > 0 with a(0) = 1 where f(n) = A329369(n).
Sum_{k=0..2^n-1} a(k) = 2*(n+1)! - 1 for n >= 0.
a((4^n-1)/3) = 2*A110501(n+1) for n > 0.
a(2^1*(2^n-1)) = A027649(n),
a(2^2*(2^n-1)) = A027650(n),
a(2^3*(2^n-1)) = A027651(n),
a(2^4*(2^n-1)) = A283811(n),
and more generally, a(2^m*(2^n-1)) = T(n,m+1) for n >= 0, m >= 0 where T(n,m) = Sum_{k=0..n} k!*(k+1)^m*Stirling2(n,k)*(-1)^(n-k).

A081674 Generalized Poly-Bernoulli numbers.

Original entry on oeis.org

0, 1, 6, 29, 130, 561, 2366, 9829, 40410, 164921, 669526, 2707629, 10919090, 43942081, 176565486, 708653429, 2841788170, 11388676041, 45619274246, 182670807229, 731264359650, 2926800830801, 11712433499806, 46865424529029, 187508769705530, 750176293590361, 3001128818666166
Offset: 0

Views

Author

Paul Barry, Mar 28 2003

Keywords

Comments

Binomial transform of A027649. Inverse binomial transform of A081675.
With offset 1, partial sums of A085350. - Paul Barry, Jun 24 2003
Number of walks of length 2n+2 between two nodes at distance 4 in the cycle graph C_12. - Herbert Kociemba, Jul 05 2004

Crossrefs

Programs

  • Magma
    [((4^(n+1)-1)/3-3^n)/2: n in [0..30]]; // Vincenzo Librandi, Jul 17 2011
  • Mathematica
    Join[{a=0,b=1},Table[c=7*b-12*a-1;a=b;b=c,{n,60}]] (* Vladimir Joseph Stephan Orlovsky, Jan 19 2011 *)
    CoefficientList[Series[(x(1-2x))/((1-x)(1-3x)(1-4x)),{x,0,30}],x] (* or *) LinearRecurrence[{8,-19,12},{0,1,6},30] (* Harvey P. Dale, Nov 28 2018 *)

Formula

a(n) = ((4^(n+1) - 1)/3 - 3^n)/2 = (4*4^n - 3*3^n - 1)/6.
a(n) = (A002450(n+1) + A000244(n))/2.
G.f.: x*(1-2*x)/((1-x)*(1-3*x)*(1-4*x)).
From Elmo R. Oliveira, Aug 29 2024: (Start)
E.g.f.: exp(x)*(4*exp(3*x) - 3*exp(2*x) - 1)/6.
a(n) = 8*a(n-1) - 19*a(n-2) + 12*a(n-3) for n > 2. (End)

A081675 Generalized Poly-Bernoulli numbers.

Original entry on oeis.org

0, 1, 8, 50, 286, 1566, 8358, 43870, 227606, 1170926, 5985958, 30454590, 154371126, 780246286, 3934789958, 19808175710, 99577765846, 500036345646, 2508771728358, 12578218511230, 63028531771766, 315692415197006, 1580661100289158, 7912101596565150, 39595692359108886
Offset: 0

Views

Author

Paul Barry, Mar 28 2003

Keywords

Comments

Binomial transform of A081674. Second binomial transform of A027649.

Crossrefs

Programs

Formula

a(n) = (4*5^n - 3*4^n - 2^n)/6.
G.f.: x*(1-3*x)/((1-2*x)*(1-4*x)*(1-5*x)).
From Elmo R. Oliveira, Aug 29 2024: (Start)
E.g.f.: exp(2*x)*(4*exp(3*x) - 3*exp(2*x) - 1)/6.
a(n) = 11*a(n-1) - 38*a(n-2) + 40*a(n-3) for n > 2. (End)
Previous Showing 21-30 of 44 results. Next