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

A135224 Triangle A103451 * A007318 * A000012, read by rows. T(n, k) for 0 <= k <= n.

Original entry on oeis.org

1, 3, 1, 5, 3, 1, 9, 7, 4, 1, 17, 15, 11, 5, 1, 33, 31, 26, 16, 6, 1, 65, 63, 57, 42, 22, 7, 1, 129, 127, 120, 99, 64, 29, 8, 1, 257, 255, 247, 219, 163, 93, 37, 9, 1, 513, 511, 502, 466, 382, 256, 130, 46, 10, 1
Offset: 0

Views

Author

Gary W. Adamson, Nov 23 2007

Keywords

Comments

Row sums = A132750: (1, 4, 9, 21, 49, 113, ...).
Left border = A083318: (1, 3, 5, 9, 17, 33, ...).

Examples

			First few rows of the triangle:
   1;
   3,  1;
   5,  3,  1;
   9,  7,  4,  1;
  17, 15, 11,  5,  1;
  33, 31, 26, 16,  6,  1;
  65, 63, 57, 42, 22,  7,  1;
...
		

Crossrefs

Programs

  • Magma
    function T(n,k)
      if k eq 0 and n eq 0 then return 1;
      elif k eq 0 then return 2^n +1;
      else return (&+[Binomial(n, k+j): j in [0..n]]);
      end if; return T; end function;
    [T(n,k): k in [0..n], n in [0..10]]; // G. C. Greubel, Nov 20 2019
    
  • Maple
    T:= proc(n, k) option remember;
          if k=0 and n=0 then 1
        elif k=0 then 2^n +1
        else add(binomial(n, k+j), j=0..n)
          fi; end:
    seq(seq(T(n, k), k=0..n), n=0..10); # G. C. Greubel, Nov 20 2019
  • Mathematica
    T[n_, k_]:= T[n, k] = If[k==n==0, 1, If[k==0, 2^n +1, Sum[Binomial[n, k + j], {j, 0, n}]]]; Table[T[n, k], {n, 0, 10}, {k, 0, n}]//Flatten (* G. C. Greubel, Nov 20 2019 *)
  • PARI
    T(n,k) = if(k==0 && n==0, 1, if(k==0, 2^n +1, sum(j=0, n, binomial(n, k+j)) )); \\ G. C. Greubel, Nov 20 2019
    
  • Sage
    def T(n, k):
        if (k==0 and n==0): return 1
        elif (k==0): return 2^n + 1
        else: return sum(binomial(n, k+j) for j in (0..n))
    [[T(n, k) for k in (0..n)] for n in (0..10)] # G. C. Greubel, Nov 20 2019

Formula

T(n, k) = A103451(n,k) * A007318(n,k) * A000012(n,k) as infinite lower triangular matrices.
T(n, k) = Sum_{j=0..n} binomial(n, k+j), with T(0,0) = 1 and T(n,0) = 2^n + 1. - G. C. Greubel, Nov 20 2019
T(n, k) = binomial(n, k)*hypergeom([1, k-n], [k+1], -1) - binomial(n, k+n+1)* hypergeom([1, k+1], [k+n+2], -1) + 0^k - 0^n. - Peter Luschny, Nov 20 2019

A143096 a(n) = 2*a(n-1)-1, with a(1)=1, a(2)=4, a(3)=5.

Original entry on oeis.org

1, 4, 5, 9, 17, 33, 65, 129, 257, 513, 1025, 2049, 4097, 8193, 16385, 32769, 65537, 131073, 262145, 524289, 1048577, 2097153, 4194305, 8388609, 16777217, 33554433, 67108865, 134217729, 268435457, 536870913, 1073741825, 2147483649, 4294967297, 8589934593
Offset: 1

Views

Author

Gary W. Adamson and Roger L. Bagula, Jul 23 2008

Keywords

Examples

			a(4) = 9 = 2*a(3) - 1 = 2*5 - 1.
a(4) = 9 = (1, 3, 3, 1) dot (1, 3, -2, 5) = (1 + 9 - 6 + 5).
		

Crossrefs

Cf. A065190.
Essentially the same as A083318, A048578 and A000051.

Programs

  • Mathematica
    Join[{1,4},NestList[2#-1&,5,40]] (* or *) Join[{1,4},LinearRecurrence[ {3,-2},{5,9},40]] (* Harvey P. Dale, Feb 18 2014 *)

Formula

Binomial transform of 0, 1, 2, -4, 9, -13, 20, -26, 35, ... (offset 0).
O.g.f.: x*(1+x-5*x^2+2*x^3)/((1-x)*(1-2*x)). a(n) = 1+2^(n-1), n>2. - R. J. Mathar, Jul 31 2008
a(n) = A048578(n-2), n>=3. - R. J. Mathar, Aug 10 2008

A267089 T(n,k) is decimal conversion of 1's in an n X n table that lie on its principal diagonals.

Original entry on oeis.org

1, 3, 3, 5, 2, 5, 9, 6, 6, 9, 17, 10, 4, 10, 17, 33, 18, 12, 12, 18, 33, 65, 34, 20, 8, 20, 34, 65, 129, 66, 36, 24, 24, 36, 66, 129, 257, 130, 68, 40, 16, 40, 68, 130, 257, 513, 258, 132, 72, 48, 48, 72, 132, 258, 513, 1025, 514, 260, 136, 80, 32, 80, 136, 260, 514
Offset: 0

Views

Author

Kival Ngaokrajang, Jan 10 2016

Keywords

Comments

Inspired by A137932 and A042948.
Conjectures:
(i) The first column is A083318.
(ii) T(n,k) = A086066(m) where m >= 10, n = m - 9*k, k = floor(m/10).

Examples

			See the "Illustration of initial terms" link for explicit examples.
Triangle begins:
n\k 0   1  2  3  4  5  6   7   8 ...
0   1
1   3   3
2   5   2  5
3   9   6  6  9
4  17  10  4 10 17
5  33  18 12 12 18 33
6  65  34 20  8 20 34 65
7 129  66 36 24 24 36 66 129
8 257 130 68 40 16 40 68 130 257
...
		

Crossrefs

A162779 Rows of A162777 when written as a triangle converge to this sequence.

Original entry on oeis.org

1, 3, 5, 5, 7, 13, 15, 9, 7, 13, 17, 19, 29, 43, 39, 17, 7, 13, 17, 19, 29, 43, 41, 27, 29, 45, 55, 69, 103, 127, 95, 33, 7, 13, 17, 19, 29, 43, 41, 27, 29, 45, 55, 69, 103, 127, 97, 43, 29, 45, 55, 69, 103, 129, 111, 85, 105, 147, 181, 243, 335, 351, 223, 65, 7
Offset: 0

Views

Author

Omar E. Pol, Jul 23 2009

Keywords

Comments

It appears that the right border of triangle gives A083318. - Omar E. Pol, Mar 15 2020

Examples

			From _Omar E. Pol_, Mar 15 2020: (Start)
Written as an irregular triangle in which row lengths give A011782 the sequence begins:
1;
3;
5,  5;
7, 13, 15,  9;
7, 13, 17, 19, 29, 43, 39, 17;
7, 13, 17, 19, 29, 43, 41, 27, 29, 45, 55, 69, 103, 127, 95, 33;
7, 13, 17, 19, 29, 43, 41, 27, 29, 45, 55, 69, 103, 127, 97, 43, 29, 45, 55, ...
(End)
		

Crossrefs

Extensions

More terms from Jinyuan Wang, Mar 15 2020

A176665 Triangle of polynomial coefficients of p(x,n) = Sum_{k=0..n} (k + 1)^n * k! * binomial(x, k), read by rows.

Original entry on oeis.org

1, 1, 2, 1, -5, 9, 1, 109, -165, 64, 1, -3303, 6188, -3494, 625, 1, 169711, -357254, 254434, -74635, 7776, 1, -13084359, 30063342, -24927719, 9549230, -1718079, 117649, 1, 1417404703, -3486909736, 3229823067, -1474126800, 354928391, -43216649, 2097152
Offset: 0

Views

Author

Roger L. Bagula, Apr 23 2010

Keywords

Comments

Row sums are: A083318 = {1, 3, 5, 9, 17, 33, 65, 129, 257, 513, 1025, ...}.

Examples

			Triangle begins as:
  1;
  1,         2;
  1,        -5,        9;
  1,       109,     -165,        64;
  1,     -3303,     6188,     -3494,     625;
  1,    169711,  -357254,    254434,  -74635,     7776;
  1, -13084359, 30063342, -24927719, 9549230, -1718079, 117649;
		

Crossrefs

Cf. A083318.

Programs

  • Mathematica
    (* First program *)
    p[x_, n_]:= Sum[(k+1)^n*k!*Binomial[x, k], {k, 0, n}];
    Table[CoefficientList[ExpandAll[p[x, n]], x], {n, 0, 10}]//Flatten
    (* Second program *)
    f[n_]:= CoefficientList[Sum[(k+1)^n*Product[x-j, {j,0,k-1}], {k,0,n}], x];
    Table[f[n], {n, 0, 10}] (* G. C. Greubel, Feb 07 2021 *)
  • Sage
    def p(n, x): return sum( (k+1)^n*factorial(k)*binomial(x, k) for k in (0..n))
    flatten([[( p(n, x) ).series(x, n+1).list()[k] for k in (0..n)] for n in (0..10)]) # G. C. Greubel, Feb 07 2021

Formula

Let p(x,n) = Sum_{k=0..n} (k + 1)^n * k! * binomial(x, k) then the number triangle is given by T(n, m) = coefficients( p(x,n) ).

Extensions

Edited by G. C. Greubel, Feb 07 2021

A265852 n such that A261807(n) = n^3 - n.

Original entry on oeis.org

0, 1, 3, 5, 7, 9, 15, 17, 31, 33, 35, 39, 41, 63, 65, 67, 79, 81, 103, 105, 127, 129, 131, 133, 135, 143, 145, 159, 161, 163, 169, 231, 255, 257, 259, 261, 265, 287, 289, 319, 321, 323, 359, 391, 399, 401, 419, 425, 511, 513, 515, 517, 519, 527, 543, 545
Offset: 1

Views

Author

Robert Israel, Dec 16 2015

Keywords

Comments

n such that the base-2 representation of n^3 has a 1 whenever the representation of n has a 1.
All terms after the first are odd.
Contains A083318 and A000225.

Examples

			5 is in the sequence because A261807(5) = 120 = 5^3 - 5.  The base-2 representations of 5 and 5^3 are 101 and 1111101, and every 1 in 101 corresponds to a 1 in 1111101.
		

Crossrefs

Cf. A261807.

Programs

  • Maple
    select(t -> Bits[Xor](t,t^3) = t^3 - t, [$0..10000]);
  • PARI
    for(n=0, 1e3, if(bitxor(n, n^3) == n^3-n, print1(n, ", "))) \\ Altug Alkan, Dec 16 2015

A287811 Number of septenary sequences of length n such that no two consecutive terms have distance 5.

Original entry on oeis.org

1, 7, 45, 291, 1881, 12159, 78597, 508059, 3284145, 21229047, 137226717, 887047443, 5733964809, 37064931183, 239591481525, 1548743682699, 10011236540769, 64713650292711, 418315611378573, 2704034619149571, 17479154549033145, 112987031151647583
Offset: 0

Views

Author

David Nacin, Jun 01 2017

Keywords

Examples

			For n=2 the a(2) = 49-4 = 45 sequences contain every combination except these four: 05, 50, 16, 61.
		

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{6, 3}, {1,7}, 40]
  • Python
    def a(n):
     if n in [0, 1]:
      return [1, 7][n]
     return 6*a(n-1)-3*a(n-2)

Formula

a(n) = 6*a(n-1) + 3*a(n-2), a(0)=1, a(1)=7.
G.f.: (1 + x)/(1 - 6*x - 3*x^2).
a(n) = A090018(n-1)+A090018(n). - R. J. Mathar, Oct 20 2019

A287838 Number of words of length n over the alphabet {0,1,...,10} such that no two consecutive terms have distance 8.

Original entry on oeis.org

1, 11, 115, 1205, 12625, 132275, 1385875, 14520125, 152130625, 1593906875, 16699721875, 174966753125, 1833166140625, 19206495171875, 201230782421875, 2108340300078125, 22089556912890625, 231437270629296875, 2424820490857421875, 25405391261720703125
Offset: 0

Views

Author

David Nacin, Jun 07 2017

Keywords

Comments

In general, the number of sequences on {0,1,...,10} such that no two consecutive terms have distance 6+k for k in {0,1,2,3,4} has generating function (-1 - x)/(-1 + 10*x + (2*k+1)*x^2).

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{10, 5}, {1, 11, 115}, 20]
  • PARI
    Vec((1 + x) / (1 - 10*x - 5*x^2) + O(x^40)) \\ Colin Barker, Nov 25 2017
  • Python
    def a(n):
     if n in [0,1,2]:
      return [1, 11, 115][n]
     return 10*a(n-1) + 5*a(n-2)
    

Formula

For n > 2, a(n) = 10*a(n-1) + 5*a(n-2), a(0)=1, a(1)=11, a(2)=115.
G.f.: (-1 - x)/(-1 + 10*x + 5*x^2).
a(n) = (((5-sqrt(30))^n*(-6+sqrt(30)) + (5+sqrt(30))^n*(6+sqrt(30)))) / (2*sqrt(30)). - Colin Barker, Nov 25 2017

A295165 Numbers n such that !n and n!! (A000166(n) and A006882(n)) are coprime.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 8, 9, 12, 14, 17, 18, 20, 24, 30, 32, 33, 44, 48, 54, 62, 65, 68, 72, 74, 80, 84, 98, 102, 110, 114, 128, 140, 150, 158, 168, 180, 182, 198, 200, 212, 224, 228, 230, 234, 252, 257, 264, 270, 272, 278, 282, 308, 312, 314, 318, 332, 348, 354, 374, 380, 384, 402, 410, 420, 422, 432
Offset: 1

Views

Author

Robert Israel, Nov 16 2017

Keywords

Comments

Odd n is in the sequence iff !n is not divisible by any odd primes < n.
Even n is in the sequence iff !n is not divisible by any odd primes < n/2.
All odd terms are in A083318, all even terms > 2 are in A008864, but both of these are strict inclusions.
Odd terms include 1,3,5,9,17,33,65,257,513,32769.

Examples

			!5 = 44 and 5!! = 15 are coprime so 5 is in the sequence.
		

Crossrefs

Programs

  • Maple
    sf:= proc(n) option remember; n*procname(n-1)+(-1)^n end proc:
    sf(0):= 1:
    select(n -> igcd(sf(n),doublefactorial(n))=1, [$0..1000]);
  • Mathematica
    Select[Range[0, 1000], CoprimeQ[Subfactorial[#], #!!]&] (* Jean-François Alcover, Oct 16 2020 *)

A287805 Number of quinary sequences of length n such that no two consecutive terms have distance 2.

Original entry on oeis.org

1, 5, 19, 73, 281, 1083, 4175, 16097, 62065, 239307, 922711, 3557761, 13717913, 52893147, 203943935, 786361409, 3032030689, 11690820555, 45077144455, 173807214241, 670161078089, 2583988659867, 9963272432111, 38416111919777, 148123788152017, 571131629935179
Offset: 0

Views

Author

David Nacin, Jun 01 2017

Keywords

Examples

			For n=2 the a(2)=19=25-6 sequences contain every combination except these six: 02,20,13,31,24,42.
		

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{4, 1, -6}, {1, 5, 19, 73}, 40]
  • Python
    def a(n):
     if n in [0,1,2,3]:
      return [1,5,19,73][n]
     return 4*a(n-1)+a(n-2)-6*a(n-3)

Formula

For n>0, a(n) = 4*a(n-1) + a(n-2) - 6*a(n-3), a(1)=5, a(2)=19, a(3)=73.
G.f.: (1 + x - 2*x^2 - 2*x^3)/(1 - 4*x - x^2 + 6*x^3).
Previous Showing 21-30 of 53 results. Next