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

A256009 Triangle read by rows: Largest cardinality of a set of Hamming diameter <= k in {0,1}^n, k <= n.

Original entry on oeis.org

1, 1, 2, 1, 2, 4, 1, 2, 4, 8, 1, 2, 5, 8, 16, 1, 2, 6, 10, 16, 32, 1, 2, 7, 12, 22, 32, 64, 1, 2, 8, 14, 29, 44, 64, 128, 1, 2, 9, 16, 37, 58, 93, 128, 256
Offset: 0

Views

Author

Robert Israel, May 06 2015

Keywords

Comments

Size of largest clique in graph with vertices {0,1}^n, edges joining points with distance <= k.
By considering balls of radius k, a(n,2*k) >= A008949(n,k).
By considering Cartesian products, a(n1 + n2, k1 + k2) >= a(n1,k1)*a(n2,k2).
a(n,0) = 1.
a(n,1) = 2 for n >= 1.
a(n,n) = 2^n.
a(n,2) = n + 1 for n >= 2.
a(n,n-1) = 2^(n-1).
a(n,3) >= 2n for n >= 4, and this appears to be an equality. - Robert Israel, Apr 20 2016

Examples

			Triangle begins
  1
  1   2
  1   2   4
  1   2   4   8
  1   2   5   8    16
  1   2   6  10    16    32
  1   2   7  12    22    32    64
  1   2   8  14    29    44    64   128
  1   2   9  16    37    58    93   128   256
a(4,2) = 5: a suitable set of diameter <= 2 is {0000, 0001, 0010, 0100, 1000}.
		

Crossrefs

Cf. A008949.

Programs

  • Maple
    clist:= proc(c,n) local V;
       V:= Vector(n);
       V[convert(c,list)]:= 1;
       convert(V,list);
    end proc:
    f:= proc(n,k)
    uses GraphTheory, combinat;
      local Verts, dist, E, G, V0, G0, vk, Vk, G1;
      if k = 0 then return 1
      elif k >= n then return 2^n
      fi;
    Verts:= map(clist, convert(powerset(n),list), n);
      dist:= Matrix(2^n,2^n,shape=symmetric,(i,j) -> convert(abs~(Verts[i]-Verts[j]),`+`));
      E:= select(e -> dist[e[1],e[2]]<=k, {seq(seq({i,j},j=i+1..2^n),i=1..2^n)});
    G:= Graph(2^n,E);
    V0:= Neighborhood(G,1,'open');
    G0:= InducedSubgraph(G,V0);
    vk:= select(j -> dist[1,j] = k, V0);
    Vk:= Neighborhood(G0,vk[1],'open');
    G1:= InducedSubgraph(G0, Vk);
    CliqueNumber(G1)+2;
    end proc:
    seq(seq(f(n,k), k=0..n),n=0..6);

A382817 a(n) = number of primes among the partial sums of row n of Pascal's triangle (A007318).

Original entry on oeis.org

0, 1, 1, 1, 2, 1, 1, 2, 2, 0, 2, 1, 3, 2, 3, 2, 3, 1, 1, 2, 1, 1, 2, 2, 1, 1, 2, 3, 3, 0, 2, 7, 2, 0, 0, 1, 1, 0, 0, 0, 2, 0, 1, 1, 1, 0, 1, 3, 1, 0, 1, 1, 1, 1, 1, 1, 5, 3, 3, 2, 3, 2, 3, 3, 10, 0, 1, 0, 1, 0, 2, 2, 2, 0, 0, 1, 1, 0, 2, 1, 1, 1, 2, 1, 2, 0
Offset: 0

Views

Author

Clark Kimberling, Apr 07 2025

Keywords

Examples

			The numbers in A008949 (partial sums of Pascal's triangle) begin thus:
  1
  1    2
  1    3     4
  1    4     7     8
  1    5    11    15    16
  1    6    16    26    31    32
  1    7    22    42    57    63    64
Row n=4 includes exactly 2 primes, so a(4) = 2.
		

Crossrefs

Programs

  • Maple
    a:= n-> nops(select(isprime, ListTools[PartialSums]
                ([seq(binomial(n, k), k=0..n)]))):
    seq(a(n), n=0..100);  # Alois P. Heinz, Apr 07 2025
  • Mathematica
    t = Accumulate /@ Table[Binomial[n, i], {n, 0, 100}, {i, 0, n}]; (* A037955 *)
    Map[PrimeQ, t]; Table[Count[m[[n]], True], {n, 1, 100}]
  • PARI
    a(n) = my(v=vector(n+1, k, binomial(n,k-1))); #select(isprime, vector(#v, k, sum(i=1, k, v[i]))); \\ Michel Marcus, Apr 13 2025

Formula

a(n) = 0 <=> n in { A258483 }.

A079285 First differences of A079284.

Original entry on oeis.org

0, 2, 1, 5, 4, 13, 13, 34, 39, 89, 112, 233, 313, 610, 859, 1597, 2328, 4181, 6253, 10946, 16687, 28657, 44320, 75025, 117297, 196418, 309619, 514229, 815656, 1346269, 2145541, 3524578, 5637351, 9227465, 14799280, 24157817
Offset: 0

Views

Author

Paul Barry, Feb 08 2003

Keywords

Examples

			a(2n) = Fib(2n+2) - 2^(n/2). a(2n+1) = Fib(2n+3)
		

Crossrefs

Cf. A000045, A008949, A001519 (bisection), A105693 (bisection).

Formula

a(n)=Fib(n+2)-2^floor(n/2)(1-(1)^(n+1))/2
G.f.: -x*(-2+x+2*x^2) / ( (x^2+x-1)*(2*x^2-1) ). - R. J. Mathar, Feb 13 2015

A347667 Triangle read by rows: T(n,k) = Sum_{j=0..k} binomial(n,j) * j! (0 <= k <= n).

Original entry on oeis.org

1, 1, 2, 1, 3, 5, 1, 4, 10, 16, 1, 5, 17, 41, 65, 1, 6, 26, 86, 206, 326, 1, 7, 37, 157, 517, 1237, 1957, 1, 8, 50, 260, 1100, 3620, 8660, 13700, 1, 9, 65, 401, 2081, 8801, 28961, 69281, 109601, 1, 10, 82, 586, 3610, 18730, 79210, 260650, 623530, 986410
Offset: 0

Views

Author

Ilya Gutkovskiy, Sep 10 2021

Keywords

Examples

			Triangle begins:
  1;
  1, 2;
  1, 3,  5;
  1, 4, 10,  16;
  1, 5, 17,  41,   65;
  1, 6, 26,  86,  206,  326;
  1, 7, 37, 157,  517, 1237, 1957;
  1, 8, 50, 260, 1100, 3620, 8660, 13700;
  ...
		

Crossrefs

T(n,n) = A000522, T(2*n,n) = A066211.

Programs

  • Mathematica
    T[n_, k_] := Sum[Binomial[n, j] j!, {j, 0, k}]; Table[T[n, k], {n, 0, 9}, {k, 0, n}] // Flatten

A368506 Square array T(n,k), n >= 0, k >= 0, read by antidiagonals downwards, where T(n,k) = Sum_{j=0..n} k^(n-j) * binomial(j+k-1,j).

Original entry on oeis.org

1, 1, 0, 1, 2, 0, 1, 4, 3, 0, 1, 6, 11, 4, 0, 1, 8, 24, 26, 5, 0, 1, 10, 42, 82, 57, 6, 0, 1, 12, 65, 188, 261, 120, 7, 0, 1, 14, 93, 360, 787, 804, 247, 8, 0, 1, 16, 126, 614, 1870, 3204, 2440, 502, 9, 0, 1, 18, 164, 966, 3810, 9476, 12900, 7356, 1013, 10, 0
Offset: 0

Views

Author

Seiichi Manyama, Dec 27 2023

Keywords

Examples

			Square array begins:
  1, 1,   1,    1,     1,     1,      1, ...
  0, 2,   4,    6,     8,    10,     12, ...
  0, 3,  11,   24,    42,    65,     93, ...
  0, 4,  26,   82,   188,   360,    614, ...
  0, 5,  57,  261,   787,  1870,   3810, ...
  0, 6, 120,  804,  3204,  9476,  23112, ...
  0, 7, 247, 2440, 12900, 47590, 139134, ...
		

Crossrefs

Columns k=0..3 give A000007, A000027(n+1), A125128(n+1), A052150.
Main diagonal gives A293574.

Programs

  • PARI
    T(n, k) = sum(j=0, n, k^(n-j)*binomial(j+k-1, j));

Formula

G.f. of column k: 1/((1-k*x) * (1-x)^k).
Previous Showing 41-45 of 45 results.