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.

Showing 1-6 of 6 results.

A095986 A card-arranging problem: number of permutations p_1, ..., p_n of 1, ..., n such that i + p_i is a square for every i.

Original entry on oeis.org

1, 0, 0, 1, 0, 1, 0, 0, 1, 1, 1, 0, 1, 1, 2, 4, 3, 2, 5, 15, 21, 66, 37, 51, 144, 263, 601, 1333, 2119, 2154, 2189, 3280, 12405, 55329, 160895, 588081, 849906, 1258119, 1233262, 2478647, 4305500, 17278636, 47424179, 153686631, 396952852, 1043844982
Offset: 0

Views

Author

Keywords

Comments

Gardner attributes the problem (for the case n = 13) to David L. Silverman.

Examples

			a(0) = 1: the empty permutation.
a(3) = 1: 321.
a(5) = 1: 32154.
a(8) = 1: 87654321.
a(9) = 1: 826543917.
		

References

  • M. Gardner, Mathematical Games column, Scientific American, Nov 1974.
  • M. Gardner, Mathematical Games column, Scientific American, Mar 1975.
  • M. Gardner, Time Travel and Other Mathematical Bewilderments. Freeman, NY, 1988, p. 81.

Crossrefs

Cf. A006063 (for cubes), A010052, A073364.

Programs

  • Maple
    b:= proc(s) option remember; (n-> `if`(n=0, 1, add(
         `if`(issqr(n+j), b(s minus {j}), 0), j=s)))(nops(s))
        end:
    a:= n-> b({$1..n}):
    seq(a(n), n=0..25);  # Alois P. Heinz, Mar 03 2024
  • Mathematica
    nmax=45; a[n_]:=Permanent[Table[If[IntegerQ[Sqrt[i+j]],1,0],{i,n},{j,n}]]; Join[{1},Array[a,nmax]] (* Stefano Spezia, Mar 03 2024 *)

Formula

a(n) = permanent(m), where the n X n matrix m is defined by m(i,j) = 1 or 0, depending on whether i+j is a square or not.

Extensions

a(32) and a(33) from John W. Layman, Jul 21 2004
a(34)-a(36) from Ray Chandler, Jul 26 2004
a(37)-a(45) from William Rex Marshall, Apr 18 2006
a(0)=1 prepended by Alois P. Heinz, Mar 03 2024

A096680 A card-arranging problem: values of n such that there exists more than one permutation p_1, ..., p_n of 1, ..., n such that i + p_i is a cube for every i.

Original entry on oeis.org

112, 115, 116, 117, 119, 124, 125, 126, 127, 128, 129, 130, 133, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212
Offset: 1

Views

Author

Ray Chandler, Jul 25 2004

Keywords

Examples

			117 is in the sequence with permutations
(7,6,...,2,1,117,116,...,9,8) and
(26,25,...,2,1,98,97,...28,27,117,116,...,100,99)
		

Crossrefs

A096904 A card-arranging problem: number of permutations p_1, ..., p_n of 1, ..., n such that i + p_i is a cube for every i.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 4, 0, 0, 4, 4, 5, 1, 2, 1, 1, 1, 1, 2, 3, 7, 3, 10, 6, 5, 1, 1, 4, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1, 1, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 3, 30, 37, 1963, 1289, 1560
Offset: 1

Views

Author

Ray Chandler, Aug 01 2004

Keywords

Crossrefs

Formula

a(n) = permanent(m), where the n X n matrix m is defined by m(i,j) = 1 or 0, depending on whether i+j is a cube or not.

A096905 A card-arranging problem: values of n such that there exists a permutation p_1, ..., p_n of 1, ..., n such that i + p_i is a fourth power for every i.

Original entry on oeis.org

15, 65, 80, 175, 190, 240, 255, 369, 384, 434, 449, 544, 559, 609, 624, 671, 686, 736, 751, 846, 861, 911, 926, 1040, 1055, 1105, 1120, 1215, 1230, 1235, 1250, 1260, 1270, 1275, 1280, 1285, 1290, 1295, 1300, 1305, 1315, 1345, 1360, 1474, 1489, 1519, 1529, 1534, 1539
Offset: 1

Views

Author

Ray Chandler, Aug 02 2004

Keywords

Comments

1280 is the first n that has multiple solutions; it has 32. 1285 has 1024 solutions. 1290 has 248832 solutions. - David Wasserman, Dec 19 2007

Crossrefs

Extensions

More terms from David Wasserman, Nov 21 2007

A096906 A card-arranging problem: values of n such that there exists a permutation p_1, ..., p_n of 1, ..., n such that i + p_i is a fifth power for every i.

Original entry on oeis.org

31, 211, 242, 781, 812, 992, 1023, 2101, 2132, 2312, 2343, 2882, 2913, 3093, 3124, 4651, 4682, 4862, 4893, 5432, 5463, 5643, 5674, 6752, 6783, 6963, 6994, 7533, 7564, 7744, 7775, 9031, 9062, 9242, 9273, 9812, 9843, 10023, 10054, 11132, 11163, 11343
Offset: 1

Views

Author

Ray Chandler, Aug 02 2004

Keywords

Crossrefs

Extensions

More terms from David Wasserman, Nov 21 2007

A096901 Number of permutations p of (1,2,3,...,n) such that k+p(k) is a triangular number for 1<=k<=n.

Original entry on oeis.org

1, 0, 1, 1, 0, 1, 1, 1, 2, 4, 3, 9, 14, 13, 52, 124, 161, 181, 715, 2338, 7073, 8624, 15466, 52858, 150365, 316543, 691771, 1681604, 5324919, 15407311, 37417775, 69725286, 155786456, 579599171, 2600274145, 10530031625, 22971756045, 47057778714, 112946192928
Offset: 0

Views

Author

Ray Chandler, Jul 26 2004

Keywords

Crossrefs

Formula

a(n) = permanent(m), where the n X n matrix m is defined by m(i,j) = 1 or 0, depending on whether i+j is a triangular number or not.

Extensions

More terms from David Wasserman, Nov 27 2007
a(0) and a(31)-a(38) from Martin Ehrenstein, Mar 03 2024
Showing 1-6 of 6 results.