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.

A026374 Triangular array T read by rows: T(n,0) = T(n,n) = 1 for all n >= 0, T(n,k) = T(n-1,k-1) + T(n-1,k) for odd n and 1< = k <= n-1, T(n,k) = T(n-1,k-1) + T(n-1,k) + T(n-2,k-1) for even n and 1 <= k <= n-1.

Original entry on oeis.org

1, 1, 1, 1, 3, 1, 1, 4, 4, 1, 1, 6, 11, 6, 1, 1, 7, 17, 17, 7, 1, 1, 9, 30, 45, 30, 9, 1, 1, 10, 39, 75, 75, 39, 10, 1, 1, 12, 58, 144, 195, 144, 58, 12, 1, 1, 13, 70, 202, 339, 339, 202, 70, 13, 1, 1, 15, 95, 330, 685, 873, 685, 330, 95, 15, 1
Offset: 0

Views

Author

Keywords

Comments

T(n,k) is number of lattice paths from (0,0) to (n,n-2k) using steps U=(1,1), D=(1,-1) and, at levels ...,-4,-2,0,2,4,..., also H=(2,0). Example: T(4,1)=6 because we have the following paths from (0,0) to (4,2): UUUD, UUH, UUDU, UDUU, HUU and DUUU. Row sums yield A026383. Column 1 is A032766, column 2 is A026381, column 3 is A026382. - Emeric Deutsch, Jan 25 2004

Examples

			Triangle starts:
  1;
  1,  1;
  1,  3,   1;
  1,  4,   4,   1;
  1,  6,  11,   6,    1;
  1,  7,  17,  17,    7,    1;
  1,  9,  30,  45,   30,    9,    1;
  1, 10,  39,  75,   75,   39,   10,    1;
  1, 12,  58, 144,  195,  144,   58,   12,   1;
  1, 13,  70, 202,  339,  339,  202,   70,  13,   1;
  1, 15,  95, 330,  685,  873,  685,  330,  95,  15,  1;
  1, 16, 110, 425, 1015, 1558, 1558, 1015, 425, 110, 16, 1;
		

Crossrefs

Cf. A026375 (central terms).

Programs

  • Haskell
    a026374 n k = a026374_tabl !! n !! k
    a026374_row n = a026374_tabl !! n
    a026374_tabl = [1] : map fst (map snd $ iterate f (1, ([1, 1], [1]))) where
       f (0, (us, vs)) = (1, (zipWith (+) ([0] ++ us) (us ++ [0]), us))
       f (1, (us, vs)) = (0, (zipWith (+) ([0] ++ vs ++ [0]) $
                                 zipWith (+) ([0] ++ us) (us ++ [0]), us))
    -- Reinhard Zumkeller, Feb 22 2014
  • Mathematica
    p[x, 1] := 1;
    p[x_, n_] := p[x, n] = If[Mod[n, 2] == 0, (x + 1)*p[x, n - 1], (x^2 + 1)^Floor[n/2]];
    a = Table[CoefficientList[p[x, n], x], {n, 1, 12}];
    Flatten[a] (* Roger L. Bagula and Gary W. Adamson, Dec 04 2009 *)

Formula

T(n, k) = number of integer strings s(0), ..., s(n) such that s(0)=0, s(n) = n-2k, where, for 1 <= i <= n, s(i) is even if i is even and |s(i) - s(i-1)| <= 1.
From Emeric Deutsch, Jan 25 2004: (Start)
T(2n, k) = Sum_{j=ceiling(k/2)..k} 3^(2j-k)*binomial(n, j)*binomial(j, k-j);
T(2n+1, k) = T(2n, k-1) + T(2n, k).
G.f.: (1 + z + t*z)/(1 - (1+3*t+t^2)*z^2) = 1 + (1+t)*z + (1+3*t+t^2)*z^2+ ... .
Generating polynomial for row 2n is (1 + 3*t + t^2)^n;
Generating polynomial for row 2n+1 it is (1+t)*(1 + 3*t + t^2)^n. (End)
From Emeric Deutsch, Jan 30 2004: (Start)
T(2n, k) = Sum_{j=ceiling(k/2)..k} 3^(2j-k)*binomial(n, j)*binomial(j, k-j);
T(2n+1, k) = T(2n, k-1) + T(2n, k). (End)

A215788 T(n,k)=Number of permutations of 0..floor((n*k-1)/2) on even squares of an nXk array such that each row, column, diagonal and (downwards) antidiagonal of even squares is increasing.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 2, 5, 2, 1, 1, 1, 1, 5, 12, 10, 4, 1, 1, 1, 1, 5, 42, 29, 25, 4, 1, 1, 1, 1, 14, 110, 262, 189, 50, 8, 1, 1, 1, 1, 14, 462, 932, 2465, 458, 125, 8, 1, 1, 1, 1, 42, 1274, 11694, 26451, 15485, 2988, 250, 16, 1, 1, 1, 1, 42, 6006
Offset: 1

Views

Author

R. H. Hardin Aug 23 2012

Keywords

Comments

Table starts
.1.1.1..1....1......1........1..........1...........1...........1...........1
.1.1.1..1....2......2........5..........5..........14..........14..........42
.1.1.1..2....5.....12.......42........110.........462........1274........6006
.1.1.1..2...10.....29......262........932.......11694.......46988......727846
.1.1.1..4...25....189.....2465......26451......530429.....7027942...187205626
.1.1.1..4...50....458....15485.....234217....14296434...297246092.26970790176
.1.1.1..8..125...2988...146205....6812794...673507749.48337803306
.1.1.1..8..250...7241...918637...60485308.18255280444
.1.1.1.16..625..47241..8674386.1761748159
.1.1.1.16.1250.114482.54503318
.1.1.1.32.3125.746892
.1.1.1.32.6250

Examples

			Some solutions for n=7 k=4
..0..x..1..x....0..x..1..x....0..x..1..x....0..x..1..x....0..x..1..x
..x..2..x..3....x..2..x..4....x..2..x..4....x..2..x..3....x..2..x..3
..4..x..5..x....3..x..5..x....3..x..5..x....4..x..5..x....4..x..5..x
..x..6..x..8....x..6..x..8....x..6..x..8....x..6..x..7....x..6..x..7
..7..x..9..x....7..x..9..x....7..x..9..x....8..x..9..x....8..x..9..x
..x.10..x.12....x.10..x.12....x.10..x.11....x.10..x.12....x.10..x.11
.11..x.13..x...11..x.13..x...12..x.13..x...11..x.13..x...12..x.13..x
		

Crossrefs

Column 5 is A026383(n-1)
Row 2 is A000108(floor((n-1)/2))
Odd squares: A215870

Formula

Empirical for column k:
k=4: a(n) = 2*a(n-2)
k=5: a(n) = 5*a(n-2)
k=6: a(n) = 16*a(n-2) -3*a(n-4)
k=7: a(n) = 61*a(n-2) -99*a(n-4) -2*a(n-6)
k=8: a(n) = 272*a(n-2) -3439*a(n-4) -3336*a(n-6) +140*a(n-8)
k=9: a(n) = 1385*a(n-2) -131648*a(n-4) -318070*a(n-6) -4160916*a(n-8) -1097892*a(n-10) +648*a(n-12)

A072994 Number of solutions to x^n==1 (mod n), 1<=x<=n.

Original entry on oeis.org

1, 1, 1, 2, 1, 2, 1, 4, 3, 2, 1, 4, 1, 2, 1, 8, 1, 6, 1, 8, 3, 2, 1, 8, 5, 2, 9, 4, 1, 4, 1, 16, 1, 2, 1, 12, 1, 2, 3, 16, 1, 12, 1, 4, 3, 2, 1, 16, 7, 10, 1, 8, 1, 18, 5, 8, 3, 2, 1, 16, 1, 2, 9, 32, 1, 4, 1, 8, 1, 4, 1, 24, 1, 2, 5, 4, 1, 12, 1, 32, 27, 2, 1, 24, 1, 2, 1, 8, 1, 12, 1, 4, 3
Offset: 1

Views

Author

Benoit Cloitre, Aug 21 2002

Keywords

Comments

More generally, if the equation a(x)*m=x has solutions, solutions are congruent to m: a(x)*7=x for x=7, 14, 21, 28, 49, 56, 63, 98, 112, ... . There are some composite values of m such that a(x)*m=x has solutions, as m=15. a(n) coincides with A009195(n) at many values of n, but not at n = 20, 30, 40, 42, 52, 60, 66, 68, 70, 78, 80, 84, 90, 100, ... . It seems also that for n large enough sum_{k=1..n} a(k) > n*log(n)*log(log(n)).
Similar (if not the same) coincidences and differences occur between A072995 and A050399. Sequence A072989 lists these indices. - M. F. Hasler, Feb 23 2014

Programs

  • Maple
    1, seq(nops(select(t -> t^n mod n = 1, [$1..n-1])),n=2..100); # Robert Israel, Dec 07 2014
  • Mathematica
    f[n_] := (d = If[ OddQ@ n, 1, 2]; d*Length@ Select[ Range[ n/d], PowerMod[#, n, n] == 1 &]); f[1] = f[2] = 1; Array[f, 93] (* or *)
    f[n_] := Length@ Select[ Range@ n, PowerMod[#, n, n] == 1 &]; f[n_] := 1 /; n<2; Array[f, 93] (* Robert G. Wilson v, Dec 06 2014 *)
  • PARI
    A072994=n->sum(k=1,n,Mod(k,n)^n==1) \\ M. F. Hasler, Feb 23 2014

Formula

For n>0, a(A003277(n)) = 1, a(2^n) = 2^(n-1), a(A065119(n)) = A065119(n)/3.
For n>1, a(A026383(n)) = A026383(n)/5.

Extensions

Corrected by T. D. Noe, May 19 2007

A004663 Powers of 3 written in base 9.

Original entry on oeis.org

1, 3, 10, 30, 100, 300, 1000, 3000, 10000, 30000, 100000, 300000, 1000000, 3000000, 10000000, 30000000, 100000000, 300000000, 1000000000, 3000000000, 10000000000, 30000000000, 100000000000, 300000000000, 1000000000000, 3000000000000, 10000000000000, 30000000000000
Offset: 0

Views

Author

Keywords

Crossrefs

Cf. A000244, A004656, A004658, A004659, ... : powers of 3 in base 10, 2, 4, 5, ...
Cf. A000079, A004642, ..., A004655: powers of 2 written in base 10, 2, 3, ..., 16.

Programs

  • Maple
    seq(op([10^i,3*10^i]),i=0..100); # Robert Israel, Jun 25 2018
  • Mathematica
    Table[FromDigits[IntegerDigits[3^n, 9]], {n, 0, 100}] (* G. C. Greubel, Oct 12 2018 *)
  • PARI
    a(n)=3^bittest(n,0)*10^(n\2) \\ M. F. Hasler, Jun 25 2018

Formula

From Paul Barry, Jul 14 2004: (Start)
G.f.: (1 + 3*x)/(1 - 10*x^2);
a(n) = 2*a(n-1) + 3*a(n-2) + 10^floor((n-2)/2);
a(n) = Sum_{k=0..floor(n/2)} binomial(floor(n/2), k)*3^(n-2*k). (End)
a(n) = 3*a(n-1) + ((1 + (-1)^n)/2)*a(n-2) with a(0)=1, a(1)=3. - Taras Goy, Mar 20 2019
E.g.f.: cosh(sqrt(10)*x) + 3*sinh(sqrt(10)*x)/sqrt(10). - Stefano Spezia, Mar 31 2023

A162963 a(n) = 5*a(n-2) for n > 2; a(1) = 2, a(2) = 5.

Original entry on oeis.org

2, 5, 10, 25, 50, 125, 250, 625, 1250, 3125, 6250, 15625, 31250, 78125, 156250, 390625, 781250, 1953125, 3906250, 9765625, 19531250, 48828125, 97656250, 244140625, 488281250, 1220703125, 2441406250, 6103515625, 12207031250
Offset: 1

Views

Author

Klaus Brockhaus, Jul 19 2009

Keywords

Comments

Binomial transform is A162770, second binomial transform is A001077 without initial 1, third binomial transform is A162771, fourth binomial transform is A162772, fifth binomial transform is A162773.

Crossrefs

Programs

  • Magma
    [ n le 2 select 3*n-1 else 5*Self(n-2): n in [1..29] ];

Formula

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

A096881 Expansion of g.f. (1 + 4*x)/(1 - 17*x^2).

Original entry on oeis.org

1, 4, 17, 68, 289, 1156, 4913, 19652, 83521, 334084, 1419857, 5679428, 24137569, 96550276, 410338673, 1641354692, 6975757441, 27903029764, 118587876497, 474351505988, 2015993900449, 8063975601796, 34271896307633, 137087585230532, 582622237229761, 2330488948919044
Offset: 0

Views

Author

Paul Barry, Jul 14 2004

Keywords

Crossrefs

Programs

  • Magma
    I:=[1,4,17]; [n le 3 select I[n] else 17*Self(n-2): n in [1..30]]; // Vincenzo Librandi, Jan 26 2016
  • Mathematica
    CoefficientList[Series[(1+4x)/(1-17x^2),{x,0,30}],x] (* or *) LinearRecurrence[ {0,17},{1,4},30] (* Harvey P. Dale, Jan 21 2012 *)
  • PARI
    Vec((1+4*x)/(1-17*x^2) + O(x^40)) \\ Michel Marcus, Jan 26 2016
    

Formula

a(n) = 3*a(n-1) + 4*a(n-2) + 17^floor((n-2)/2).
a(n) = Sum_{k=0..floor(n/2)} binomial(floor(n/2), k)*4^(n-2*k).
a(n) = 17*a(n-2), n>1. - Harvey P. Dale, Jan 21 2012
E.g.f.: cosh(sqrt(17)*x) + 4*sinh(sqrt(17)*x)/sqrt(17). - Stefano Spezia, Mar 31 2023

Extensions

More terms from Stefano Spezia, Mar 31 2023

A026384 a(n) = Sum_{j=0..i, i=0..n} T(i,j), where T is the array in A026374.

Original entry on oeis.org

1, 3, 8, 18, 43, 93, 218, 468, 1093, 2343, 5468, 11718, 27343, 58593, 136718, 292968, 683593, 1464843, 3417968, 7324218, 17089843, 36621093, 85449218, 183105468, 427246093, 915527343, 2136230468, 4577636718, 10681152343, 22888183593, 53405761718
Offset: 0

Views

Author

Keywords

Comments

Partial sums of A026383. Number of lattice paths from (0,0) that do not go to right of the line x=n, using the steps U=(1,1), D=(1,-1) and, at levels ...,-4,-2,0,2,4,..., also H=(2,0). Example: a(2)=8 because we have the empty path, U, D, UU, UD, DD, DU and H. - Emeric Deutsch, Feb 18 2004

Crossrefs

Cf. A026383.

Programs

  • Magma
    I:=[1,3,8]; [n le 3 select I[n] else Self(n-1)+5*Self(n-2)-5*Self(n-3): n in [1..35]]; // Vincenzo Librandi, Aug 09 2017
  • Maple
    a[0]:=0:a[1]:=1:for n from 2 to 100 do a[n]:=5*a[n-2]+3 od: seq(a[n], n=1..29); # Zerinvary Lajos, Mar 17 2008
  • Mathematica
    CoefficientList[Series[(1 + 2 x) / ((1 - x) (1 - 5 x^2)), {x, 0, 33}], x] (* Vincenzo Librandi, Aug 09 2017 *)
    LinearRecurrence[{1,5,-5},{1,3,8},40] (* Harvey P. Dale, May 31 2023 *)
  • PARI
    Vec((2*x + 1)/(5*x^3 - 5*x^2 - x + 1) + O(x^40)) \\ Colin Barker, Nov 25 2016
    

Formula

G.f.: (1+2*x) / ((1-x)*(1-5*x^2)). - Ralf Stephan, Apr 30 2004
From Colin Barker, Nov 25 2016: (Start)
a(n) = (7*5^(n/2) - 3)/4 for n even.
a(n) = 3*(5^((n+1)/2) - 1)/4 for n odd.
a(n) = a(n-1) + 5*a(n-2) - 5*a(n-3) for n>2.
(End)

A096882 Expansion of g.f. (1 + 7*x)/(1 - 50*x^2).

Original entry on oeis.org

1, 7, 50, 350, 2500, 17500, 125000, 875000, 6250000, 43750000, 312500000, 2187500000, 15625000000, 109375000000, 781250000000, 5468750000000, 39062500000000, 273437500000000, 1953125000000000, 13671875000000000, 97656250000000000, 683593750000000000, 4882812500000000000
Offset: 0

Views

Author

Paul Barry, Jul 14 2004

Keywords

Crossrefs

Programs

  • Mathematica
    a[n_]:=Sum[Binomial[Floor[n/2],k]7^(n-2k),{k,0,Floor[n/2]}]; Array[a,25,0] (* Stefano Spezia, Mar 31 2023 *)
    LinearRecurrence[{0,50},{1,7},30] (* Harvey P. Dale, Sep 20 2024 *)

Formula

a(n) = 6*a(n-1) + 7*a(n-2) + 50^floor((n-2)/2).
a(n) = Sum_{k=0..floor(n/2)} binomial(floor(n/2), k)*7^(n-2*k).
E.g.f.: cosh(5*sqrt(2)*x) + 7*sinh(5*sqrt(2)*x)/(5*sqrt(2)). - Stefano Spezia, Mar 31 2023

Extensions

More terms from Stefano Spezia, Mar 31 2023

A096883 Expansion of (1+10x)/(1-101x^2).

Original entry on oeis.org

1, 10, 101, 1010, 10201, 102010, 1030301, 10303010, 104060401, 1040604010, 10510100501, 105101005010, 1061520150601, 10615201506010, 107213535210701, 1072135352107010, 10828567056280801, 108285670562808010
Offset: 0

Views

Author

Paul Barry, Jul 14 2004

Keywords

Crossrefs

Formula

a(n)=9a(n-1)+10a(n-2)+101^floor((n-2)/2); a(n)=sum{k=0..floor(n/2), binomial(floor(n/2), k)10^(n-2k) }.

A123486 Riordan array (1/(1-2*x), x/(1-4*x^2)).

Original entry on oeis.org

1, 2, 1, 4, 2, 1, 8, 8, 2, 1, 16, 16, 12, 2, 1, 32, 48, 24, 16, 2, 1, 64, 96, 96, 32, 20, 2, 1, 128, 256, 192, 160, 40, 24, 2, 1, 256, 512, 640, 320, 240, 48, 28, 2, 1, 512, 1280, 1280, 1280, 480, 336, 56, 32, 2, 1, 1024, 2560, 3840, 2560, 2240, 672, 448, 64, 36, 2, 1
Offset: 0

Views

Author

Paul Barry, Sep 30 2006

Keywords

Comments

Row sums are A026581. Diagonal sums are A026383.

Examples

			Number triangle begins
1;
2, 1;
4, 2, 1;
8, 8, 2, 1;
16, 16, 12, 2, 1;
32, 48, 24, 16, 2, 1;
		

Programs

  • Mathematica
    Table[Binomial[Floor[(n + k)/2], k]*2^(n - k), {n, 0, 49}, {k, 0,
       n}] // Flatten (* G. C. Greubel, Oct 13 2017 *)
  • PARI
    for(n=0,10, for(k=0,n, print1(binomial(floor((n+k)/2),k)*2^(n-k), ", "))) \\ G. C. Greubel, Oct 13 2017

Formula

Number triangle T(n,k) = C(floor((n+k)/2), k) * 2^(n-k).
T(n,k) = T(n-1,k-1) + 4*T(n-2,k), T(0,0) = 1, T(1,0) = 2, T(1,1) = 1, T(n,k) = 0 if k<0 or if k>n. - Philippe Deléham, Jan 20 2014

Extensions

Terms a(46) onward added by G. C. Greubel, Oct 14 2017
Showing 1-10 of 10 results.