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 31-35 of 35 results.

A349544 Smallest possible value of |Sum_{k=0..n} (+-) 2^k * 3^(n-k)|, where each (+-) can be either plus or minus sign, independently for each term in the sum.

Original entry on oeis.org

1, 1, 1, 5, 1, 19, 7, 5, 65, 61, 73, 227, 257, 5, 439, 1253, 2425, 2035, 833, 2677, 10591, 6509, 32071, 41173, 77263, 114323, 18145, 129685, 321151, 15757, 645449, 113957, 50735, 477653, 24295, 5089013, 3743881, 4809115, 12209455, 8216179, 32894927, 80299843, 45673913
Offset: 0

Views

Author

Vladimir Reshetnikov, Nov 21 2021

Keywords

Comments

All terms are positive odd integers.

Examples

			For n = 3, there are 2^3 = 8 possible choices of signs: 3^3 + 2*3^2 + 2^2*3 + 2^3 = 65, 3^3 + 2*3^2 + 2^2*3 - 2^3 = 49, 3^3 + 2*3^2 - 2^2*3 + 2^3 = 41, 3^3 + 2*3^2 - 2^2*3 - 2^3 = 25, 3^3 - 2*3^2 + 2^2*3 + 2^3 = 29, 3^3 - 2*3^2 + 2^2*3 - 2^3 = 13, 3^3 - 2*3^2 - 2^2*3 + 2^3 = 5, and 3^3 - 2*3^2 - 2^2*3 - 2^3 = -11. The smallest absolute value is 5, so a(3) = 5.
		

Crossrefs

Programs

  • Maple
    b:= proc(k, n) option remember; `if`(k<0, {0}, map(x->
         (t-> [x+t, abs(x-t)][])(2^(n-k)*3^k), b(k-1, n)))
        end:
    a:= n-> min(b(n$2)):
    seq(a(n), n=0..18);  # Alois P. Heinz, Nov 21 2021
  • Mathematica
    Min@*Abs/@FoldList[Join[3 #1 + 2^#2, 3 #1 - 2^#2] &, {1}, Range[25]]
  • Python
    def f(k,n):
        if k == 0 and n == 0: return (x for x in (1,))
        if k < n: return (y*3 for y in f(k,n-1))
        return (abs(x+y) for x in f(k-1,n) for y in (2**n,-2**n))
    def A349544(n): return min(f(n,n)) # Chai Wah Wu, Nov 24 2021

Extensions

a(33)-a(35) from Chai Wah Wu, Nov 24 2021
a(36)-a(42) from Martin Ehrenstein, Nov 26 2021

A136099 Triangle read by rows: the number of ways to factor 5*2^(n-k)*3^k, columns 0<=k<=n, rows n>=0.

Original entry on oeis.org

1, 2, 2, 4, 5, 4, 7, 11, 11, 7, 12, 21, 26, 21, 12, 19, 38, 52, 52, 38, 19, 30, 64, 98, 109, 98, 64, 30, 45, 105, 171, 212, 212, 171, 105, 45, 67, 165, 289, 382, 424, 382, 289, 165, 67, 97, 254, 467, 662, 783, 783, 662, 467, 254, 97, 139, 381, 737, 1097, 1386, 1481, 1386, 1097, 737, 381, 139
Offset: 0

Views

Author

Alford Arnold, Dec 15 2007

Keywords

Comments

Second in the series of arrays beginning with A054225.

Examples

			5*A036561(2,1) = 5*6 = 30 and there are five ways to factor 30.
Triangle begins:
   1;
   2,  2;
   4,  5,  4;
   7, 11, 11,   7;
  12, 21, 26,  21, 12;
  19, 38, 52,  52, 38, 19;
  30, 64, 98, 109, 98, 64, 30;
  ...
		

Crossrefs

Formula

T(n,k) = A001055(5*A036561(n,k)).

A230435 Triangle by rows, A001047 convolved with A000079.

Original entry on oeis.org

1, 2, 5, 4, 10, 19, 8, 20, 38, 65, 16, 40, 76, 130, 211, 32, 80, 152, 260, 422, 665, 64, 160, 304, 520, 844, 1330, 2059, 128, 320, 608, 1040, 1688, 2660, 4118, 6305, 256, 640, 1216, 2080, 3376, 5320, 8236, 12610, 19171
Offset: 0

Views

Author

Christopher Tompkins, Nov 18 2013

Keywords

Comments

Generated from Running Total of each row of A036561.
Left edge is A000079 (offset 0): (1, 2, 4, 8, 16, 32, 64, ...)
Right edge is A001047 (offset 1): (1, 5, 19, 65, 211, 665, ...)
Row sums are A066810 (offset 2): (1, 7, 33, 131, 473, 1611, ...)

Examples

			The start of the sequence as a triangle read by rows:
  1;
  2,  5;
  4,  10, 19;
  8,  20, 38,  65;
  16, 40, 76,  130, 211;
  32, 80, 152, 260, 422, 665;
  ...
		

Crossrefs

Programs

  • Mathematica
    T[n_,k_]:=Sum[3^j*2^(n-j),{j,0,k}];Flatten[Table[T[n,k],{n,0,8},{k,0,n}]] (* Detlef Meya, Dec 20 2023 *)

Formula

T(n,k) = Sum_{j=0..k} 3^j*2^(n-j). - Detlef Meya, Dec 20 2023
T(n,k) = 2^n*(3*(3/2)^k-2). - Alois P. Heinz, Dec 20 2023

A323013 Form of Zorach additive triangle T(n,k) (see A035312) where each number is sum of west and northwest numbers, with the additional condition that the first element T(n,1) is a Fibonacci number.

Original entry on oeis.org

1, 2, 3, 5, 7, 10, 8, 13, 20, 30, 21, 29, 42, 62, 92, 34, 55, 84, 126, 188, 280, 89, 123, 178, 262, 388, 576, 856, 144, 233, 356, 534, 796, 1184, 1760, 2616, 377, 521, 754, 1110, 1644, 2440, 3624, 5384, 8000, 610, 987, 1508, 2262, 3372, 5016, 7456, 11080, 16464, 24464
Offset: 1

Views

Author

Michel Lagneau, Jan 02 2019

Keywords

Comments

Conjecture: Let F(i) be the i-th Fibonacci number. Each number of T(n, k), k = 1, 2, 3 is the difference between two Fibonacci numbers F(i) - F(j) for some i, j, where F(i) is the smallest Fibonacci number greater than T(n, k). The case T(n, 1) is trivial. Examples: 10 = 13 - 3, 29 = 34 - 5, 20 = 21 - 1, 42 = 55 - 13, 84 = 89 - 5, ...
We observe interesting properties:
T(n,1) = A117647(n) = 1, 2, 5, 8, 21, ... where n = 1, 2, ...
T(2n,2) = A033887(n) = 3, 13, 55, ... (Fibonacci(3n+1)), and T(2n+1,2) = A048876(n) = 7, 29, 123, ... (Generalized Pell equation with second term of 7) where n = 1, 2, ...
T(3n,3) = 10, 84, 754, 6388,... If n = 2m - 1, T(6m - 3, 3) = F(9m - 2) - F(9m - 5) and if n = 2m, T(6m, 3) = F(9m + 2) - F(9m - 4).
T(3n+1,3) = 20, 178, 1508, 13530, ... If n = 2m - 1, T(6m - 2, 3) = F(9m - 1) - F(9m - 7) and if n = 2m, T(6m+1, 3) = F(9m + 4) - F(9m + 1).
T(3n+2,3) = 42, 356, 3194, 27060, ... If n = 2m - 1, T(6m - 1, 3) = F(9m + 1) - F(9m - 2) and if n = 2m, T(6m + 2, 3) = F(9m + 5) - F(9m - 1).
Other property:
T(2m, 1) + T(2m, 2) = T(2m +1, 1) with T(2m, 1)= F(3m), T(2m, 2) = F(3m + 1) and T(2m + 1, 1) = F(3m + 2).
T(2m + 1, 1) + T(2m + 1, 2) = F(3m + 4) - F(3m - 1).

Examples

			The start of the sequence as a triangular array T(n, k) read by rows:
   1;
   2,   3;
   5,   7,  10;
   8,  13,  20,   30;
  21,  29,  42,   62,   92;
  34,  55,  84,  126,  188,  280;
  ...
		

Crossrefs

Programs

  • Maple
    with(combinat,fibonacci):
    lst:={1}:lst2:=lst:
    for n from 2 to 15 do :
    lst1:={}:ii:=0:
      for j from 1 to 1000 while(ii=0) do:
         i:=fibonacci(j):
         if {i} intersect lst2 = {} and {i+lst[1]} intersect lst2 = {}
          then
          lst1:=lst1 union {i}:ii:=1:
          else
         fi:
       od:
        for k from 1 to n-1 do:
          lst1:=lst1 union {lst1[k]+lst[k]}:
        od:
        lst:=lst1:lst2:=lst2 union lst:
        print(lst1):
       od:

A385178 Triangle T(n,k) read by rows in which the n-th diagonal lists the n-th differences of A001047, 0 <= k <= n.

Original entry on oeis.org

0, 1, 1, 3, 4, 5, 7, 10, 14, 19, 15, 22, 32, 46, 65, 31, 46, 68, 100, 146, 211, 63, 94, 140, 208, 308, 454, 665, 127, 190, 284, 424, 632, 940, 1394, 2059, 255, 382, 572, 856, 1280, 1912, 2852, 4246, 6305, 511, 766, 1148, 1720, 2576, 3856, 5768, 8620, 12866, 19171
Offset: 0

Views

Author

Paul Curtz, Jun 20 2025

Keywords

Examples

			Triangle begins:
    0;
    1,   1;
    3,   4,    5;
    7,  10,   14,   19;
   15,  22,   32,   46,   65;
   31,  46,   68,  100,  146,  211;
   63,  94,  140,  208,  308,  454,  665;
  127, 190,  284,  424,  632,  940, 1394, 2059;
  255, 382,  572,  856, 1280, 1912, 2852, 4246,  6305;
  511, 766, 1148, 1720, 2576, 3856, 5768, 8620, 12866, 19171;
  ...
		

Crossrefs

Columns k=0..2: A000225, A033484, A053209 (sans 1).
Diagonals: A001047, A027649, A053581 (sans 1), A291012 (sans 2).

Programs

  • Magma
    /* As triangle */ [[2^(n-k)*3^k - 2^k : k in [0..n]]: n in [0..9]]; // Vincenzo Librandi, Jun 27 2025
  • Maple
    T:= proc(n,k) option remember;
         `if`(n=k, 3^n-2^n, T(n, k+1)-T(n-1, k))
        end:
    seq(seq(T(n, k), k=0..n), n=0..10);  # Alois P. Heinz, Jun 24 2025
  • Mathematica
    t[n_, 0] := 3^n - 2^n; t[n_, k_] := t[n, k] = t[n + 1, k - 1] - t[n, k - 1]; Table[t[k, n - k], {n, 0, 9}, {k, 0, n}] // Flatten (* Amiram Eldar, Jun 20 2025 *)

Formula

T(n,n) = 3^n - 2^n = A001047(n).
T(n,k) = T(n,k+1) - T(n-1,k) for 0 <= k < n.
T(n,k) = 2^(n-k)*3^k - 2^k = A036561(n,k) - A059268(n,k).
T(2n,n) = A248216(n+1).
Previous Showing 31-35 of 35 results.