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 41-50 of 61 results. Next

A322550 Table read by ascending antidiagonals: T(n, k) is the minimum number of cubes necessary to fill a right square prism with base area n^2 and height k.

Original entry on oeis.org

1, 4, 2, 9, 1, 3, 16, 18, 12, 4, 25, 4, 1, 2, 5, 36, 50, 48, 36, 20, 6, 49, 9, 75, 1, 45, 3, 7, 64, 98, 4, 100, 80, 2, 28, 8, 81, 16, 147, 18, 1, 12, 63, 4, 9, 100, 162, 192, 196, 180, 150, 112, 72, 36, 10, 121, 25, 9, 4, 245, 1, 175, 2, 3, 5, 11, 144, 242, 300, 324, 320, 294, 252, 200, 144, 90, 44, 12
Offset: 1

Views

Author

Stefano Spezia, Dec 15 2018

Keywords

Examples

			The table T starts in row n = 1 with columns k >= 1 as:
   1     2     3     4     5     6     7     8     9 ...
   4     1    12     2    20     3    28     4    36 ...
   9    18     1    36    45     2    63    72     3 ...
  16     4    48     1    80    12   112     2   144 ...
  25    50    75   100     1   150   175   200   225 ...
  36     9     4    18   180     1   252    36    12 ...
  49    98   147   196   245   294     1   392   441 ...
  64    16   192     4   320    48   448     1   576 ...
  81   162     9   324   405    18   567   648     1 ...
...
The triangle X(n, k) begins
  n\k|   1     2     3     4     5     6     7     8     9
  ---+----------------------------------------------------
   1 |   1
   2 |   4     2
   3 |   9     1     3
   4 |  16    18    12     4
   5 |  25     4     1     2     5
   6 |  36    50    48    36    20     6
   7 |  49     9    75     1    45     3     7
   8 |  64    98     4   100    80     2    28     8
   9 |  81    16   147    18     1    12    63     4     9
...
		

Crossrefs

Cf. A000012 (main diagonal of the table), A000027 (1st row of the table or diagonal of the triangle), A000290 (k=1), A000578, A011379 (superdiagonal of the table), A045991 (subdiagonal of the table), A050873, A119619, A320043 (row sums of the triangle).

Programs

  • GAP
    Flat(List([1..12], n->List([1..n], k->(n+1-k)^2*k/GcdInt(n+1-k,k)^3)));
    
  • Magma
    [[(n+1-k)^2*k/Gcd(n+1-k,k)^3: k in [1..n]]: n in [1..12]]; // triangle output
    
  • Maple
    a := (n, k) -> (n+1-k)^2*k/gcd(n+1-k, k)^3: seq(seq(a(n, k), k = 1 .. n), n = 1 .. 12)
  • Mathematica
    T[n_,k_]:=n^2*k/GCD[n,k]^3; Flatten[Table[T[n-k+1,k], {n, 12}, {k, n}]]
  • Maxima
    sjoin(v, j) := apply(sconcat, rest(join(makelist(j, length(v)), v)))$ display_triangle(n) := for i from 1 thru n do disp(sjoin(makelist((i+1-j)^2*j/gcd(i+1-j,j)^3, j, 1, i), " ")); display_triangle(12);
    
  • PARI
    T(n, k) = (n+1-k)^2*k/gcd(n+1-k,k)^3;
    tabl(nn) = for(i=1, nn, for(j=1, i, print1(T(i, j), ", ")); print);
    tabl(12) \\ triangle output

Formula

T(n, k) = n^2*k/gcd(n, k)^3.
T(n, k) = A000290(n)*k/A000578(A050873(n,k)).
X(n, k) = T(n + 1 - k, k).
X(2*n - 1, n) = A000012(n).
Product_{k=1..n} X(n, k)^(1/3) = A119619(n+1). - Stefano Spezia, Jun 24 2024

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).

A143219 Triangle read by rows, A127648 * A000012 * A127773, 1 <= k <= n.

Original entry on oeis.org

1, 2, 6, 3, 9, 18, 4, 12, 24, 40, 5, 15, 30, 50, 75, 6, 18, 36, 60, 90, 126, 7, 21, 42, 70, 105, 147, 196, 8, 24, 48, 80, 120, 168, 224, 288, 9, 27, 54, 90, 135, 189, 252, 324, 405, 10, 30, 60, 100, 150, 210, 280, 360, 450, 550
Offset: 1

Views

Author

Gary W. Adamson, Jul 30 2008

Keywords

Examples

			First few rows of the triangle =
  1;
  2,  6;
  3,  9, 18;
  4, 12, 24, 40;
  5, 15, 30, 50,  75;
  6, 18, 36, 60,  90, 126;
  7, 21, 42, 70, 105, 147, 196;
  ...
		

Crossrefs

Cf. A002024, A002411 (right border), A002414, A002417 (row sums), A011379.

Programs

  • Magma
    [n*Binomial(k+1, 2): k in [1..n], n in [1..12]]; // G. C. Greubel, Jul 12 2022
    
  • Mathematica
    Table[n*Binomial[k+1, 2], {n,12}, {k,n}]//Flatten (* G. C. Greubel, Jul 12 2022 *)
  • SageMath
    flatten([[n*binomial(k+1, 2) for k in (1..n)] for n in (1..12)]) # G. C. Greubel, Jul 12 2022

Formula

Triangle read by rows, A127648 * A000012 * A127773, 1 <= k <= n.
Sum_{k=1..n} T(n, k) = A002417(n).
T(n, n) = A002411(n).
From G. C. Greubel, Jul 12 2022: (Start)
T(n, k) = A002024(n,k) * A127773(n,k).
T(n, k) = n * binomial(k+1, 2).
Sum_{k=1..floor((n+1)/2)} T(n-k+1, k) = (1/4)*(4*n - 3*floor((n+1)/2) + 3)*binomial(2 + floor((n+1)/2), 3).
T(2*n-1, n) = A002414(n), n >= 1.
T(2*n-2, n-1) = A011379(n-1), n >= 2. (End)

A171631 Triangle read by rows: T(n,k) = n*(binomial(n-2, k-1) + n*binomial(n-2, k)), n > 0 and 0 <= k <= n - 1.

Original entry on oeis.org

1, 4, 2, 9, 12, 3, 16, 36, 24, 4, 25, 80, 90, 40, 5, 36, 150, 240, 180, 60, 6, 49, 252, 525, 560, 315, 84, 7, 64, 392, 1008, 1400, 1120, 504, 112, 8, 81, 576, 1764, 3024, 3150, 2016, 756, 144, 9, 100, 810, 2880, 5880, 7560, 6300, 3360, 1080, 180, 10, 121, 1100
Offset: 1

Views

Author

Roger L. Bagula, Dec 13 2009

Keywords

Comments

If T(0,0) = 0 is prepended, then row sums give A001788.

Examples

			Triangle begins:
n\k|  0    1     2     3     4     6    7    8  9
-------------------------------------------------
1  |  1
2  |  4    2
3  |  9   12     3
4  | 16   36    24     4
5  | 25   80    90    40     5
6  | 36  150   240   180    60     6
7  | 49  252   525   560   315    84    7
8  | 64  392  1008  1400  1120   504  112    8
9  | 81  576  1764  3024  3150  2016  756  144  9
... reformatted. - _Franck Maminirina Ramaharo_, Oct 02 2018
		

References

  • Eugene Jahnke and Fritz Emde, Table of Functions with Formulae and Curves, Dover Publications, 1945, p. 32.

Crossrefs

Programs

  • Mathematica
    Table[CoefficientList[n*(x + n)*(x + 1)^(n - 2), x], {n, 1, 12}]//Flatten
  • Maxima
    T(n, k) := n*(binomial(n - 2, k - 1) + n*binomial(n - 2, k))$
    tabl(nn) := for n:1 thru nn do print(makelist(T(n, k), k, 0, n - 1))$ /* Franck Maminirina Ramaharo, Oct 02 2018 */

Formula

Let p(x;n) = (x + 1)^n. Then row n are the coefficients in the expansion of p''(x;n) - x*p'(x;n) + n*p(x;n) = n*(x + n)*(x + 1)^(n - 2).
From Franck Maminirina Ramaharo, Oct 02 2018: (Start)
T(n,1) = A000290(n).
T(n,2) = A011379(n).
T(n,3) = 3*A002417(n-2).
T(n,n-2) = A046092(n-1).
T(n,n-3) = 9*A000292(n-2).
G.f.: y*(x*y - y - 1)/(x*y + y - 1)^3. (End)

Extensions

Edited and new name by Franck Maminirina Ramaharo, Oct 02 2018

A257093 a(n) = n*(n+1)*(13*n+2)/6.

Original entry on oeis.org

0, 5, 28, 82, 180, 335, 560, 868, 1272, 1785, 2420, 3190, 4108, 5187, 6440, 7880, 9520, 11373, 13452, 15770, 18340, 21175, 24288, 27692, 31400, 35425, 39780, 44478, 49532, 54955, 60760, 66960, 73568, 80597, 88060, 95970, 104340, 113183, 122512, 132340
Offset: 0

Views

Author

Luce ETIENNE, Apr 16 2015

Keywords

Comments

This sequence gives the number of triangles of all sizes in (5*n^2)-polyiamonds in a tetragonal or hexagonal or heptagonal configuration.
It is the sum of (1/2)*Sum_{j=0..n-1} (n-j)*(5*n+1-j) triangles oriented in one direction and (1/2)*Sum_{j-0..n-1} (n-j)*(5*n-1-3*j) oriented in the opposite direction.
Shäfli's notation: 3.3.3.3.3 for a(1).
The difference between this sequence and A050409(n) equals A000292(n-1).
Also, (1/3)*(A002717(2*n) + A255211(n) - 2*A000330(n)) gives A033994(n): a (5*n^2)-polyiamond in pentagonal configuration that does not belong to this sequence because a(1)=6.
a(n) is odd only when n mod 4 = 1.

Examples

			Second comment a(0) = 0; a(1) = 3 + 2; a(2) = 16 + 12; a(3) = 46 + 36; a(4) = 100 + 80; a(5) = 185 + 150; a(6) = 308 + 252.
		

Crossrefs

Programs

  • Magma
    [n*(n+1)*(13*n+2)/6: n in [0..40]]; // Vincenzo Librandi, Apr 16 2015
  • Mathematica
    Table[n (n + 1) (13 n + 2)/6, {n, 0, 40}] (* Vincenzo Librandi, Apr 16 2015 *)
    CoefficientList[Series[x (5+8x)/(1-x)^4,{x,0,50}],x] (* or *) LinearRecurrence[{4,-6,4,-1},{0,5,28,82},60] (* Harvey P. Dale, Feb 12 2023 *)

Formula

a(n) = Sum_{j=0..n-1} (n-j)*(5*n-2*j).
From Vincenzo Librandi, Apr 16 2015: (Start)
G.f.: x*(5+8*x)/(1-x)^4.
a(n) = 4*a(n-1) - 6*a(n-2) + 4*a(n-3) - a(n-4). (End)
E.g.f.: exp(x)*x*(30 + 54*x + 13*x^2)/6. - Stefano Spezia, Mar 02 2025

Extensions

Corrected by Harvey P. Dale, Feb 12 2023

A290168 If n is even then a(n) = n^2*(n+2)/8, otherwise a(n) = (n-1)*n*(n+1)/8.

Original entry on oeis.org

0, 0, 2, 3, 12, 15, 36, 42, 80, 90, 150, 165, 252, 273, 392, 420, 576, 612, 810, 855, 1100, 1155, 1452, 1518, 1872, 1950, 2366, 2457, 2940, 3045, 3600, 3720, 4352, 4488, 5202, 5355, 6156, 6327, 7220, 7410, 8400
Offset: 0

Views

Author

Keywords

Comments

Bisection of a(n) [0, 2, 12, 36, 80, 150, 252, ...] is A011379.
Bisection [0, 3, 15, 42, 90, 165, 273, ...] is A059270.
Considering s(n) = [0, 0, 0, 0, 1, 1, 3, 3, 6, 6, 10, 10, 15, 15, ...] (triangular numbers repeated - see A008805), a(n) = n*s(n+2) holds.
Considering the first differences of a(n), b(n) = [0, 2, 1 , 9, 3, 21, 6, 38, 10, 60, 15, 87, ...], b(n) shows bisections A000217 and A005476. In addition, b(n) begins like A249264 up to 12th term, and is an alternation of 4 multiples of 3 and 2 not multiples; b(n) is also such that b(2n) + b(2n+1) = A049450(n).
Considering the second differences c(n), c(n) shows bisections A001105(n+1) and -A000384(n+1), c(n) has 3 consecutive terms multiples of 3 alternating with 3 not multiples; in addition, c(2n) + c(2n+1) = A000027(n).
Considering a(n)/c(n) = [0, 0, 1/4, -1/2, 2/3, -1, 9/8, -3/2, 8/5, -2, 25/12, -5/2, ...], it appears that it is A129194(n)/A022998(n+1) and -A026741(n)/A000034(n) alternating.

Crossrefs

Programs

  • Mathematica
    a[n_] := If[EvenQ[n], n^2*(n + 2)/8, (n - 1)*n*(n + 1)/8]; Table[a[n], {n, 0, 40}]
  • PARI
    a(n) = if(n%2==0, n^2*(n+2)/8, (n-1)*n*(n+1)/8) \\ Felix Fröhlich, Jul 23 2017

Formula

G.f.: x^2*(2 + x + 3*x^2)/((x-1)^4*(x+1)^3).
a(n) = (1/16)*(-1)^n*n*(1 + (-1)^(n+1) + 2*(1 + (-1)^n)*n + 2*(-1)^n*n^2).
Sum_{n>=2} 1/a(n) = 5 + Pi^2/6 - 8*log(2). - Amiram Eldar, Sep 17 2022

A318765 a(n) = (n + 2)*(n^2 + n - 1).

Original entry on oeis.org

-2, 3, 20, 55, 114, 203, 328, 495, 710, 979, 1308, 1703, 2170, 2715, 3344, 4063, 4878, 5795, 6820, 7959, 9218, 10603, 12120, 13775, 15574, 17523, 19628, 21895, 24330, 26939, 29728, 32703, 35870, 39235, 42804, 46583, 50578, 54795, 59240, 63919, 68838, 74003, 79420, 85095
Offset: 0

Views

Author

Bruno Berselli, Sep 04 2018

Keywords

Comments

First differences are in A004538.
a(n) is divisible by 11 for n = 3, 7, 9, 14, 18, 20, 25, 29, 31, 36, 40, ... with formula (1/3)*(11*m + (1 + (m mod 3))*(-1)^((m-1) mod 3) + 8), m >= 0.

Crossrefs

Cf. A004538.
Subsequence of A047216.
Similar sequences (see Table in Links section): A011379, A027444, A033445, A034262, A045991, A069778.

Programs

  • GAP
    List([0..50], n -> (n+2)*(n^2+n-1));
    
  • Julia
    [(n+2)*(n^2+n-1) for n in 0:50] |> println
  • Magma
    [(n+2)*(n^2+n-1): n in [0..50]];
    
  • Maple
    seq((n+2)*(n^2+n-1),n=0..43); # Paolo P. Lava, Sep 04 2018
  • Mathematica
    Table[(n + 2) (n^2 + n - 1), {n, 0, 50}]
  • Maxima
    makelist((n+2)*(n^2+n-1), n, 0, 50);
    
  • PARI
    vector(50, n, n--; (n+2)*(n^2+n-1))
    
  • Python
    [(n+2)*(n**2+n-1) for n in range(50)]
    
  • Sage
    [(n+2)*(n^2+n-1) for n in (0..50)]
    

Formula

O.g.f.: (-2 + 11*x - 4*x^2 + x^3)/(1 - x)^4.
E.g.f.: (-2 + 5*x + 6*x^2 + x^3)*exp(x).
a(n) = -A033445(-n-1).
a(n) = 4*a(n-1) - 6*a(n-2) + 4*a(n-3) - a(n-4) for n >= 5. - Wesley Ivan Hurt, Dec 18 2020

A327570 a(n) = n*phi(n)^2, phi = A000010.

Original entry on oeis.org

1, 2, 12, 16, 80, 24, 252, 128, 324, 160, 1100, 192, 1872, 504, 960, 1024, 4352, 648, 6156, 1280, 3024, 2200, 11132, 1536, 10000, 3744, 8748, 4032, 22736, 1920, 27900, 8192, 13200, 8704, 20160, 5184, 47952, 12312, 22464, 10240, 65600, 6048, 75852, 17600, 25920, 22264, 99452, 12288
Offset: 1

Views

Author

Jianing Song, Sep 17 2019

Keywords

Comments

a(n) is the order of the group consisting of all upper-triangular (or equivalently, lower-triangular) matrices in GL(2, Z_n). That is to say, a(n) = |G_n|, where G_n = {{{a, b}, {0, d}} : gcd(a, n) = gcd(d, n) = 1}. The group G_n is well-defined because the product of two upper-triangular matrices is again an upper-triangular matrix. For example,{{a, b}, {0, d}} * {{x, y}, {0, z}} = {{a*x, a*y+b*z}, {0, d*z}}.
The exponent of G_n (i.e., the least positive integer k such that x^k = e for all x in G_n) is A174824(n). (Note that {{1, 1}, {0, 1}} is an element with order n and there exists some r such that {{r, 0}, {0, r}} is an element with order psi(n), psi = A002322. It is easy to show that x^lcm(n, psi(n)) = Id = {{1, 0}, {0, 1}} for all x in G_n.)
If only upper-triangular matrices in SL(2, Z_n) are wanted, we get a group of order n*phi(n) = A002618(n) and exponent A174824(n).

Examples

			G_3 = {{{1, 0}, {0, 1}}, {{1, 1}, {0, 1}}, {{1, 2}, {0, 1}}, {{1, 0}, {0, 2}}, {{1, 1}, {0, 2}}, {{1, 2}, {0, 2}}, {{2, 0}, {0, 1}}, {{2, 1}, {0, 1}}, {{2, 2}, {0, 1}}, {{2, 0}, {0, 2}}, {{2, 1}, {0, 2}}, {{2, 2}, {0, 2}}} with order 12, so a(3) = 12.
		

Crossrefs

Programs

  • Mathematica
    Table[n * EulerPhi[n]^2, {n, 1, 100}] (* Amiram Eldar, Sep 19 2020 *)
  • PARI
    a(n) = n*eulerphi(n)^2

Formula

Multiplicative with a(p^e) = (p-1)^2*p^(3e-2).
a(n) = A000010(n)*A002618(n).
a(p) = A011379(p-1) for p prime. - Peter Luschny, Sep 17 2019
Sum_{k>=1} 1/a(k) = Product_{primes p} (1 + p^2/((p-1)^3 * (p^2 + p + 1))) = 1.7394747912949637836019917301710010334604379331855033150372654868327481539... - Vaclav Kotesovec, Sep 20 2020
Sum_{k=1..n} a(k) ~ c * n^4, where c = (1/4) * Product_{p prime} (1 - (2*p-1)/p^3) = A065464 / 4 = 0.1070623764... . - Amiram Eldar, Nov 05 2022

A338610 Integers m such that there exist one prime p and one positive integer k, for which the expression k^3 + k^2*p is a perfect cube m^3.

Original entry on oeis.org

2, 12, 36, 80, 252, 810, 1100, 1452, 2366, 2940, 5202, 12696, 14400, 16250, 20412, 22736, 27900, 33792, 40460, 52022, 56316, 70602, 75852, 93150, 112896, 120050, 143312, 169400, 198476, 242172, 254016, 291852, 305252, 410700, 518400, 538002, 643452, 689216, 737100
Offset: 1

Views

Author

Bernard Schott, Nov 03 2020

Keywords

Comments

This concerns Problem 131 of Project Euler (see link).
For each such term m with this property, the values of k and of p are unique.
The solution to the Diophantine equation is: (q^3)^3 + (q^3)^2 * ((q+1)^3 - q^3) = ((q+1) * q^2)^3, where
- the prime p is the cuban prime (q+1)^3 - q^3 = A002407(n),
- corresponding to q = A111251(n),
- the positive integer k = q^3, and,
- the resulting m = (q+1)*q^2 = (A111251(n)+1)*(A111251(n))^2.

Examples

			For n=1, q=A111251(1)=1 and 1^3 + 1^2*(2^3 - 1^3) = 1+1*7 = 2^3, hence, k=1^3, cuban prime=7, and a(1)=m=2.
For n=3, q=A111251(3)=3 and (3^3)^3 + (3^3)^2*(4^3 - 3^3) = 27^3 + 27^2*37 = 46656 = 36^3, hence, k=3^3, cuban prime=37, and a(3)=m=36.
		

Crossrefs

Subsequence of A011379.

Programs

  • Maple
    for q from 1 to 90 do
    p:=3*q^2+3*q+1;
    if isprime(p) then print((q+1)*q^2); else fi; od:
  • Mathematica
    f[n_] := n^2*(n+1); f /@ Select[Range[100], PrimeQ[3*#^2 + 3*# + 1] &] (* Amiram Eldar, Nov 05 2020 *)
  • PARI
    lista(nn) =  apply(x->x^2*(x+1), select(x->isprime(3*x^2 + 3*x + 1), [1..nn])); \\ Michel Marcus, Nov 05 2020

Formula

a(n) = (A111251(n) + 1)*(A111251(n))^2.
a(n) = A011379(A111251(n)).

A342238 Table read by upward antidiagonals: T(n,k) is the number of strings of length k over an n-letter alphabet that do not begin with a palindrome of two or more letters; n, k >= 1.

Original entry on oeis.org

1, 2, 0, 3, 2, 0, 4, 6, 2, 0, 5, 12, 12, 2, 0, 6, 20, 36, 30, 2, 0, 7, 30, 80, 132, 78, 2, 0, 8, 42, 150, 380, 492, 222, 2, 0, 9, 56, 252, 870, 1820, 1932, 636, 2, 0, 10, 72, 392, 1722, 5070, 9020, 7596, 1878, 2, 0, 11, 90, 576, 3080, 11802, 30270, 44720, 30252, 5556, 2, 0
Offset: 1

Views

Author

Peter Kagey, Mar 06 2021

Keywords

Examples

			Table begins:
n\k | 1  2   3    4     5      6       7        8
----+--------------------------------------------
  1 | 1  0   0    0     0      0       0        0
  2 | 2  2   2    2     2      2       2        2
  3 | 3  6  12   30    78    222     636     1878
  4 | 4 12  36  132   492   1932    7596    30252
  5 | 5 20  80  380  1820   9020   44720   223220
  6 | 6 30 150  870  5070  30270  180750  1083630
  7 | 7 42 252 1722 11802  82362  574812  4021962
  8 | 8 56 392 3080 24248 193592 1545656 12362168
		

Crossrefs

Rows: A252696 (n=3), A252697 (n=4), A252698 (n=5), A252699 (n=6), A252700 (n=7), A252701 (n=8), A252702 (n=9), A252703 (n=10).
Columns: A002378 (k=2), A011379 (k=3).

Formula

T(n,k) = n^k - A342237(n,k).
Previous Showing 41-50 of 61 results. Next