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

A077763 Number of ways of pairing the odd squares of the numbers 1 to n with the even squares of the numbers n+1 to 2n such that each pair sums to a prime.

Original entry on oeis.org

1, 1, 0, 1, 2, 0, 1, 1, 2, 2, 0, 1, 7, 2, 10, 14, 38, 6, 118, 62, 80, 144, 604, 711, 6201, 4005, 8570, 14544, 126725, 124618, 281566, 323297, 382314, 157132, 1374799, 594736, 7274196, 8865745, 27572536, 34358242, 309696376, 457523710, 2659232903, 1429551708, 8294430525
Offset: 1

Views

Author

T. D. Noe, Nov 15 2002

Keywords

Comments

The Mathematica program uses backtracking to find all solutions. The Print statement can be uncommented to print all solutions. The product of this sequence and A077764 gives A077762.

Examples

			a(5)=2 because two pairings are possible: 1+36=37, 9+100=109, 25+64=89 and 1+100=101, 9+64=73, 25+36=61.
		

Crossrefs

Programs

  • Mathematica
    try[lev_] := Module[{j}, If[lev>n, (*Print[soln]; *) cnt++, For[j=1, j<=Length[s[[lev]]], j++, If[ !MemberQ[soln, s[[lev]][[j]]], soln[[lev]]=s[[lev]][[j]]; try[lev+2]; soln[[lev]]=0]]]]; maxN=28; For[lst1={1}; n=2, n<=maxN, n++, s=Table[{}, {n}]; For[i=1, i<=n, i=i+2, For[j=n+1, j<=2n, j++, If[PrimeQ[i^2+j^2], AppendTo[s[[i]], j]]]]; soln=Table[0, {n}]; cnt=0; try[1]; AppendTo[lst1, cnt]]; lst1

Extensions

a(29)-a(45) from Bert Dobbelaere, Sep 08 2019

A077764 Number of ways of pairing the even squares of the numbers 1 to n with the odd squares of the numbers n+1 to 2n such that each pair sums to a prime. a(1) is defined to be 1.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 2, 4, 4, 8, 6, 14, 14, 44, 22, 30, 12, 41, 137, 667, 401, 517, 149, 286, 306, 1312, 1940, 23546, 23886, 23886, 68285, 728501, 241424, 555302, 630441, 4175810, 7996830, 87591010, 101316606, 148078428, 92744140, 298180464, 241949668, 1090944470
Offset: 1

Views

Author

T. D. Noe, Nov 15 2002

Keywords

Comments

It appears that a pairing is always possible. The Mathematica program uses backtracking to find all solutions. The Print statement can be uncommented to print all solutions. The product of this sequence and A077763 gives A077762.

Examples

			a(5)=1 because only one pairing is possible: 4+49=53, 16+81=97.
		

Crossrefs

Programs

  • Mathematica
    try[lev_] := Module[{j}, If[lev>n, (*Print[soln]; *) cnt++, For[j=1, j<=Length[s[[lev]]], j++, If[ !MemberQ[soln, s[[lev]][[j]]], soln[[lev]]=s[[lev]][[j]]; try[lev+2]; soln[[lev]]=0]]]]; maxN=28; For[lst2={1}; n=2, n<=maxN, n++, s=Table[{}, {n}]; For[i=2, i<=n, i=i+2, For[j=n+1, j<=2n, j++, If[PrimeQ[i^2+j^2], AppendTo[s[[i]], j]]]]; soln=Table[0, {n}]; cnt=0; try[2]; AppendTo[lst2, cnt]]; lst2

Extensions

a(29)-a(46) from Bert Dobbelaere, Sep 08 2019
Showing 1-2 of 2 results.