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

A155597 a(n) = 6^n - 2^n + 1.

Original entry on oeis.org

1, 5, 33, 209, 1281, 7745, 46593, 279809, 1679361, 10077185, 60465153, 362795009, 2176778241, 13060685825, 78364147713, 470184951809, 2821109841921, 16926659313665, 101559956406273, 609359739486209, 3656158439014401, 21936950638280705, 131621703838072833
Offset: 0

Views

Author

Mohammad K. Azarian, Jan 25 2009

Keywords

Crossrefs

Programs

  • Mathematica
    Table[6^n-2^n+1,{n,0,20}] (* or *) LinearRecurrence[{9,-20,12},{1,5,33},20] (* Harvey P. Dale, Jul 13 2011 *)
  • PARI
    a(n) = 6^n-2^n+1 \\ Charles R Greathouse IV, Jul 25 2011

Formula

G.f.: 1/(1-6*x)-1/(1-2*x)+1/(1-x).
E.g.f.: exp(6*x)-exp(2*x)+exp(x).
a(n) = 8*a(n-1)-12*a(n-2)+5 with a(0)=1, a(1)=5. - Vincenzo Librandi, Jul 21 2010
a(0)=1, a(1)=5, a(2)=33, a(n) = 9*a(n-1)-20*a(n-2)+12*a(n-3). - Harvey P. Dale, Jul 13 2011
a(n) = A248216(n)+1. - R. J. Mathar, Mar 10 2022

A248217 a(n) = 8^n - 2^n.

Original entry on oeis.org

0, 6, 60, 504, 4080, 32736, 262080, 2097024, 16776960, 134217216, 1073740800, 8589932544, 68719472640, 549755805696, 4398046494720, 35184372056064, 281474976645120, 2251799813554176, 18014398509219840, 144115188075331584, 1152921504605798400
Offset: 0

Views

Author

Vincenzo Librandi, Oct 04 2014

Keywords

Comments

If 2^(n+1) is the length of the even leg of a primitive Pythagorean triangle (PPT) then it constrains the odd leg to have a length of 4^n-1 and the hypotenuse to have a length of 4^n+1. The resulting triangle has a semiperimeter of 4^n+2^n, an area of 8^n-2^n and an inradius of 2^n-1. For n > 0, a(n) is the area of such triangles. - Frank M Jackson, Sep 07 2018
Maximum anomalous cancellation multiplicity of (2n+1)-digit integers: number of (2n+1)-digit integers which can be anomalously canceled with a fixed (2n+1)-digit integer. The maximum is obtained at 88...88911...11 containing n 8's and n 1's (see Example below). Anomalous cancellation is a "canceling" of digits of a and b in the numerator and denominator of a fraction a/b which results in a fraction equal to the original, and no 0 or digits that appear different times in a and b are canceled. For example, 49/98 = 4/8, 138/184 = 3/4, 1985/5955 = 185/555, 88911/43956 = 8811/4356, but 120/340 is not because canceling the 0's is not an anomalous cancellation. - Xiaohan Zhang, Nov 21 2019

Examples

			For n=1, there are 6 numbers with 3 digits that can be anomalously canceled with 891: 297, 396, 495, 594, 693, 792. For n=2 there are 60 numbers with 88911: 12987, 13986, 14985, 15984, 16983, 17982, 21978, 22977, 23976, 24975, 25974, 26973, 27972, 28971, 31968, 32967, 33966, 34965, 35964, 36963, 37962, 38961, 41958, 42957, 43956, 44955, 45954, 46953, 47952, 48951, 51948, 52947, 53946, 54945, 55944, 56943, 57942, 58941, 61938, 62937, 63936, 64935, 65934, 66933, 67932, 68931, 71928, 72927, 73926, 74925, 75924, 76923, 77922, 78921, 82917, 83916, 84915, 85914, 86913, 87912. For n=3 504 numbers with 8889111, and no other (2n+1)-digit number has greater multiplicity. There seems to be a pattern of integer partitions in these examples, because the sum of the digits of numbers above are all multiples of 9. - _Xiaohan Zhang_, Nov 21 2019
		

Crossrefs

Cf. similar sequences listed in A248216.

Programs

  • Magma
    [8^n-2^n: n in [0..25]];
    
  • Mathematica
    Table[8^n - 2^n, {n, 0, 25}] (* or *) CoefficientList[Series[6 x /((1 - 2 x) (1 - 8 x)), {x, 0, 30}], x]
    LinearRecurrence[{10,-16},{0,6},30] (* Harvey P. Dale, Mar 29 2015 *)
  • PARI
    a(n) = 8^n-2^n; \\ Altug Alkan, Sep 07 2018
    
  • Python
    def A248217(n): return 6*binomial(pow(2,n) +1, 3)
    print([A248217(n) for n in range(41)]) # G. C. Greubel, Dec 26 2024

Formula

G.f.: 6*x/((1-2*x)*(1-8*x)).
a(n) = 10*a(n-1) - 16*a(n-2).
a(n) = 2^n*(4^n-1) = A000079(n) * A024036(n) = A001018(n) - A000079(n).
E.g.f.: exp(2*x)*(-1 + exp(6*x)). - Stefano Spezia, Sep 07 2018
a(n) = 6*A016131(n-1). - R. J. Mathar, Mar 10 2022

A174719 Triangle T(n, k, q) = (1-q^n)*( binomial(n, k) - 1 ) + 1, with q = 3, read by rows.

Original entry on oeis.org

1, 1, 1, 1, -7, 1, 1, -51, -51, 1, 1, -239, -399, -239, 1, 1, -967, -2177, -2177, -967, 1, 1, -3639, -10191, -13831, -10191, -3639, 1, 1, -13115, -43719, -74323, -74323, -43719, -13115, 1, 1, -45919, -177119, -360799, -452639, -360799, -177119, -45919, 1
Offset: 0

Views

Author

Roger L. Bagula, Mar 28 2010

Keywords

Comments

The row sums of this class of sequences, for varying q, is given by Sum_{k=0..n} T(n, k, q) = q^n * (n+1) + 2^n * (1 - q^n). - G. C. Greubel, Feb 09 2021

Examples

			Triangle begins as:
  1;
  1,      1;
  1,     -7,       1;
  1,    -51,     -51,       1;
  1,   -239,    -399,    -239,       1;
  1,   -967,   -2177,   -2177,    -967,       1;
  1,  -3639,  -10191,  -13831,  -10191,   -3639,       1;
  1, -13115,  -43719,  -74323,  -74323,  -43719,  -13115,      1;
  1, -45919, -177119, -360799, -452639, -360799, -177119, -45919, 1;
		

Crossrefs

Cf. A000012 (q=1), A174718 (q=2), this sequence (q=3), A174720 (q=4).

Programs

  • Magma
    T:= func< n,k,q | 1 + (1-q^n)*(Binomial(n,k) -1) >;
    [T(n,k,3): k in [0..n], n in [0..12]]; // G. C. Greubel, Feb 09 2021
  • Mathematica
    T[n_, k_, q_]:= 1 +(1-q^n)*(Binomial[n, k] -1);
    Table[T[n,k,3], {n,0,12}, {k,0,n}]//Flatten
  • Sage
    def T(n,k,q): return 1 + (1-q^n)*(binomial(n,k) - 1)
    flatten([[T(n,k,3) for k in (0..n)] for n in (0..12)]) # G. C. Greubel, Feb 09 2021
    

Formula

T(n, k, q) = (1-q^n)*( binomial(n, k) - 1 ) + 1, with q=3.
Sum_{k=0..n} T(n, k, 3) = 3^n*(n+1) + 2^n*(1 - 3^n) = A027471(n+2) - A248216(n). - G. C. Greubel, Feb 09 2021

Extensions

Edited by G. C. Greubel, Feb 09 2021

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).
Showing 1-4 of 4 results.