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 11-20 of 27 results. Next

A064222 a(0) = 0; a(n) = DecimalDigitsSortedDecreasing(a(n-1) + 1) for n > 0.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 21, 22, 32, 33, 43, 44, 54, 55, 65, 66, 76, 77, 87, 88, 98, 99, 100, 110, 111, 211, 221, 222, 322, 332, 333, 433, 443, 444, 544, 554, 555, 655, 665, 666, 766, 776, 777, 877, 887, 888, 988, 998, 999, 1000, 1100, 1110, 1111, 2111
Offset: 0

Views

Author

Reinhard Zumkeller, Sep 21 2001

Keywords

Comments

a(n) = A004186(a(n-1) + 1). - Reinhard Zumkeller, Oct 31 2007

Crossrefs

Programs

  • Haskell
    a064222 n = a064222_list !! n
    a064222_list = iterate (a004186 . (+ 1)) 0
    -- Reinhard Zumkeller, Apr 11 2012
  • Mathematica
    NestList[FromDigits[Sort[IntegerDigits[#+1],Greater]]&,0,60] (* Harvey P. Dale, Sep 04 2011 *)

Formula

a(n+1) = (d+0^d)*10^floor(log_10(a(n)+1)) + (1-0^d)*floor(a(n)/10), where d = (a(n)+1) mod 10. - Reinhard Zumkeller, Oct 31 2007
a(n) = (ceiling( (n-G(D(n)-1))/D(n) )*(10^D(n) -1) - 10^( (G(D(n)-1)-n) mod (D(n)) ) + 1)/9, for n>0, where D(n) = floor( (sqrt(8n+1)+3)/6 ) is the number of digits in a(n), and G(k) = A027468(k) = 9*k*(k+1)/2. - Stefan Alexandru Avram, May 24 2023

A283394 a(n) = 3*n*(3*n + 7)/2 + 4.

Original entry on oeis.org

4, 19, 43, 76, 118, 169, 229, 298, 376, 463, 559, 664, 778, 901, 1033, 1174, 1324, 1483, 1651, 1828, 2014, 2209, 2413, 2626, 2848, 3079, 3319, 3568, 3826, 4093, 4369, 4654, 4948, 5251, 5563, 5884, 6214, 6553, 6901, 7258, 7624, 7999, 8383, 8776, 9178, 9589, 10009
Offset: 0

Views

Author

Bruno Berselli, Mar 23 2017

Keywords

Comments

Sum_{k = 0..n} (3*k + r)^3 is divisible by 3*n*(3*n + 2*r + 3)/2 + r^2: the sequence corresponds to the case r = 2 of this formula (other cases are listed in Crossrefs section).
Also, Sum_{k = 0..n} (3*k + 2)^3 / a(n) gives 2, 7, 15, 26, 40, 57, 77, 100, 126, 155, 187, 222, ... (A005449).
a(n) is even if n belongs to A014601. No term is divisible by 3, 5, 7 and 11.

Crossrefs

Sequences with formula 3*n*(3*n + 2*r + 3)/2 + r^2: A038764 (r=-1), A027468 (r=0), A081271 (r=1), this sequence (r=2), A027468 (r=3; offset: -1), A080855 (r=4; offset: -2).

Programs

  • Magma
    [3*n*(3*n+7)/2+4: n in [0..50]];
    
  • Mathematica
    Table[3 n (3 n + 7)/2 + 4, {n, 0, 50}]
    LinearRecurrence[{3,-3,1},{4,19,43},50] (* Harvey P. Dale, Mar 02 2019 *)
  • Maxima
    makelist(3*n*(3*n+7)/2+4, n, 0, 50);
    
  • PARI
    a(n) = 3*n*(3*n + 7)/2 + 4; \\ Indranil Ghosh, Mar 24 2017
  • Python
    [3*n*(3*n+7)/2+4 for n in range(50)]
    
  • Sage
    [3*n*(3*n+7)/2+4 for n in range(50)]
    

Formula

O.g.f.: (4 + 7*x - 2*x^2)/(1 - x)^3.
E.g.f.: (8 + 30*x + 9*x^2)*exp(x)/2.
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3).
a(n) = A081271(-n-2).
a(n) = 3*A095794(n+1) + 1.
a(n) = A034856(3*n+2) = A101881(6*n+2) = A165157(6*n+3) = A186349(6*n+3).
The inverse binomial transform yields 4, 15, 9, 0 (0 continued), therefore:
a(n) = 4*binomial(n,0) + 15*binomial(n,1) + 9*binomial(n,2).

A102741 a(n) = 3^4 * binomial(n+3, 4).

Original entry on oeis.org

81, 405, 1215, 2835, 5670, 10206, 17010, 26730, 40095, 57915, 81081, 110565, 147420, 192780, 247860, 313956, 392445, 484785, 592515, 717255, 860706, 1024650, 1210950, 1421550, 1658475, 1923831, 2219805, 2548665, 2912760, 3314520, 3756456, 4241160, 4771305, 5349645
Offset: 1

Views

Author

Zerinvary Lajos, Aug 06 2008

Keywords

Crossrefs

Cf. A027465.
Sequences of the form 3^m*binomial(n+m-1, m): A008585 (m=1), A027468 (m=2), A134171 (m=3), this sequence (m=4), A113335 (m=5).

Programs

  • Magma
    [3^4*Binomial(n+3,4): n in [1..30]]; // G. C. Greubel, May 17 2021
    
  • Maple
    seq(binomial(n+3,4)*3^4, n=1..27);
  • Mathematica
    With[{c=3^4},Table[c Binomial[n+3,4],{n,40}]]  (* Harvey P. Dale, Mar 12 2011 *)
  • Sage
    [3^4*binomial(n+3,4) for n in (1..30)] # G. C. Greubel, May 17 2021

Formula

G.f.: 81*x/(1-x)^5. - Maksym Voznyy (voznyy(AT)mail.ru), Aug 11 2009
E.g.f.: (27/8)*x*(24 + 36*x + 12*x^2 + x^3)*exp(x). - G. C. Greubel, May 17 2021
From Amiram Eldar, Aug 28 2022: (Start)
Sum_{n>=1} 1/a(n) = 4/243.
Sum_{n>=1} (-1)^(n+1)/a(n) = 32*log(2)/81 - 64/243. (End)

A134171 a(n) = (9/2)*(n-1)*(n-2)*(n-3).

Original entry on oeis.org

0, 0, 0, 27, 108, 270, 540, 945, 1512, 2268, 3240, 4455, 5940, 7722, 9828, 12285, 15120, 18360, 22032, 26163, 30780, 35910, 41580, 47817, 54648, 62100, 70200, 78975, 88452, 98658, 109620, 121365, 133920, 147312, 161568, 176715, 192780, 209790, 227772, 246753
Offset: 1

Views

Author

N. J. A. Sloane, Jan 30 2008

Keywords

Comments

Number of n permutations (n>=3) of 4 objects u, v, z, x with repetition allowed, containing n-3=0 u's. Example: if n=3 then n-3 =zero u, a()=27 because we have vzx, vxz, zvx, zxv, xvz, xzv, vvv, zzz, xxx, vvx, vxv, xvv, xxv, xvx, vxx, vvz, vzv, zvv, zzv, zvz, vzz, xzz, zxz, zzx, xxz, xzx, zxx. A027465 formatted as a triangular array: diagonal: 27, 108, 270, 540, 945, 1512. - Zerinvary Lajos, Aug 06 2008

Crossrefs

Programs

  • Magma
    [(9/2)*(n-1)*(n-2)*(n-3) : n in [1..50]]; // Wesley Ivan Hurt, May 29 2016
  • Maple
    seq(27*binomial(n-1, 3), n=1..30); # Zerinvary Lajos, May 18 2008
  • Mathematica
    LinearRecurrence[{4,-6,4,-1}, {0,0,0,27}, 50] (* G. C. Greubel, May 29 2016 *)

Formula

a(n) = 27 * binomial(n-1,3). - Zerinvary Lajos, Aug 06 2008
From Chai Wah Wu, May 29 2016: (Start)
a(n) = 4*a(n-1) - 6*a(n-2) + 4*a(n-3) - a(n-4) for n>4.
G.f.: 27*x^4/(1-x)^4. (End)
E.g.f.: 27 + (9/2*(x^3-3*x^2+6*x-6))*exp(x). - G. C. Greubel, May 17 2021
a(n) = 27 * A000292(n-3) for n >= 3. - Alois P. Heinz, May 17 2021
From Amiram Eldar, Sep 24 2022: (Start)
Sum_{n>=4} 1/a(n) = 1/18.
Sum_{n>=4} (-1)^n/a(n) = 4*log(2)/9 - 5/18. (End)

A113335 a(n) = 3^5 * binomial(n+4, 5).

Original entry on oeis.org

243, 1458, 5103, 13608, 30618, 61236, 112266, 192456, 312741, 486486, 729729, 1061424, 1503684, 2082024, 2825604, 3767472, 4944807, 6399162, 8176707, 10328472, 12910590, 15984540, 19617390, 23882040, 28857465, 34628958, 41288373, 48934368, 57672648, 67616208
Offset: 1

Views

Author

Zerinvary Lajos, Aug 06 2008

Keywords

Crossrefs

Cf. A027465.
Sequences of the form 3^m*binomial(n+m-1, m): A008585 (m=1), A027468 (m=2), A134171 (m=3), A102741 (m=4), this sequence (m=5).

Programs

  • Magma
    [3^5*Binomial(n+4,5): n in [1..30]]; // G. C. Greubel, May 17 2021
    
  • Maple
    seq(binomial(n+4,5)*3^5, n=1..27);
  • Mathematica
    With[{c=3^5},Table[c Binomial[n+4,5],{n,30}]]  (* Harvey P. Dale, Apr 11 2011 *)
  • Sage
    [3^5*binomial(n+4,5) for n in (1..30)] # G. C. Greubel, May 17 2021

Formula

a(n) = 3^5 * binomial(n+4, 5), n >= 1.
From G. C. Greubel, May 17 2021: (Start)
G.f.: 243*x/(1-x)^6.
E.g.f.: (81/40)*x*(120 + 240*x + 120*x^2 + 20*x^3 + x^4)*exp(x). (End)
From Amiram Eldar, Aug 29 2022: (Start)
Sum_{n>=1} 1/a(n) = 5/972.
Sum_{n>=1} (-1)^(n+1)/a(n) = 80*log(2)/243 - 655/2916. (End)

A198392 a(n) = (6*n*(3*n+7)+(2*n+13)*(-1)^n+3)/16 + 1.

Original entry on oeis.org

2, 4, 12, 18, 31, 41, 59, 73, 96, 114, 142, 164, 197, 223, 261, 291, 334, 368, 416, 454, 507, 549, 607, 653, 716, 766, 834, 888, 961, 1019, 1097, 1159, 1242, 1308, 1396, 1466, 1559, 1633, 1731, 1809, 1912, 1994, 2102, 2188, 2301, 2391, 2509, 2603, 2726, 2824, 2952
Offset: 0

Views

Author

Bruno Berselli, Oct 25 2011

Keywords

Comments

For an origin of this sequence, see the triangular spiral illustrated in the Links section.
First bisection gives A117625 (without the initial term).

Crossrefs

Cf. A152832 (by Superseeker).
Cf. sequences related to the triangular spiral: A022266, A022267, A027468, A038764, A045946, A051682, A062708, A062725, A062728, A062741, A064225, A064226, A081266-A081268, A081270-A081272, A081275 [incomplete list].

Programs

  • Magma
    [(6*n*(3*n+7)+(2*n+13)*(-1)^n+3)/16+1: n in [0..50]];
  • Mathematica
    LinearRecurrence[{1,2,-2,-1,1},{2,4,12,18,31},60] (* Harvey P. Dale, Jun 15 2022 *)
  • PARI
    for(n=0, 50, print1((6*n*(3*n+7)+(2*n+13)*(-1)^n+3)/16+1", "));
    

Formula

G.f.: (2+2*x+4*x^2+2*x^3-x^4)/((1+x)^2*(1-x)^3).
a(n) = a(n-1)+2*a(n-2)-2*a(n-3)-a(n-4)+a(n-5).
a(n)-a(-n-1) = A168329(n+1).
a(n)+a(n-1) = A102214(n).
a(2n)-a(2n-1) = A016885(n).
a(2n+1)-a(2n) = A016825(n).

A275414 Triangle read by rows: T(n,k) is the number of multisets of k ternary words with a total of n letters.

Original entry on oeis.org

3, 9, 6, 27, 27, 10, 81, 126, 54, 15, 243, 486, 297, 90, 21, 729, 1836, 1380, 540, 135, 28, 2187, 6561, 5994, 2763, 855, 189, 36, 6561, 23004, 24543, 13212, 4635, 1242, 252, 45, 19683, 78732, 96723, 59130, 23490, 6996, 1701, 324, 55, 59049, 265842, 368874, 253719
Offset: 1

Views

Author

R. J. Mathar, Jul 27 2016

Keywords

Comments

Ternary analog of A209406. Multiset transformation of A000244.

Examples

			      3
      9       6
     27      27      10
     81     126      54      15
    243     486     297      90      21
    729    1836    1380     540     135      28
   2187    6561    5994    2763     855     189      36
   6561   23004   24543   13212    4635    1242     252      45
  19683   78732   96723   59130   23490    6996    1701     324      55
  59049  265842  368874  253719  111609   36828    9846    2232     405      66
		

Crossrefs

Cf. A144067 (row sums), A000244 (column 1), A027468 (subdiagonal ?).

Programs

  • Maple
    b:= proc(n, i, p) option remember; `if`(p>n, 0, `if`(n=0, 1,
          `if`(min(i, p)<1, 0, add(b(n-i*j, i-1, p-j)*
           binomial(3^i+j-1, j), j=0..min(n/i, p)))))
        end:
    T:= (n, k)-> b(n$2, k):
    seq(seq(T(n, k), k=1..n), n=1..14);  # Alois P. Heinz, Apr 13 2017
  • Mathematica
    b[n_, i_, p_] := b[n, i, p] = If[p > n, 0, If[n == 0, 1, If[Min[i, p] < 1, 0, Sum[b[n - i*j, i-1, p - j]*Binomial[3^i + j - 1, j], {j, 0, Min[n/i, p]}]]]];
    T[n_, k_] := b[n, n, k];
    Table[T[n, k], {n, 1, 14}, {k, 1, n}] // Flatten (* Jean-François Alcover, May 19 2018, after Alois P. Heinz *)

Formula

T(n,1) = A000244(n).
T(n,k) = Sum_{c_i*N_i=n,i=1..k} binomial(T(N_i,1)+c_i-1,c_i) for 1
G.f.: Product_{j>=1} (1-y*x^j)^(-3^j). - Alois P. Heinz, Apr 13 2017

A370347 Number T(n,k) of partitions of [3n] into n sets of size 3 having exactly k sets {3j-2,3j-1,3j} (1<=j<=n); triangle T(n,k), n>=0, 0<=k<=n, read by rows.

Original entry on oeis.org

1, 0, 1, 9, 0, 1, 252, 27, 0, 1, 14337, 1008, 54, 0, 1, 1327104, 71685, 2520, 90, 0, 1, 182407545, 7962624, 215055, 5040, 135, 0, 1, 34906943196, 1276852815, 27869184, 501795, 8820, 189, 0, 1, 8877242235393, 279255545568, 5107411260, 74317824, 1003590, 14112, 252, 0, 1
Offset: 0

Author

Alois P. Heinz, Feb 15 2024

Keywords

Examples

			T(2,0) = 9: 124|356, 125|346, 126|345, 134|256, 135|246, 136|245, 145|236, 146|235, 156|234.
T(2,2) = 1: 123|456.
Triangle T(n,k) begins:
            1;
            0,          1;
            9,          0,        1;
          252,         27,        0,      1;
        14337,       1008,       54,      0,    1;
      1327104,      71685,     2520,     90,    0,   1;
    182407545,    7962624,   215055,   5040,  135,   0, 1;
  34906943196, 1276852815, 27869184, 501795, 8820, 189, 0, 1;
  ...
		

Crossrefs

Row sums give A025035.
Column k=0 gives A370357.
T(n+1,n-1) gives A027468.
T(n+2,n-1) gives 252*A000292.

Programs

  • Maple
    b:= proc(n) option remember; `if`(n<3, [1, 0, 9][n+1],
          9*(n*(n-1)/2*b(n-1)+(n-1)^2*b(n-2)+(n-1)*(n-2)/2*b(n-3)))
        end:
    T:= (n, k)-> b(n-k)*binomial(n, k):
    seq(seq(T(n, k), k=0..n), n=0..10);

Formula

T(n,k) = binomial(n,k) * A370357(n-k).
Sum_{k=1..n} T(n,k) = A370358(n).
T(n,k) mod 9 = A023531(n,k).

A124110 Primes of the form A124080 (10 times triangular numbers) +- 1.

Original entry on oeis.org

11, 29, 31, 59, 61, 101, 149, 151, 211, 281, 359, 449, 659, 661, 911, 1049, 1051, 1201, 1361, 1531, 1709, 1901, 2099, 2309, 2311, 2531, 2999, 3001, 3251, 3511, 3779, 4349, 4649, 4651, 5279, 5281, 6299, 6301, 6659, 6661, 7411, 8609, 9029, 9461, 9901, 11279
Offset: 1

Author

Jonathan Vos Post, Nov 26 2006

Keywords

Comments

Numbers j such that A124080(j)-1 is prime or A124080(j)+1 is prime, where repetition means a twin prime, are 1, 2, 2, 3, 3, 4, 5, 5, 6, 7, 8, 9, 11, 11, 13, 14, 14, 15, 16, 17, 18, 19, 20, 21, 21, 22, 24, 24, 25, ..., . - Robert G. Wilson v, Nov 29 2006

Examples

			a(1) = A124080(1)+1 = (10*T(1)) - 1 = 10*(1*(1+1)/2) + 1 = 10+1 = 11 is prime.
a(2) = A124080(2)-1 = (10*T(2))-1 = 10*(2*(2+1)/2) - 1 = 30-1 = 29 is prime.
a(3) = A124080(2)+1 = (10*T(2))+1 = 10*(2*(2+1)/2) + 1 = 30+1 = 31 is prime.
		

Programs

  • Mathematica
    s = {}; Do[t = 5n(n + 1); If[PrimeQ[t - 1], AppendTo[s, t - 1]]; If[PrimeQ[t + 1], AppendTo[s, t + 1]], {n, 47}]; s (* Robert G. Wilson v *)

Formula

{A124080(j)-1 when prime} U {A124080(j)+1 when prime} = {i = 10*T(j)-1 such that i is prime} U {i = 10*T(j)+1 such that i is prime} where T(j) = A000217(j) = j*(j+1)/2.

Extensions

More terms from Robert G. Wilson v, Nov 29 2006

A124007 Number of permutations of n distinct letters (ABCD...) each of which appears thrice with n-3 fixed points.

Original entry on oeis.org

0, 0, 54, 216, 540, 1080, 1890, 3024, 4536, 6480, 8910, 11880, 15444, 19656, 24570
Offset: 0

Author

Zerinvary Lajos, Nov 01 2006

Keywords

Examples

			Maple produces the following triangle - the entries in quotes give the sequence:
1
"0", 0, 0, 1
1, 0, 9, "0", 9, 0, 1
56, 216, 378, 435, 324, 189, "54", 27, 0, 1
13833, 49464, 84510, 90944, 69039, 38448, 16476, 5184, 1431, "216", 54, 0, 1
6699824, 23123880, 38358540, 40563765, 30573900, 17399178, 7723640, 2729295, 776520, 180100, 33372, 5355, "540", 90, 0, 1
etc...
		

Crossrefs

Programs

  • Maple
    p := (x, k)->k!^2*sum(x^j/((k-j)!^2*j!), j=0..k); R := (x, n, k)->p(x, k)^n; f := (t, n, k)->sum(coeff(R(x, n, k), x, j)*(t-1)^j*(n*k-j)!, j=0..n*k); for n from 0 to 6 do seq(coeff(f(t, n, 3), t, m)/3!^n, m=0..3*n); od;
Previous Showing 11-20 of 27 results. Next