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

A108660 Square-loop primes.

Original entry on oeis.org

2, 13, 31, 79, 97, 227, 881, 1013, 2797, 3181, 3631, 8101, 22727, 81001, 101363, 109013, 131363, 181813, 272227, 310181, 310901, 318181, 318881, 631013, 636313, 810401, 818101, 901097, 904097, 972227, 1018813, 1090013, 1810013, 2272727
Offset: 1

Views

Author

Zak Seidov, Jun 16 2005

Keywords

Comments

Primes such that each pair of adjacent digits (and also the first and the last ones) sums up to a square. First term is arguable since there is 'no pair of adjacent digits', but there are the "first" and "last" digits.

Crossrefs

Programs

  • Mathematica
    Select[Prime[Range[200000]],And@@(IntegerQ[Sqrt[#]]&/@(Total/@Partition[ IntegerDigits[#],2,1,1]))&] (* Harvey P. Dale, Mar 03 2014 *)

A108658 Number of the essentially different permutations of the numbers 0 to n such that the sum of adjacent numbers is a square.

Original entry on oeis.org

1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 3, 4, 4, 0, 0, 4, 5, 2, 8, 7, 47, 72, 135, 283, 158, 164, 1948, 1467, 2998, 20561, 66700, 130236, 153058, 181635, 239386, 343189, 1600832, 5001577, 16859525, 45119463, 66785667, 218923884, 393626778, 665307164, 3111228585, 2156371427
Offset: 0

Views

Author

Keywords

Comments

Square chains (reversals not counted and circles counted once). There is no solution for n=2-13,18-19 (note offset=0). For n=0 and n=1 we have trivial square circles (which are also known as square loops). Square circles seem to appear for all n>30, see A108661. Cf. A090460 for 1-to-n case.

Examples

			n=14: one solution
  {8,1,0,9,7,2,14,11,5,4,12,13,3,6,10};
n=15: three solutions
  {0,9,7,2,14,11,5,4,12,13,3,6,10,15,1,8},
  {5,11,14,2,7,9,0,4,12,13,3,6,10,15,1,8},
  {8,1,0,9,7,2,14,11,5,4,12,13,3,6,10,15};
n=16: four solutions
  {0,16,9,7,2,14,11,5,4,12,13,3,6,10,15,1,8},
  {5,11,14,2,7,9,16,0,4,12,13,3,6,10,15,1,8},
  {8,1,0,16,9,7,2,14,11,5,4,12,13,3,6,10,15},
  {8,1,15,10,6,3,13,12,4,5,11,14,2,7,9,0,16}.
		

Crossrefs

Programs

  • Mathematica
    SquareQ[n_]:=IntegerQ[Sqrt[n]]; try[lev_]:=Module[{t, j, circular}, If[lev>n+1, circular=SquareQ[soln[[1]]+soln[[n+1]]]; If[(!circular&&soln[[1]]
    				

Extensions

a(42)-a(50) from Bert Dobbelaere, Dec 30 2018

A108661 Square loops: the number of circular permutations (reversals not counted as different) of the numbers 0 to n such that the sum of any two consecutive numbers is a square.

Original entry on oeis.org

6, 3, 3, 72, 226, 358, 309, 391, 547, 813, 3562, 10741, 36633, 94547, 120424, 393670, 676579, 1088429, 5531195, 3294327, 8335128, 27820643, 75288569, 111875702, 264015370, 465407197, 687532936, 1109951444, 3256360099
Offset: 31

Views

Author

Keywords

Examples

			There is no solution for n=0,...,30, (note offset=31). For n=0,1 we have the trivial square circles {0} and {0,1}, which are not included in the sequence.
There are only six possible square loops of the minimum length (n=31 case):
{1,0,4,5,31,18,7,29,20,16,9,27,22,3,13,12,24,25,11,14,2,23,26,10,6,30,19,17,8,28,21,15},
{1,0,4,12,13,3,6,30,19,17,8,28,21,15,10,26,23,2,14,22,27,9,16,20,29,7,18,31,5,11,25,24},
{1,0,4,21,28,8,17,19,30,6,3,13,12,24,25,11,5,31,18,7,29,20,16,9,27,22,14,2,23,26,10,15},
{1,15,10,26,23,2,14,22,27,9,16,20,29,7,18,31,5,11,25,0,4,21,28,8,17,19,30,6,3,13,12,24},
{1,15,21,28,8,17,19,30,6,10,26,23,2,14,11,5,31,18,7,29,20,16,9,27,22,3,13,12,4,0,25,24},
{1,15,21,28,8,17,19,30,6,10,26,23,2,14,11,25,0,4,5,31,18,7,29,20,16,9,27,22,3,13,12,24}.
In the n=32,33 (resp.) cases, there are three square loop solutions:
{1,0,4,32,17,19,30,6,3,13,12,24,25,11,5,31,18,7,29,20,16,9,27,22,14,2,23,26,10,15,21,28,8},
{1,8,28,21,4,32,17,19,30,6,3,13,12,24,25,11,5,31,18,7,29,20,16,0,9,27,22,14,2,23,26,10,15},
{1,8,28,21,15,10,26,23,2,14,22,27,9,16,20,29,7,18,31,5,11,25,0,4,32,17,19,30,6,3,13,12,24},
and
{1,0,4,32,17,19,30,6,3,13,12,24,25,11,5,20,29,7,18,31,33,16,9,27,22,14,2,23,26,10,15,21,28,8},
{1,8,28,21,4,32,17,19,30,6,3,13,12,24,25,11,5,20,29,7,18,31,33,16,0,9,27,22,14,2,23,26,10,15},
{1,8,28,21,15,10,26,23,2,14,22,27,9,16,33,31,18,7,29,20,5,11,25,0,4,32,17,19,30,6,3,13,12,24}
(resp.).
		

Crossrefs

Cf. A108658 = square chains.

Extensions

a(42)-a(47) from Donovan Johnson, Sep 14 2010
a(48)-a(52) from Fausto A. C. Cariboni, Sep 21 2018
a(53)-a(59) from Bert Dobbelaere, Dec 29 2018
Showing 1-3 of 3 results.