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-6 of 6 results.

A048483 Array read by antidiagonals: T(k,n) = (k+1)2^n - k.

Original entry on oeis.org

1, 2, 1, 4, 3, 1, 8, 7, 4, 1, 16, 15, 10, 5, 1, 32, 31, 22, 13, 6, 1, 64, 63, 46, 29, 16, 7, 1, 128, 127, 94, 61, 36, 19, 8, 1, 256, 255, 190, 125, 76, 43, 22, 9, 1, 512, 511, 382, 253, 156, 91, 50, 25, 10, 1, 1024, 1023, 766, 509, 316, 187
Offset: 0

Views

Author

Keywords

Comments

n-th difference of (T(k,n),T(k,n-1),...,T(k,0)) is k+1, for n=1,2,3,...; k=0,1,2,...

Examples

			1 2 4 8 16 32 ...
1 3 7 15 31 63 ...
1 4 10 22 46 94 ...
1 5 13 29 61 125 ...
1 6 16 36 76 156 ...
		

Crossrefs

Rows are A000079 (k=0), A000225 (k=1), A033484 (k=2), A036563 (k=3), A048487 (k=4), A048488 (k=5), A048489 (k=6), A048490 (k=7), A048491 (k=8).
Main diagonal is A048493. Cf. A048494.

Formula

G.f.: (1-x+kx)/[(1-x)(1-2x)]. E.g.f.: (k+1)*exp(2x) - k*exp(x).
Recurrences: T(k, n) = 2T(k, n-1)+k = T(k-1, n)+2^n-1, T(k, 0) = 1.

Extensions

Edited by Ralf Stephan, Feb 05 2004

A053209 Row sums of A051598.

Original entry on oeis.org

1, 5, 14, 32, 68, 140, 284, 572, 1148, 2300, 4604, 9212, 18428, 36860, 73724, 147452, 294908, 589820, 1179644, 2359292, 4718588, 9437180, 18874364, 37748732, 75497468, 150994940, 301989884, 603979772, 1207959548, 2415919100
Offset: 0

Views

Author

Asher Auel, Dec 14 1999

Keywords

Crossrefs

Programs

  • Magma
    I:=[5,14]; [1] cat [n le 2 select I[n] else 3*Self(n-1) - 2*Self(n-2): n in [1..30]]; // G. C. Greubel, Sep 03 2018
    
  • Magma
    R:=PowerSeriesRing(Integers(), 30); Coefficients(R!( (1+x)^2)/((1-x)*(1-2*x))); // Marius A. Burtea, Oct 15 2019
  • Mathematica
    Join[{1}, LinearRecurrence[{3, -2}, {5, 14}, 50]] (* G. C. Greubel, Sep 03 2018 *)
  • PARI
    m=30; v=concat([5,14], vector(m-2)); for(n=3, m, v[n] = 3*v[n-1] -2*v[n-2]); concat([1], v) \\ G. C. Greubel, Sep 03 2018
    

Formula

a(0) = 1, a(1) = 5, a(n+1) = 2*a(n) + 4, for n >= 1.
a(n) = 9*2^(n-1) - 4, n >= 1.
a(n) = 4*n + Sum[i = 0, n - 1] a(i). - Jon Perry, Nov 20 2012
a(n) = A048491(n)/2, n>0. - Philippe Deléham, Apr 15 2013
G.f.: (1+x)^2/((1-x)*(1-2*x)). - Philippe Deléham, Apr 15 2013
a(n) = 3*a(n-1) - 2*a(n-2) with a(0)=1, a(1)=5, a(2)=14. - Philippe Deléham, Apr 15 2013
E.g.f.: (1 - 8*exp(x) + 9*exp(2*x))/2. - Stefano Spezia, Sep 28 2022

A062001 Table by antidiagonals of n-Stohr sequences: T(n,k) is least positive integer not the sum of at most n distinct terms in the n-th row from T(n,1) through to T(n,k-1).

Original entry on oeis.org

1, 2, 1, 3, 2, 1, 4, 4, 2, 1, 5, 7, 4, 2, 1, 6, 10, 8, 4, 2, 1, 7, 13, 15, 8, 4, 2, 1, 8, 16, 22, 16, 8, 4, 2, 1, 9, 19, 29, 31, 16, 8, 4, 2, 1, 10, 22, 36, 46, 32, 16, 8, 4, 2, 1, 11, 25, 43, 61, 63, 32, 16, 8, 4, 2, 1, 12, 28, 50, 76, 94, 64, 32, 16, 8, 4, 2, 1, 13, 31, 57, 91, 125, 127, 64, 32, 16, 8, 4, 2, 1
Offset: 1

Views

Author

Henry Bottomley, May 29 2001

Keywords

Examples

			Array begins as:
  1, 2, 3, 4,  5,  6,  7,   8,   9, ... A000027;
  1, 2, 4, 7, 10, 13, 16,  19,  22, ... A033627;
  1, 2, 4, 8, 15, 22, 29,  36,  43, ... A026474;
  1, 2, 4, 8, 16, 31, 46,  61,  76, ... A051039;
  1, 2, 4, 8, 16, 32, 63,  94, 125, ... A051040;
  1, 2, 4, 8, 16, 32, 64, 127, 190, ... ;
  1, 2, 4, 8, 16, 32, 64, 128, 255, ... ;
  1, 2, 4, 8, 16, 32, 64, 128, 256, ... ;
  1, 2, 4, 8, 16, 32, 64, 128, 256, ... ;
Antidiagonal triangle begins as:
   1;
   2,  1;
   3,  2,  1;
   4,  4,  2,  1;
   5,  7,  4,  2,   1;
   6, 10,  8,  4,   2,   1;
   7, 13, 15,  8,   4,   2,  1;
   8, 16, 22, 16,   8,   4,  2,  1;
   9, 19, 29, 31,  16,   8,  4,  2,  1;
  10, 22, 36, 46,  32,  16,  8,  4,  2, 1;
  11, 25, 43, 61,  63,  32, 16,  8,  4, 2, 1;
  12, 28, 50, 76,  94,  64, 32, 16,  8, 4, 2, 1;
  13, 31, 57, 91, 125, 127, 64, 32, 16, 8, 4, 2, 1;
		

Crossrefs

Diagonals include A000079, A000225, A033484, A036563, A048487.
A048483 can be seen as half this table.

Programs

  • Mathematica
    T[n_, k_]:= If[kG. C. Greubel, May 03 2022 *)
  • SageMath
    def A062001(n,k):
        if (kA062001(n,k) for k in (1..n)] for n in (1..15)]) # G. C. Greubel, May 03 2022

Formula

If k <= n+1 then A(n, k) = 2^(k-1), while if k > n+1, A(n, k) = (2^n - 1)*(k - n) + 1 (array).
T(n, k) = A(k, n-k+1) (antidiagonals).
T(2*n-1, n) = A000079(n-1), n >= 1.
T(2*n, n) = A000079(n), n >= 1.
T(2*n+1, n) = A000225(n+1), n >= 1.
T(2*n+2, n) = A033484(n), n >= 1.
T(2*n+3, n) = A036563(n+3), n >= 1.
T(2*n+4, n) = A048487(n), n >= 1.
From G. C. Greubel, May 03 2022: (Start)
T(n, k) = (2^k - 1)*(n-2*k+1) + 1 for k < n/2, otherwise 2^(n-k).
T(2*n+5, n) = A048488(n), n >= 1.
T(2*n+6, n) = A048489(n), n >= 1.
T(2*n+7, n) = A048490(n), n >= 1.
T(2*n+8, n) = A048491(n), n >= 1.
T(2*n+9, n) = A139634(n), n >= 1.
T(2*n+10, n) = A139635(n), n >= 1.
T(2*n+11, n) = A139697(n), n >= 1. (End)

A224692 Expansion of (1+5*x+7*x^2-x^3)/((1-2*x^2)*(1-x)*(1+x)).

Original entry on oeis.org

1, 5, 10, 14, 28, 32, 64, 68, 136, 140, 280, 284, 568, 572, 1144, 1148, 2296, 2300, 4600, 4604, 9208, 9212, 18424, 18428, 36856, 36860, 73720, 73724, 147448, 147452, 294904, 294908, 589816, 589820, 1179640, 1179644, 2359288, 2359292, 4718584, 4718588, 9437176
Offset: 0

Views

Author

Philippe Deléham, Apr 15 2013

Keywords

Crossrefs

Programs

  • Mathematica
    CoefficientList[Series[(1+5x+7x^2-x^3)/((1-2x^2)(1-x)(1+x)),{x,0,40}],x] (* or *) LinearRecurrence[{0,3,0,-2},{1,5,10,14},50] (* Harvey P. Dale, Sep 17 2016 *)

Formula

G.f.: (1+5*x+7*x^2-x^3)/((1-x)*(1+x)*(1-2*x^2)).
a(n) = a(n-1)+4 if n odd.
a(n) = a(n-1)*2 if n even.
a(2n) = 9*2^n - 8 = A048491(n).
a(2n+1) = 9*2^n - 4 = A053209(n+1).
a(n) = 3*a(n-2) - 2*a(n-4) with n>3, a(0)=1, a(1)=5, a(2)=10, a(3)=14.
a(n) = 9*2^floor(n/2)-2*(-1)^n-6. [Bruno Berselli, Apr 27 2013]

A357142 Nonnegative numbers all of whose pairs of consecutive decimal digits are adjacent digits, where 9 and 0 are considered adjacent.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 21, 23, 32, 34, 43, 45, 54, 56, 65, 67, 76, 78, 87, 89, 90, 98, 101, 109, 121, 123, 210, 212, 232, 234, 321, 323, 343, 345, 432, 434, 454, 456, 543, 545, 565, 567, 654, 656, 676, 678, 765, 767, 787, 789, 876, 878, 890, 898, 901, 909
Offset: 1

Views

Author

Ofer Zivony, Sep 14 2022

Keywords

Comments

This is very similar to A033075, with the exception of considering 0 and 9 as adjacent digits. This allows these digits to be equal to the other digits, making it a more balanced list.

Crossrefs

Cf. A032981, A033075, A043089 (ternary analog), A048491.

Programs

  • Maple
    q:= n-> (l-> andmap(x-> x in {1, 9}, {seq(abs(l[i]-l[i-1]),
                 i=2..nops(l))}))(convert(n, base, 10)):
    select(q, [$0..1000])[];  # Alois P. Heinz, Sep 14 2022
  • Mathematica
    q[n_] := AllTrue[Abs @ Differences @ IntegerDigits[n], MemberQ[{1, 9}, #] &]; Select[Range[0, 1000], q] (* Amiram Eldar, Sep 15 2022 *)
  • PARI
    a(n) = { n--; for (b=0, oo, if (n <= 9*2^b, my (v=ceil(n/2^b), p=(n-1)%(2^b)); while (b>0, v=10*v+vecsort([(v-1)%10, (v+1)%10])[1+bittest(p,b--)];); return (v), n -= 9*2^b)) } \\ Rémy Sigrist, Sep 15 2022
  • Python
    def add_dig(x):
      d = (x%10-1)%8 if x%10 != 0 else 1
      return 10*x+d
    def try_incr(x):
      if x < 10: return x+1
      r = x//10
      d2 = r%10
      d = max((d2+1)%10,(d2-1)%10)
      return 10*r+d
    def incr(x):
      new_x=try_incr(x)
      return new_x if new_x>x else add_dig(incr(x//10))
    x = 0
    for n in range(1,1000):
      print(f"{n} {x}")
      x = incr(x)
    

A370882 Square array T(n,k) = 9*2^k - n read by ascending antidiagonals.

Original entry on oeis.org

9, 8, 18, 7, 17, 36, 6, 16, 35, 72, 5, 15, 34, 71, 144, 4, 14, 33, 70, 143, 288, 3, 13, 32, 69, 142, 287, 576, 2, 12, 31, 68, 141, 286, 575, 1152, 1, 11, 30, 67, 140, 285, 574, 1151, 2304, 0, 10, 29, 66, 139, 284, 573, 1150, 2303, 4608, -1, 9, 28, 65, 138, 283, 572, 1149, 2302, 4607, 9216
Offset: 0

Views

Author

Paul Curtz, Mar 05 2024

Keywords

Comments

Just after A367559 and A368826.

Examples

			Table begins:
       k=0  1  2  3   4   5
  n=0:   9 18 36 72 144 288 ...
  n=1:   8 17 35 71 143 287 ...
  n=2:   7 16 34 70 142 286 ...
  n=3:   6 15 33 69 141 285 ...
  n=4:   5 14 32 68 140 284 ...
  n=5:   4 13 31 67 139 283 ...
Every line has the signature (3,-2). For n=1: 3*17 - 2*8 = 35.
Main diagonal's difference table:
  9   17   34   69   140   283   570  1145  ...  =  b(n)
  8   17   35   71   143   287   575  1151  ...  =  A052996(n+2)
  9   18   36   72   144   288   576  1152  ...  =  A005010(n)
  ...
b(n+1) - 2*b(n) = A023443(n).
		

Crossrefs

Programs

  • Mathematica
    T[n_, k_] := 9*2^k - n; Table[T[n - k, k], {n, 0, 10}, {k, 0, n}] // Flatten (* Amiram Eldar, Mar 06 2024 *)

Formula

T(0,k) = 9*2^k = A005010(k);
T(1,k) = 9*2^k - 1 = A052996(k+2);
T(2,k) = 9*2^k - 2 = A176449(k);
T(3,k) = 9*2^k - 3 = 3*A083329(k);
T(4,k) = 9*2^k - 4 = A053209(k);
T(5,k) = 9*2^k - 5 = A304383(k+3);
T(6,k) = 9*2^k - 6 = 3*A033484(k);
T(7,k) = 9*2^k - 7 = A154251(k+1);
T(8,k) = 9*2^k - 8 = A048491(k);
T(9,k) = 9*2^k - 9 = 3*A000225(k).
G.f.: (9 - 9*y + x*(11*y - 10))/((1 - x)^2*(1 - y)*(1 - 2*y)). - Stefano Spezia, Mar 17 2024
Showing 1-6 of 6 results.