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

A281881 Triangle read by rows: T(n,k) (n>=1, 2<=k<=n+1) is the number of k-sequences of balls colored with at most n colors such that exactly one ball is of a color seen previously in the sequence.

Original entry on oeis.org

1, 2, 6, 3, 18, 36, 4, 36, 144, 240, 5, 60, 360, 1200, 1800, 6, 90, 720, 3600, 10800, 15120, 7, 126, 1260, 8400, 37800, 105840, 141120, 8, 168, 2016, 16800, 100800, 423360, 1128960, 1451520
Offset: 1

Views

Author

Jeremy Dover, Feb 01 2017

Keywords

Comments

Number of k-sequences of balls colored with at most n colors such that exactly two balls are the same color as some other ball in the sequence (necessarily each other). - Jeremy Dover, Sep 26 2017

Examples

			n=1 => AA -> T(1,2) = 1.
n=2 => AA, BB -> T(2,2) = 2; AAB, ABA, BAA, BBA, BAB, ABB -> T(2,3) = 6.
Triangle starts:
   1
   2,   6
   3,  18,   36
   4,  36,  144,   240
   5,  60,  360,  1200,   1800
   6,  90,  720,  3600,  10800,   15120
   7, 126, 1260,  8400,  37800,  105840,   141120
   8, 168, 2016, 16800, 100800,  423360,  1128960,  1451520
   9, 216, 3024, 30240, 226800, 1270080,  5080320, 13063680,  16329600
  10, 270, 4320, 50400, 453600, 3175200, 16934400, 65318400, 163296000, 199584000
		

Crossrefs

Columns of table:
T(n,2) = A000027(n)
T(n,3) = A028896(n)
Other sequences in table:
T(n,n+1) = A001286(n)
T(n,n) = A001804(n), n>=2

Programs

  • Mathematica
    Table[Binomial[k, 2] n!/(n + 1 - k)!, {n, 8}, {k, 2, n + 1}] // Flatten (* Michael De Vlieger, Feb 02 2017 *)

Formula

T(n,k) = binomial(k,2)*n!/(n+1-k)!.
T(n,k) = n*T(n-1,k-1) + (k-1)*n!/(n+1-k)!.

A301696 Partial sums of A219529.

Original entry on oeis.org

1, 6, 17, 33, 54, 81, 113, 150, 193, 241, 294, 353, 417, 486, 561, 641, 726, 817, 913, 1014, 1121, 1233, 1350, 1473, 1601, 1734, 1873, 2017, 2166, 2321, 2481, 2646, 2817, 2993, 3174, 3361, 3553, 3750, 3953, 4161, 4374, 4593, 4817, 5046, 5281, 5521, 5766
Offset: 0

Views

Author

N. J. A. Sloane, Mar 25 2018

Keywords

Crossrefs

Cf. A219529.

Programs

  • Maple
    A301696:= n-> (8*(3*n*(n+1) +1) + `mod`(n+2, 3) - `mod`(n+1, 3))/9;
    seq(A301696(n), n=0..60); # G. C. Greubel, May 27 2020
  • Mathematica
    Table[(Mod[n+2, 3] - Mod[n+1, 3] + 8*(3*n*(n+1) +1))/9, {n,0,60}] (* G. C. Greubel, May 27 2020 *)
  • PARI
    Vec((1 + x)^4 / ((1 - x)^3*(1 + x + x^2)) + O(x^60)) \\ Colin Barker, Mar 26 2018
    
  • Sage
    [(24*n*(n+1)+8 + (n+2)%3 - (n+1)%3 )/9 for n in (0..60)] # G. C. Greubel, May 27 2020

Formula

From Colin Barker, Mar 26 2018: (Start)
G.f.: (1 + x)^4 / ((1 - x)^3*(1 + x + x^2)).
a(n) = 2*a(n-1) - a(n-2) + a(n-3) - 2*a(n-4) + a(n-5) for n>4. (End)
From G. C. Greubel, May 27 2020: (Start)
a(n) = (ChebyshevU(n, -1/2) - ChebyshevU(n-1, -1/2) + 8*(3*n*(n+1) +1))/9.
a(n) = ( A131713(n) + 8*A028896(n) + 8 )/9. (End)

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

Original entry on oeis.org

1, 2, 3, 3, 6, 5, 4, 9, 10, 7, 5, 12, 15, 14, 9, 6, 15, 20, 21, 18, 11, 7, 18, 25, 28, 27, 22, 13, 8, 21, 30, 35, 36, 33, 26, 15, 9, 24, 35, 42, 45, 44, 39, 30, 17, 10, 27, 40, 49, 54, 55, 52, 45, 34, 19, 11, 30, 45, 56, 63, 66, 65, 60, 51, 38, 21, 12, 33, 50, 63, 72, 77, 78, 75, 68, 57, 42, 23
Offset: 0

Views

Author

Lambert Klasen (lambert.klasen(AT)gmx.de) and Gary W. Adamson, Jan 19 2005

Keywords

Comments

The triangle is generated from the product of matrix A and matrix B, i.e., A * B where A = the infinite lower triangular matrix:
1 0 0 0 0 ...
1 1 0 0 0 ...
1 1 1 0 0 ...
1 1 1 1 0 ...
1 1 1 1 1 ...
... and B = the infinite lower triangular matrix:
1 0 0 0 0 ...
1 3 0 0 0 ...
1 3 5 0 0 ...
1 3 5 7 0 ...
1 3 5 7 9 ...
...
Row sums give the square pyramidal numbers A000330.
T(n+0,0)=1*n=A000027(n+1); T(n+1,1)=3*n=A008585(n); T(n+2,2)=5*n=A008587(n); T(n+3,3)=7*n=A008589(n); etc. So T(n,0)*T(n,1)=3*n*(n+1)=A028896(n) (6 times triangular numbers). T(n,1)*T(n,2)/10=3*n*(n+1)/2=A045943(n) for n>0 T(n,2)*T(n,3)/10=7/2*n*(n+1)=A024966(n) for n>1 (7 times triangular numbers), etc.
From Gary W. Adamson, Apr 25 2010: (Start)
Consider the following array, signed as shown:
...
1, 3, 5, 7, 9, 11, ...
2, -6, 10, -14, 18, -22, ...
3, 9, 15, 21, 27, 33, ...
4, -12, 20, -28, 36, -44, ...
5, 15, 25, 35, 45, 55, ...
6, -18, 30, -42, 54, -66, ...
7, 21, 35, 49, 63, 77, ...
...
Let each term (+, -)k = (+, -) phi^(-k).
Consider the inverse terms of the Lucas series (1/1, 1/3, 1/4, 1/7, ...).
By way of example, let q = phi = 1.6180339...; then
...
1/1 = q^(-1) + q^(-3) + q^(-5) + q^(-7) + q^(-9) + ...
1/3 = q^(-2) - q^(-6) + q^(-10) - q^(-14) + q^(-18) + ...
1/4 = q^(-3) + q^(-9) + q^(-15) + q^(-21) + q^(-27) +...
1/7 = q^(-4) - q^(-12) + q^(-20) - q^(-28) + q^(-36) + ...
1/11 = q^(-5) + q^(-15) + q^(-25) + q^(-35) + q^(-45) + ...
...
Relating to the Pell series, the corresponding "Lucas"-like series is (2, 6, 14, 34, 82, 198, ...) such that herein, q = 2.414213... = (1 + sqrt(2)).
Then analogous to the previous set,
...
1/2 = q^(-1) + q^(-3) + q^(-5) + q^(-7) + ...
1/6 = q^(-2) - q^(-6) + q^(-10) - q^(-14) + q^(-18) + ...
... (End)

Examples

			From _Bruno Berselli_, Feb 10 2014: (Start)
Triangle begins:
   1;
   2,  3;
   3,  6,  5;
   4,  9, 10,  7;
   5, 12, 15, 14,  9;
   6, 15, 20, 21, 18, 11;
   7, 18, 25, 28, 27, 22, 13;
   8, 21, 30, 35, 36, 33, 26, 15;
   9, 24, 35, 42, 45, 44, 39, 30, 17;
  10, 27, 40, 49, 54, 55, 52, 45, 34, 19;
  11, 30, 45, 56, 63, 66, 65, 60, 51, 38, 21;
  etc.
(End)
		

Crossrefs

Cf. A094728 (triangle generated by B*A), A000330.

Programs

  • Mathematica
    t[n_, k_] := If[n < k, 0, (2*k + 1)*(n - k + 1)]; Flatten[ Table[ t[n, k], {n, 0, 11}, {k, 0, n}]] (* Robert G. Wilson v, Jan 20 2005 *)
  • PARI
    T(n,k)=if(n
    				

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

Views

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.
		

Crossrefs

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

A269658 Number of length-5 0..n arrays with no adjacent pair x,x+1 repeated.

Original entry on oeis.org

1, 26, 225, 988, 3065, 7686, 16681, 32600, 58833, 99730, 160721, 248436, 370825, 537278, 758745, 1047856, 1419041, 1888650, 2475073, 3198860, 4082841, 5152246, 6434825, 7960968, 9763825, 11879426, 14346801, 17208100, 20508713, 24297390
Offset: 0

Views

Author

R. H. Hardin, Mar 02 2016

Keywords

Comments

The repeated pair is of the form (x,x+1) with 0 <= x <= n-1. Together with its repetition it occupies all but one position of the length-5 array. There are three choices for this position (beginning, middle, end; cf. example for n=1) and n+1 choices for the element in this position. This makes n*3*(n+1) forbidden arrays out of the (n+1)^5 possible ones. - M. F. Hasler, Feb 29 2020

Examples

			From _M. F. Hasler_, Feb 29 2020: (Start)
For n=0, there is only one array of length 5 with coefficients in 0..0, (0,0,0,0,0), and it satisfies the requirement, so a(0) = 1.
For n=1, the six arrays of length 5 with coefficients in 0..1 which do not satisfy the requirement are {(0,1,0,1,x), (0,1,x,0,1), (x,0,1,0,1); 0 <= x <= 1}, so a(1) = 2^5 - 6 = 26.
(End)
Some solutions for n=3:
  2  3  1  0  0  3  3  0  0  0  0  3  2  3  2  2
  2  0  3  3  2  3  3  1  2  3  0  3  3  1  0  3
  1  0  2  1  1  1  3  2  3  2  3  2  0  1  2  0
  0  2  0  1  0  2  2  2  1  3  3  2  2  1  3  3
  2  3  0  0  0  1  1  3  1  0  1  0  1  1  1  1
		

Crossrefs

Row 5 of A269656.

Programs

Formula

Empirical: a(n) = n^5 + 5*n^4 + 10*n^3 + 7*n^2 + 2*n + 1.
Conjectures from Colin Barker, Jan 25 2019: (Start)
G.f.: (1 + 20*x + 84*x^2 + 8*x^3 + 7*x^4) / (1 - x)^6.
a(n) = 6*a(n-1) - 15*a(n-2) + 20*a(n-3) - 15*a(n-4) + 6*a(n-5) - a(n-6) for n >= 6.
(End)
a(n) = (n+1)^5 - 3*n*(n+1) = A000584(n+1) - A028896(n), cf. comment, which confirms the above conjectured formulas. - M. F. Hasler, Feb 29 2020

Extensions

Extended to a(0) = 1 by M. F. Hasler, Feb 29 2020

A341276 a(n) = 1 + 3*n*(n+1) - Sum_{k=1..n} d(k), where d(k) is the number of divisors of k.

Original entry on oeis.org

1, 6, 16, 32, 53, 81, 113, 153, 197, 248, 304, 368, 434, 510, 590, 676, 767, 867, 969, 1081, 1195, 1317, 1445, 1581, 1717, 1864, 2016, 2174, 2336, 2508, 2680, 2864, 3050, 3244, 3444, 3650, 3857, 4077, 4301, 4531, 4763, 5007, 5251, 5507, 5765
Offset: 0

Views

Author

Luc Rousseau, Feb 08 2021

Keywords

Comments

Number of regions of the plane delimited by the 3n curves: x=k, y=k, x*y=k for k=1..n with x>0 and y>0.

Examples

			The curves with equations x=1, y=1 and x*y=1 are delimiting a(1)=6 regions in the (+; +) quadrant of the plane. With the addition of the curves with equations x=2, y=2 and x*y=2, the number of delimited regions reaches a(2)=16.
		

Crossrefs

Programs

  • Mathematica
    Table[1+3n(n+1)-Sum[DivisorSigma[0,k],{k,n}],{n,0,44}] (* Stefano Spezia, Feb 08 2021 *)
  • PARI
    a(n)=1+3*n*(n+1)-sum(k=1,n,n\k)
    
  • Python
    from sympy import integer_nthroot
    def A341276(n): return 1+3*n*(n+1)-2*sum(n//k for k in range(1,integer_nthroot(n,2)[0]+1))+integer_nthroot(n,2)[0]**2 # Chai Wah Wu, Mar 31 2021

Formula

a(n) = 1 + A028896(n) - A006218(n).

A347533 Array A(n,k) where A(n,0) = n and A(n,k) = (k*n + 1)^2 - A(n,k-1), n > 0, read by ascending antidiagonals.

Original entry on oeis.org

1, 2, 3, 3, 7, 6, 4, 13, 18, 10, 5, 21, 36, 31, 15, 6, 31, 60, 64, 50, 21, 7, 43, 90, 109, 105, 71, 28, 8, 57, 126, 166, 180, 151, 98, 36, 9, 73, 168, 235, 275, 261, 210, 127, 45, 10, 91, 216, 316, 390, 401, 364, 274, 162, 55, 11, 111, 270, 409, 525, 571, 560, 477, 351, 199, 66
Offset: 1

Views

Author

Lamine Ngom, Sep 05 2021

Keywords

Comments

A(n,k) is also the distance from A(n, k-1) to the earliest square greater than 3*A(n,k-1) - A(n,k-2).
In column k, every term is the arithmetic mean of its neighbors minus A000217(k).

Examples

			Array, A(n, k), begins:
  1  3   6  10  15   21   28   36   45 ... A000217;
  2  7  18  31  50   71   98  127  162 ... A195605;
  3 13  36  64 105  151  210  274  351 ...
  4 21  60 109 180  261  364  477  612 ...
  5 31  90 166 275  401  560  736  945 ...
  6 43 126 235 390  571  798 1051 1350 ...
  7 57 168 316 525  771 1078 1422 1827 ...
  8 73 216 409 680 1001 1400 1849 2376 ...
  9 91 270 514 855 1261 1764 2332 2997 ...
Antidiagonals, T(n, k), begin as:
   1;
   2,  3;
   3,  7,   6;
   4, 13,  18,  10;
   5, 21,  36,  31,  15;
   6, 31,  60,  64,  50,  21;
   7, 43,  90, 109, 105,  71,  28;
   8, 57, 126, 166, 180, 151,  98,  36;
   9, 73, 168, 235, 275, 261, 210, 127,  45;
  10, 91, 216, 316, 390, 401, 364, 274, 162,  55;
		

Crossrefs

Family of sequences (k*n + 1)^2: A016754 (k=2), A016778 (k=3), A016814 (k=4), A016862 (k=5), A016922 (k=6), A016994 (k=7), A017078 (k=8), A017174 (k=9), A017282 (k=10), A017402 (k=11), A017534 (k=12), A134934 (k=14).

Programs

  • Magma
    A347533:= func< n,k | (1/2)*((k*(n-k)+1)*((k+1)*(n-k)+1) +(-1)^k*(n-k- 1)) >;
    [A347533(n,k): k in [0..n-1], n in [1..13]]; // G. C. Greubel, Dec 25 2022
    
  • Mathematica
    A[n_, 0]:= n; A[n_, k_]:= (k*n+1)^2 -A[n,k-1]; Table[Function[n, A[n, k]][m-k+1], {m,0,10}, {k,0,m}]//Flatten (* Michael De Vlieger, Oct 27 2021 *)
  • SageMath
    def A347533(n,k): return (1/2)*((k*(n-k)+1)*((k+1)*(n-k)+1) +(-1)^k*(n-k- 1))
    flatten([[A347533(n,k) for k in range(n)] for n in range(1,14)]) # G. C. Greubel, Dec 25 2022

Formula

A(n,k) = A000217(k)*n^2 + k*n + 1, for k odd.
A(n,k) = A000217(k)*n^2 + (k+1)*n = (k+1)*x*(k*n/2 + 1), for k even.
A(n,k) = (A(n,k-1) + A(n,k+1) + k*(k+1))/2, for any k.
A(n, 0) = A000027(n).
A(n, 1) = A002061(n+1).
A(n, 2) = A028896(n).
A(n, 3) = A085473(n).
From G. C. Greubel, Dec 25 2022: (Start)
A(n, k) = (1/2)*( (k*n+1)*(k*n+n+1) + (-1)^k*(n-1) ).
T(n, k) = (1/2)*( (k*(n-k)+1)*((k+1)*(n-k)+1) + (-1)^k*(n-k-1) ).
Sum_{k=0..n-1} T(n, k) = (1/120)*(2*n^5 + 5*n^4 + 20*n^3 + 25*n^2 + 98*n - 15*(1-(-1)^n)). (End)

A363705 The minimum irregularity of all maximal 2-degenerate graphs with n vertices.

Original entry on oeis.org

0, 4, 2, 6, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8
Offset: 3

Views

Author

Allan Bickle, Jun 16 2023

Keywords

Comments

The irregularity of a graph is the sum of the differences between the degrees over all edges of the graph.
A maximal 2-degenerate graph can be constructed from a 2-clique by iteratively adding a new 2-leaf (vertex of degree 2) adjacent to two existing vertices.
This is also the minimum sigma irregularity of all maximal 2-degenerate graphs with n vertices. (The sigma irregularity of a graph is the sum of the squares of the differences between the degrees over all edges of the graph).

Examples

			For n=3, K_3 has irregularity 0, so a(3) = 0.
For n=4, K_4 minus an edge has irregularity 4, so a(4) = 4.
For n=5, K_4 with a subdivided edge has irregularity 2, so a(5) = 2.
For n>6, add a 2-leaf adjacent to the 2-leaves of the square of a path.  This graph has irregularity 8, so a(n) = 8.
		

Crossrefs

Cf. A002378, A046092, A028896 (irregularities of maximal k-degenerate graphs).

Programs

  • Mathematica
    PadRight[{0,4,2,6},100,8] (* Paolo Xausa, Nov 29 2023 *)

Formula

a(n) = 8 for n > 6.
G.f.: 2*x^4*(2-x+2*x^2+x^3)/(1-x). - Elmo R. Oliveira, Jul 16 2024
Previous Showing 31-38 of 38 results.