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

A382400 Number of subsets of Z_n such that every ordered pair of distinct elements has a different sum.

Original entry on oeis.org

1, 2, 4, 8, 15, 26, 48, 78, 133, 202, 316, 474, 755, 1054, 1604, 2196, 3305, 4370, 6208, 8228, 11631, 15086, 20912, 26842, 37581, 46626, 64052, 79984, 109635, 133314, 176156, 217094, 291409, 343872, 457828, 547576, 718375, 852074, 1112128, 1308230, 1714741
Offset: 0

Views

Author

Andrew Howroyd, Mar 27 2025

Keywords

Comments

Arithmetic is done modulo n.
Every subset of size at most 3 is included. The cake numbers A000125 give the number of such subsets.

Examples

			The a(6) = 48 subsets are 42 subsets of size at most 3 and the following 6: {1,3,4,5}, {1,2,3,5}, {0,2,4,5}, {0,2,3,4}, {0,1,3,5}, {0,1,2,4}. Each of the size 4 subsets is perfect in the sense that every number from 0..5 can be written as the sum of two elements modulo 6 in exactly one way.
		

Crossrefs

Programs

  • PARI
    a(n)={
       my(recurse(k,r,b,w)=
          if(k >= n, 1,
             my(t=bitand((1<
    				

A169948 Fourth entry in row n of triangle in A169945.

Original entry on oeis.org

1, 2, 6, 14, 29, 52, 96, 160, 277, 450, 712, 1086, 1657, 2448, 3636, 5280, 7635, 10840, 15392, 21372, 29655, 40580, 55282, 74620, 100651, 134232, 178922, 236488, 312019, 408550, 534288, 692978, 897931, 1156256, 1485650, 1897704, 2421635, 3071608, 3894042
Offset: 2

Views

Author

N. J. A. Sloane, Aug 01 2010

Keywords

Comments

Wanted: a recurrence. Are any of A169940-A169954 related to any other entries in the OEIS?

Crossrefs

Related to thickness: A169940-A169954, A061909.

Programs

  • Mathematica
    b[n_, s_] := b[n, s] = Module[{sn, m}, m = Length[s]; sn = Append[s, n]; If[n < 1, 1, b[n - 1, s] + If[m*(m + 1)/2 == Length[Union[Flatten[Table[ sn[[i]] + sn[[j]], {i, 1, m}, {j, i + 1, m + 1}]]]], b[n - 1, sn], 0]]];
    A196723[n_] := A196723[n] = b[n - 1, {n}] + If[n == 0, 0, A196723[n - 1]];
    c[n_, s_] := c[n, s] = Module[{sn, m}, If[n < 1, 1, sn = Append[s, n]; m = Length[sn]; If[m*(m - 1)/2 == Length[Table[sn[[i]] - sn[[j]], {i, 1, m - 1}, {j, i + 1, m}] // Flatten // Union], c[n - 1, sn], 0] + c[n-1, s]]];
    A143823[n_] := A143823[n] = c[n - 1, {n}] + If[n == 0, 0, A143823[n - 1]];
    a[n_] := a[n] = A196723[n + 1] - A143823[n + 1];
    Table[Print[n, " ", a[n]]; a[n], {n, 2, 40}] (* Jean-François Alcover, Aug 27 2019, after Alois P. Heinz in A196723 and A143823 *)

Formula

a(n) = A196723(n+1) - A143823(n+1). - Andrew Howroyd, Jul 09 2017

Extensions

a(15)-a(28) from Nathaniel Johnston, Nov 12 2010
a(29)-a(40) from Andrew Howroyd, Jul 09 2017

A169953 Third entry in row n of triangle in A169950.

Original entry on oeis.org

1, 1, 4, 8, 15, 23, 44, 64, 117, 173, 262, 374, 571, 791, 1188, 1644, 2355, 3205, 4552, 5980, 8283, 10925, 14702, 19338, 26031, 33581, 44690, 57566, 75531, 96531, 125738, 158690, 204953, 258325, 329394, 412054, 523931, 649973, 822434, 1018332, 1274909
Offset: 2

Views

Author

N. J. A. Sloane, Aug 01 2010

Keywords

Comments

Wanted: a recurrence. Are any of A169940-A169954 related to any other entries in the OEIS?

Crossrefs

Related to thickness: A169940-A169954, A061909.

Programs

  • Mathematica
    b[n_, s_] := b[n, s] = Module[{sn, m}, m = Length[s]; sn = Append[s, n]; If[n < 1, 1, b[n - 1, s] + If[m*(m + 1)/2 == Length[Union[Flatten[Table[ sn[[i]] + sn[[j]], {i, 1, m}, {j, i + 1, m + 1}]]]], b[n - 1, sn], 0]]];
    A196723[n_] := A196723[n] = b[n - 1, {n}] + If[n == 0, 0, A196723[n - 1]]; c[n_, s_] := c[n, s] = Module[{sn, m}, If[n < 1, 1, sn = Append[s, n]; m = Length[sn]; If[m*(m - 1)/2 == Length[Table[sn[[i]] - sn[[j]], {i, 1, m - 1}, {j, i + 1, m}] // Flatten // Union], c[n-1, sn], 0] + c[n-1, s]]];
    A143823[n_] := A143823[n] = c[n - 1, {n}] + If[n == 0, 0, A143823[n - 1]];
    a[n_] := A196723[n+1] - A196723[n] - A143823[n+1] + A143823[n];
    Table[Print[n, " ", a[n]]; a[n], {n, 2, 42}] (* Jean-François Alcover, Sep 07 2019, after Alois P. Heinz in A196723 and A143823 *)

Formula

a(n) = A169948(n)-A169948(n-1) for n>2. - Andrew Howroyd, Jul 09 2017

Extensions

a(15)-a(28) and definition corrected by Nathaniel Johnston, Nov 15 2010
Offset corrected and a(30)-a(42) from Andrew Howroyd, Jul 09 2017
Previous Showing 31-33 of 33 results.