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

A121662 Triangle read by rows: T(i,j) for the recurrence T(i,j) = (T(i-1,j) + 1)*i.

Original entry on oeis.org

1, 4, 2, 15, 9, 3, 64, 40, 16, 4, 325, 205, 85, 25, 5, 1956, 1236, 516, 156, 36, 6, 13699, 8659, 3619, 1099, 259, 49, 7, 109600, 69280, 28960, 8800, 2080, 400, 64, 8, 986409, 623529, 260649, 79209, 18729, 3609, 585, 81, 9, 9864100, 6235300, 2606500, 792100, 187300, 36100, 5860, 820, 100, 10
Offset: 1

Views

Author

Thomas Wieder, Aug 15 2006

Keywords

Comments

The first column is A007526 = "the number of (nonnull) "variations" of n distinct objects, namely the number of permutations of nonempty subsets of {1,...,n}." E.g. for n=3 there are 15 subsets: {a}, {b}, {c}, {ab}, {ba}, {ac}, {ca}, {bc}, {cb}, {abc}, {acb}, {bac}, {bca}, {cab}, {cba}. These are subsets with a number of elements l=1,...,n. The second column excludes all subsets with l=n elements. For n=3 one has therefore only the 9 subsets {a}, {b}, {c}, {ab}, {ba}, {ac}, {ca}, {bc}, {cb}. The third column excludes all subsets with l>=n-1 elements. For n=3 one has therefore only the 3 subsets {a}, {b},{c}. See also A121684. The second column is A038156 = n!*Sum(1/k!, k=1..n-1). The first lower diagonal are the squares A000290 = n^2. The second lower diagonal (15, 40, 85...) is A053698 = n^3 + n^2 + n + 1. The row sum is A030297 = a(n) = n*(n+a(n-1)).
T(i, j) is the total number of ordered sets of size 1 to i-j+1 that can be created from i distinct items. - Manfred Boergens, Jun 22 2022

Examples

			Triangle T(i,j) begins:
       1
       4     2
      15     9     3
      64    40    16     4
     325   205    85    25    5
    1956  1236   516   156   36   6
   13699  8659  3619  1099  259  49  7
   ...
		

Crossrefs

Mirror of triangle A285268.

Programs

  • Maple
    T:= proc(i, j) option remember;
          `if`(j<1 or j>i, 0, T(i-1, j)*i+i)
        end:
    seq(seq(T(n, k), k=1..n), n=1..10);  # Alois P. Heinz, Jun 22 2022
  • Mathematica
    Table[Sum[m!/(m - i)!, {i, n}], {m, 9}, {n, m, 1, -1}] // Flatten (* Michael De Vlieger, Apr 22 2017 *)
    (* Sum-free code *)
    b[j_] = If[j == 0, 0, Floor[j! E - 1]];
    T[i_, j_] = b[i] - i! b[j - 1]/(j - 1)!;
    Table[T[i, j], {i, 24}, {j, i}] // Flatten
    (* Manfred Boergens, Jun 22 2022 *)

Formula

From Manfred Boergens, Jun 22 2022: (Start)
T(i, j) = Sum_{k=1..i-j+1} i!/(i-k)! = Sum_{k=j-1..i-1} i!/k!.
Sum-free formula: T(i, j) = b(i) - i!*b(j-1)/(j-1)! where b(0)=0, b(j)=floor(j!*e-1) for j>0.
(End)

Extensions

Edited by N. J. A. Sloane, Sep 15 2006
Formula in name corrected by Alois P. Heinz, Jun 22 2022

A321500 Triangular table T(n,k) = (n+k)*(n^2+k^2), n >= k >= 0; read by rows n = 0, 1, 2, ...

Original entry on oeis.org

0, 1, 4, 8, 15, 32, 27, 40, 65, 108, 64, 85, 120, 175, 256, 125, 156, 203, 272, 369, 500, 216, 259, 320, 405, 520, 671, 864, 343, 400, 477, 580, 715, 888, 1105, 1372, 512, 585, 680, 803, 960, 1157, 1400, 1695, 2048
Offset: 0

Views

Author

M. F. Hasler, Nov 22 2018

Keywords

Examples

			The table starts:
n | T(n,k), k = 0..n:
0 |   0;
1 |   1,   4;
2 |   8,  15,  32;
3 |  27,  40,  65, 108;
4 |  64,  85, 120, 175, 256;
5 | 125, 156, 203, 272, 369,  500;
6 | 216, 259, 320, 405, 520,  671,  864;
7 | 343, 400, 477, 580, 715,  888, 1105, 1372;
8 | 512, 585, 680, 803, 960, 1157, 1400, 1695, 2048;
etc.
		

Crossrefs

Cf. A000578 (column 0: the cubes), A033430 (diagonal: 4*n^3), A053698 (column 1).
Cf. A198063 (read as A(n,k)=(n+k)*(n^2+k^2)).

Programs

  • Magma
    [[(n+k)*(n^2+k^2): k in [0..n]]: n in [0..12]]; // G. C. Greubel, Nov 23 2018
    
  • Mathematica
    t[n_, k_] := (n + k) (n^2 + k^2); Table[t[n, k], {n, 0, 10}, {k, 0, n}] // Flatten (* Amiram Eldar, Nov 22 2018 *)
  • PARI
    A321500(n, k)=(n+k)*(n^2+k^2)
    A321500_row(n)=vector(n+1, k, (n+k--)*(n^2+k^2))
    A321500_list(N=11)=concat(apply(A321500_row, [0..N]))
    
  • Sage
    [[(n+k)*(n^2+k^2) for k in range(n+1)] for n in range(12)] # G. C. Greubel, Nov 23 2018

Formula

Sum_{k=0..n} T(n,k) = 5*n^2*(n+1)*(5*n+1)/12 = 5*A117066(n). - G. C. Greubel, Nov 23 2018

A348897 Numbers of the form (x + y)*(x^2 + y^2).

Original entry on oeis.org

0, 1, 4, 8, 15, 27, 32, 40, 64, 65, 85, 108, 120, 125, 156, 175, 203, 216, 256, 259, 272, 320, 343, 369, 400, 405, 477, 500, 512, 520, 580, 585, 671, 680, 715, 729, 803, 820, 864, 888, 935, 960, 1000, 1080, 1105, 1111, 1157, 1248, 1261, 1331, 1372, 1400, 1417
Offset: 1

Views

Author

Peter Luschny, Nov 10 2021

Keywords

Comments

Also numbers of the form (x - i*y)*(x + i*y)*(x + y).
Loeschian numbers of this form are A349200.
A349201 and A349202 are subsequences of this sequence.
Numbers of the form 1 + n + n^2 + n^3 (A053698) are a subsequence.
Numbers of the form n^3 + n^4 + n^5 + n^6 are a subsequence.
Numbers of the form 1 + n^2 + n^4 + n^6 (A059830) are a subsequence. - Bernard Schott, Nov 11 2021

Examples

			1010101 is in this sequence because 1010101 = (100 + 1)*(100^2 + 1^2).
		

Crossrefs

Programs

  • Julia
    # Returns the terms less than or equal to b^3.
    function A348897List(b)
        b3 = b^3; R = [0]
        for n in 1:b
            for k in 0:n
                a = (n + k) * (n^2 + k^2)
                a > b3 && break
                push!(R, a)
        end end
    unique!(sort!(R)) end
    A348897List(12) |> println
  • Maple
    # Returns the terms less than or equal to b^3.
    A348897List := proc(b) local n, k, a, b3, R;
    b3 := abs(b^3); R := {};
    for n from 0 to b do for k from 0 to n do
        a := (n + k)*(n^2 + k^2);
        if a > b3 then break fi;
        R := R union {a};
    od od; sort(R) end:
    A348897List(12);
  • Mathematica
    max = 2000;
    xmax = max^(1/3) // Ceiling;
    Table[(x + y) (x^2 + y^2), {x, 0, xmax}, {y, x, xmax}] // Flatten // Union // Select[#, # <= max&]& (* Jean-François Alcover, Oct 23 2023 *)

A232395 (ceiling(sqrt(n^3 + n^2 + n + 1)))^2 - (n^3 + n^2 + n + 1).

Original entry on oeis.org

0, 0, 1, 9, 15, 13, 30, 0, 40, 21, 45, 57, 51, 21, 70, 105, 120, 109, 66, 156, 43, 77, 81, 49, 216, 108, 217, 9, 36, 21, 293, 192, 31, 189, 309, 385, 411, 381, 289, 129, 408, 112, 281, 396, 451, 440, 357, 196, 624, 309, 613, 120, 276, 360, 366, 288, 120, 725
Offset: 0

Views

Author

Vladimir Shevelev, Nov 23 2013

Keywords

Comments

a(n)=0, iff 1 + n + n^2 + n^3 is a perfect square. For example, a(7)=0 and we have 1 + 7 + 7^2 + 7^3 = 20^2.
a(n) = Difference between smallest square >= (n^3 + n^2 + n + 1) and (n^3 + n^2 + n + 1) - Antti Karttunen, Nov 27 2013

Crossrefs

Programs

  • PARI
    a(n) = ceil(sqrt(n^3+n^2+n+1))^2 - (n^3+n^2+n+1); \\ Michel Marcus, Nov 23 2013

Formula

Contribution from Antti Karttunen, Nov 27 2013: (Start)
a(n) = A000290(⌈sqrt(A053698(n))⌉) - A053698(n). Where ⌈x⌉ stands for ceiling(x). This further reduces as:
a(n) = A000290(A135034(A053698(n))) - A053698(n).
a(n) = A048761(A053698(n)) - A053698(n).
a(n) = A068527(A053698(n)).
(End)

Extensions

More terms from Peter J. C. Moses

A281660 The least common multiple of 1+n and 1+n^2.

Original entry on oeis.org

1, 2, 15, 20, 85, 78, 259, 200, 585, 410, 1111, 732, 1885, 1190, 2955, 1808, 4369, 2610, 6175, 3620, 8421, 4862, 11155, 6360, 14425, 8138, 18279, 10220, 22765, 12630, 27931, 15392, 33825, 18530, 40495, 22068, 47989, 26030, 56355, 30440, 65641, 35322
Offset: 0

Views

Author

R. J. Mathar, Jan 26 2017

Keywords

Programs

  • Maple
    A281660 := proc(n)
            ilcm(1+n,1+n^2) ;
    end proc:

Formula

a(n) = lcm(1+n,1+n^2) = (1+n)*(1+n^2)/gcd(1+n,1+n^2) = A053698(n)/A000034(n).
G.f.: (5*x^2+1) *(x^4+2*x^3+6*x^2+2*x+1) / ( (x-1)^4 *(1+x)^4 ).
a(2*n+1) = 2*A059722(n+1). - R. J. Mathar, Jan 28 2017
a(n) = ((3 + (-1)^n)*(1+n+n^2+n^3)) / 4. - Colin Barker, Feb 07 2017

A285268 Triangle read by rows: T(m,n) = Sum_{i=1..n} P(m,i) where P(m,n) = m!/(m-n)! is the number of permutations of m items taken n at a time, for 1 <= n <= m.

Original entry on oeis.org

1, 2, 4, 3, 9, 15, 4, 16, 40, 64, 5, 25, 85, 205, 325, 6, 36, 156, 516, 1236, 1956, 7, 49, 259, 1099, 3619, 8659, 13699, 8, 64, 400, 2080, 8800, 28960, 69280, 109600, 9, 81, 585, 3609, 18729, 79209, 260649, 623529, 986409, 10, 100, 820, 5860, 36100, 187300, 792100, 2606500, 6235300, 9864100
Offset: 1

Views

Author

Rick Nungester, Apr 15 2017

Keywords

Comments

T(m, n) is the total number of ordered sets of size 1 to n that can be created from m distinct items. For example, for 4 items taken 1 to 3 at a time, there are P(4, 1) + P(4, 2) + P(4, 3) = 4 + 12 + 24 = 40 total sets: 1, 12, 123, 124, 13, 132, 134, 14, 142, 143, 2, 21, 213, 214, 23, 231, 234, 24, 241, 243, 3, 31, 312, 314, 32, 321, 324, 34, 341, 342, 4, 41, 412, 413, 42, 421, 423, 43, 431, 432.
T(m, n) is the total number of tests in a software program that generates all P(m, n) possible solutions to a problem, allowing early-termination testing on each partial permutation, and not doing any such early termination. For example, from a deck of 52 cards, evaluate all possible 5-card deals as each card is dealt. T(52, 5) = 318507904 total evaluations.
T(m, n) counts the numbers with <= n distinct nonzero digits in base m+1. - M. F. Hasler, Oct 10 2019

Examples

			Triangle begins:
  1;
  2,  4;
  3,  9,  15;
  4, 16,  40,   64;
  5, 25,  85,  205,   325;
  6, 36, 156,  516,  1236,  1956;
  7, 49, 259, 1099,  3619,  8659,  13699;
  8, 64, 400, 2080,  8800, 28960,  69280, 109600;
  9, 81, 585, 3609, 18729, 79209, 260649, 623529, 986409;
  ...
		

Crossrefs

Mirror of triangle A121662.
Row sums give A030297.
Diagonals (1..4): A007526 (less the initial 0), A038156 (less the initial 0, 0), A224869 (less the initial -1, 0), A079750 (less the initial 0).
Columns (1..3): A000027, A000290 (less the initial 0, 1), A053698 (less the initial 1, 4).

Programs

  • Maple
    SumPermuteTriangle := proc(M)
      local m;
      for m from 1 to M do print(seq(add(m!/(m-k)!, k=1..n), n=1..m)) od;
    end:
    SumPermuteTriangle(10);
    # second Maple program:
    T:= proc(n, k) option remember;
         `if`(k<1, 0, T(n-1, k-1)*n+n)
        end:
    seq(seq(T(n, k), k=1..n), n=1..10);  # Alois P. Heinz, Jun 26 2022
  • Mathematica
    Table[Sum[m!/(m - i)!, {i, n}], {m, 9}, {n, m}] // Flatten (* Michael De Vlieger, Apr 22 2017 *)
    (* Sum-free code *)
    b[j_] = If[j==0, 0, Floor[j! E - 1]]; T[m_,n_] = b[m] - m! b[m-n]/(m-n)!; Table[T[m, n],{m, 24},{n, m}]//Flatten
    (* Manfred Boergens, Jun 22 2022 *)
  • PARI
    A285268(m,n,s=m-n+1)={for(k=m-n+2,m,s=(s+1)*k);s} \\ Much faster than sum(k=1,n,m!\(m-k)!), e.g., factor 6 for m=1..99, factor 57 for m=1..199.
    apply( A285268_row(m)=vector(m,n,A285268(m,n)), [1..9]) \\ M. F. Hasler, Oct 10 2019
    
  • PARI
    T(n, k) = {exp(1)*(incgam(n+1, 1) - incgam(n-k, 1)*(n-k)*n!/(n-k)!) - 1;}
      apply(Trow(n) = vector(n, k, round(T(n, k))), [1..10]) \\ Adjust the realprecision if needed. Peter Luschny, Oct 10 2019

Formula

T(m, n) = Sum_{k=1..n} m!/(m-k)! = m*(1 + (m-1)*(1 + (m-2)*(1 + ... + m-n+1)...)), cf. PARI code. - M. F. Hasler, Oct 10 2019
T(n, k) = exp(1)*(Gamma(n+1, 1) - Gamma(n-k, 1)*(n-k)*n!/(n-k)!) - 1. - Peter Luschny, Oct 10 2019
Sum-free and Gamma-free formula: T(m, n) = b(m) - m!*b(m-n)/(m-n)! where b(0)=0, b(j)=floor(j!*e-1) for j>0. - Manfred Boergens, Jun 22 2022

A321490 Triangular table T[n,k] = (n+k)(n^2+k^2), 1 <= k <= n = 1, 2, 3, ...; read by rows.

Original entry on oeis.org

4, 15, 32, 40, 65, 108, 85, 120, 175, 256, 156, 203, 272, 369, 500, 259, 320, 405, 520, 671, 864, 400, 477, 580, 715, 888, 1105, 1372, 585, 680, 803, 960, 1157, 1400, 1695, 2048, 820, 935, 1080, 1261, 1484, 1755, 2080, 2465, 2916, 1111, 1248, 1417, 1624, 1875, 2176, 2533, 2952, 3439, 4000, 1464, 1625, 1820, 2055, 2336
Offset: 1

Views

Author

M. F. Hasler, Nov 22 2018

Keywords

Examples

			The table starts:
Row 1:    4;
Row 2:   15,  32;
Row 3:   40,  65, 108;
Row 4:   85, 120, 175, 256;
Row 5:  156, 203, 272, 369,  500;
Row 6:  259, 320, 405, 520,  671,  864;
Row 7:  400, 477, 580, 715,  888, 1105, 1372;
Row 8:  585, 680, 803, 960, 1157, 1400, 1695, 2048;
etc.
		

Crossrefs

Cf. A321491 (numbers of the form T(n,k) with n > k > 0).
Cf. A321492 (numbers which can be written at least twice in this form).
Cf. A033430 (diagonal), A053698 (column 1).
Cf. A198063 (read as a square array equals T(n,k) for all n, k >= 0).
Cf. A321500 (variant of this table with additional row 0 and column 0).

Programs

  • Mathematica
    t[n_, k_] := (n + k) (n^2 + k^2); Table[t[n, k], {n, 1, 10}, {k, 1, n}] // Flatten (* Amiram Eldar, Nov 22 2018 *)
  • PARI
    A321490(n,k)=(n+k)*(n^2+k^2)
    A321490_row(n)=vector(n,k,(n+k)*(n^2+k^2))
    A321490_list(N=12)=concat(apply(A321490_row,[1..N]))

Formula

Diagonal: T(n,n) = 4*n^3 = A033430(n).
Column 1: T(n,1) = (n + 1)(n^2 + 1) = A053698(n) = (n^4-1)/(n-1) for n > 1.

A164939 These are prime numbers p such that p^3 + p^2 + p + 2 is also prime.

Original entry on oeis.org

3, 5, 7, 13, 23, 29, 43, 79, 89, 113, 139, 163, 193, 197, 199, 229, 233, 277, 283, 317, 367, 379, 389, 503, 619, 727, 769, 797, 829, 839, 953, 967, 977, 997, 1063, 1229, 1297, 1307, 1399, 1409, 1483, 1607, 1619, 1637, 1697, 1759, 1777, 1877, 1979, 1987, 1999
Offset: 1

Views

Author

B. R. Becker (bbecker(AT)panda3.phys.unm.edu), Sep 01 2009

Keywords

Examples

			3 is prime as is 3^3 + 3^2 + 3 + 2 = 41
		

Crossrefs

Programs

  • Mathematica
    Select[Prime[Range[500]],PrimeQ[ #^3 + #^2 + # + 2]&]

A176070 Numbers of the form k^3+k^2+k+1 that are the product of two distinct primes.

Original entry on oeis.org

15, 85, 259, 1111, 4369, 47989, 65641, 291919, 2016379, 2214031, 3397651, 3820909, 5864581, 9305311, 13881841, 15687751, 16843009, 19756171, 22030681, 28746559, 62256349, 64160401, 74264821, 79692331, 101412319, 117889591, 172189309, 185518471, 191435329, 270004099, 328985791
Offset: 1

Views

Author

Keywords

Comments

As k^3 + k^2 + k + 1 = (k + 1) * (k^2 + 1) and k <= 1 does not give a term, k + 1 and k^2 + 1 must be prime so k must be even. - David A. Corneth, May 30 2023

Examples

			15 is in the sequence as 15 = 3*5 = 2^3+2^2+2+1; 15 is a product of two distinct primes and of the form k^3 + k^2 + k + 1.
		

Crossrefs

Cf. A002496, A006093, A006881, A053698, A070689, A174969, A176069, A237627 (semiprimes of that form).

Programs

  • Mathematica
    f[n_]:=Last/@FactorInteger[n]=={1,1};Select[Array[ #^3+#^2+#+1&,7! ],f[ # ]&]
  • PARI
    upto(n) = {my(res = List(), u = sqrtnint(n, 3) + 1); forprime(p = 3, u, c = (p-1)^2 + 1; if(isprime(c), listput(res, c*p))); res} \\ David A. Corneth, May 30 2023

Formula

a(n) = (A070689(n + 1) + 1) * (A070689(n + 1)^2 + 1). - David A. Corneth, May 30 2023

Extensions

Name corrected by and more terms from David A. Corneth, May 30 2023

A341907 T(n, k) is the result of replacing 2^e with k^e in the binary expansion of n; square array T(n, k) read by antidiagonals upwards, n, k >= 0.

Original entry on oeis.org

0, 1, 0, 0, 1, 0, 1, 1, 1, 0, 0, 2, 2, 1, 0, 1, 1, 3, 3, 1, 0, 0, 2, 4, 4, 4, 1, 0, 1, 2, 5, 9, 5, 5, 1, 0, 0, 3, 6, 10, 16, 6, 6, 1, 0, 1, 1, 7, 12, 17, 25, 7, 7, 1, 0, 0, 2, 8, 13, 20, 26, 36, 8, 8, 1, 0, 1, 2, 9, 27, 21, 30, 37, 49, 9, 9, 1, 0, 0, 3, 10, 28, 64, 31, 42, 50, 64, 10, 10, 1, 0
Offset: 0

Views

Author

Rémy Sigrist, Jun 04 2021

Keywords

Comments

For any n >= 0, the n-th row, k -> T(n, k), corresponds to a polynomial in k with coefficients in {0, 1}.
For any k > 1, the k-th column, n -> T(n, k), corresponds to sums of distinct powers of k.

Examples

			Array T(n, k) begins:
  n\k|  0  1   2   3   4    5    6    7    8    9    10    11    12
  ---+-------------------------------------------------------------
    0|  0  0   0   0   0    0    0    0    0    0     0     0     0
    1|  1  1   1   1   1    1    1    1    1    1     1     1     1
    2|  0  1   2   3   4    5    6    7    8    9    10    11    12
    3|  1  2   3   4   5    6    7    8    9   10    11    12    13
    4|  0  1   4   9  16   25   36   49   64   81   100   121   144
    5|  1  2   5  10  17   26   37   50   65   82   101   122   145
    6|  0  2   6  12  20   30   42   56   72   90   110   132   156
    7|  1  3   7  13  21   31   43   57   73   91   111   133   157
    8|  0  1   8  27  64  125  216  343  512  729  1000  1331  1728
    9|  1  2   9  28  65  126  217  344  513  730  1001  1332  1729
   10|  0  2  10  30  68  130  222  350  520  738  1010  1342  1740
   11|  1  3  11  31  69  131  223  351  521  739  1011  1343  1741
   12|  0  2  12  36  80  150  252  392  576  810  1100  1452  1872
		

Crossrefs

Programs

  • PARI
    T(n,k) = { my (v=0, e); while (n, n-=2^e=valuation(n,2); v+=k^e); v }

Formula

T(n, n) = A104258(n).
T(n, 0) = A000035(n).
T(n, 1) = A000120(n).
T(n, 2) = n.
T(n, 3) = A005836(n).
T(n, 4) = A000695(n).
T(n, 5) = A033042(n).
T(n, 6) = A033043(n).
T(n, 7) = A033044(n).
T(n, 8) = A033045(n).
T(n, 9) = A033046(n).
T(n, 10) = A007088(n).
T(n, 11) = A033047(n).
T(n, 12) = A033048(n).
T(n, 13) = A033049(n).
T(0, k) = 0.
T(1, k) = 1.
T(2, k) = k.
T(3, k) = k + 1.
T(4, k) = k^2.
T(5, k) = k^2 + 1 = A002522(k).
T(6, k) = k^2 + k = A002378(k).
T(7, k) = k^2 + k + 1 = A002061(k).
T(8, k) = k^3.
T(9, k) = k^3 + 1 = A001093(k).
T(10, k) = k^3 + k = A034262(k).
T(11, k) = k^3 + k + 1 = A071568(k).
T(12, k) = k^3 + k^2 = A011379(k).
T(13, k) = k^3 + k^2 + 1 = A098547(k).
T(14, k) = k^3 + k^2 + k = A027444(k).
T(15, k) = k^3 + k^2 + k + 1 = A053698(k).
T(16, k) = k^4 = A000583(k).
T(17, k) = k^4 + 1 = A002523(k).
T(m + n, k) = T(m, k) + T(n, k) when m AND n = 0 (where AND denotes the bitwise AND operator).
Previous Showing 21-30 of 35 results. Next