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

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

Original entry on oeis.org

1, 1, 1, 0, 0, 0, 0, 0, 3, 0, 10, 12, 35, 52, 19, 20, 349, 361, 637, 3678, 15237, 11875, 13306, 10964, 27223, 37054, 201408, 510152, 1995949, 4867214, 11255174, 35705858, 63029611, 129860749, 258247089, 190294696, 686125836, 2195910738, 5114909395, 9141343219, 19769529758, 44678128099, 63885400119
Offset: 15

Views

Author

T. D. Noe, Dec 01 2003

Keywords

Comments

For n > 31, some solutions are circular; that is, the first and last numbers also sum to a square. Note that A071983 counts each circular solution n times. This sequence counts each circular solution only once. The Mathematica program uses backtracking to find all solutions, which can be printed by removing the comment symbols.

Examples

			See A071983.
		

Crossrefs

Cf. A071983, A071984 (number of circular solutions), A090461 (n for which there is a solution).
Cf. A078107 (n for which there is no solution).
Cf. A272259 (row n gives the smallest circular solution, for each n >= 32).

Programs

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

Formula

a(n) = A071983(n) - (n-1)*A071984(n).

Extensions

a(43)-a(45) from Donovan Johnson, Sep 14 2010
a(46)-a(47) from Jud McCranie, Aug 18 2018
a(48) from Jud McCranie, Sep 17 2018
a(49)-a(52) from Bert Dobbelaere, Dec 30 2018
a(47) corrected by Bert Dobbelaere, Jan 12 2019
a(53)-a(54) from Martin Ehrenstein, May 22 2023
a(55)-a(57) from Zhao Hui Du, Apr 26 2024

A071983 Square chains: the number of permutations (reversals not counted as different) of the numbers 1 to n such that the sum of any two consecutive numbers is a square.

Original entry on oeis.org

1, 1, 1, 0, 0, 0, 0, 0, 3, 0, 10, 12, 35, 52, 19, 20, 349, 392, 669, 4041, 17175, 12960, 14026, 11889, 29123, 39550, 219968, 553694, 2178103, 5301127, 12220138, 38838893, 68361609, 140571720, 280217025, 204853870, 738704986, 2368147377, 5511090791, 9802605881, 21164463050, 47746712739, 68092497615, 123092214818
Offset: 15

Views

Author

William Rex Marshall, Jun 16 2002

Keywords

Comments

For n > 31, this sequence counts each circular solution (in which the first and last numbers also sum to a square) n times. Sequence A090460 counts the circular solutions only once, giving the number of essentially different solutions.
The existence of cubic chains in answered affirmatively in Puzzle 311. - T. D. Noe, Jun 16 2005

Examples

			There is only one possible square chain of minimum length, which is: (8, 1, 15, 10, 6, 3, 13, 12, 4, 5, 11, 14, 2, 7, 9) so a(15)=1.
		

References

  • Ruemmler, Ronald E., "Square Loops," Journal of Recreational Mathematics 14:2 (1981-82), page 141; Solution by Chris Crandell and Lance Gay, JRM 15:2 (1982-83), page 155.

Crossrefs

Cf. A071984.
Cf. A078107 (n for which there is no solution).

Formula

a(n) = A090460(n) + (n-1)*A071984(n). - Martin Ehrenstein, May 16 2023

Extensions

a(43)-a(45) from Donovan Johnson, Sep 14 2010
a(46)-a(47) from Jud McCranie, Aug 18 2018
a(48) from Jud McCranie, Sep 17 2018
a(49)-a(52) from Bert Dobbelaere, Dec 30 2018
a(53)-a(54) from Martin Ehrenstein, May 16 2023
a(55)-a(56) from Zhao Hui Du, Apr 25 2024
a(57)-a(58) from Zhao Hui Du, Apr 26 2024

A078107 Numbers k such that it is not possible to arrange the numbers from 1 to k in a chain with adjacent links summing to a square.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 18, 19, 20, 21, 22, 24
Offset: 1

Views

Author

R. K. Guy, Dec 06 2002

Keywords

Comments

It seems certain, on account of the valences of the underlying graph, that necklaces exist for all larger k, but this may not yet have been proved.
The problem originated (for k = 15) with Bernardo Recamán Santos of Colombia. The problem for necklaces is due to Joe Kisenwether.
Ed Pegg Jr and W. Edwin Clark have found necklaces (and hence chains) for k = 32 onwards up to 50 and for several larger numbers.
It has been proven that there are no more terms. See A090461 for details. - Paolo Xausa, May 29 2024

Examples

			E.g., for 15, 16 or 17, use (16-)9-7-2-14-11-5-4-12-13-3-6-10-15-1-8(-17).
		

Crossrefs

A107929 Smallest list of integers from 1 to n such that sum of any two adjacent terms is a square.

Original entry on oeis.org

8, 1, 15, 10, 6, 3, 13, 12, 4, 5, 11, 14, 2, 7, 9
Offset: 1

Views

Author

Zak Seidov, Jun 11 2005

Keywords

Comments

This "solution" holds also for numbers 0 to n=15: it is sufficient to put zero at the end of the sequence. The same is true for cases n=16 and 17: {8,1,15,10,6,3,13,12,4,5,11,14,2,7,9,16} (add zero at the end or between 9 and 16 which gives two solutions), {16,9,7,2,14,11,5,4,12,13,3,6,10,15,1,8,17} (add zero at the beginning or between 16 and 9 which gives two solutions). Also, for n=23 (next case with 1-to-n solution), we have 4 0-to-n solutions, etc. Cf. A090461 = numbers n such that there is a permutation of the numbers 1 to n such that the sum of adjacent numbers is a square; A090461 = numbers n such that there is a permutation of the numbers 1 to n such that the sum of adjacent numbers is a square.

Examples

			8+1=9, 1+15=16, 15+10=25, 10+6=16, 6+3=9, 3+13=16, 13+12=25, 12+4=16, 4+5=9, 5+11=16, 11+14=25, 14+2=16, 2+7=9, 7+9=16 all 14 sums are squares.
		

Crossrefs

A304120 a(n) is the least k such that there is a permutation of the positive integers from 1 through k for which every pair of adjacent terms sums to a perfect power with exponent n.

Original entry on oeis.org

2, 15, 305, 6479
Offset: 1

Views

Author

Benjamin Knight, May 06 2018

Keywords

Comments

From Jordan D Fredette, May 28 2019: (Start)
I was helped immensely by my friend Christian Burns who is an expert programmer.
I also worked with my friend Josiah Findley. Without him I likely would have never figured this out.
Essentially, I discovered that when arranging the numbers 1..k so that any two next to each other add up to a perfect power, we need not check every single permutation.
In fact, the best method is to list all the different ways to add up two numbers to get each of the powers which are greater than 1 but less than 2k.
If any number shows up only once in this list, then it must be an endpoint.
Once the endpoints are determined, any number that only shows up twice must be connected to the two other numbers with which it is paired in the list.
This will result in strings of numbers which must be a part of the permutation.
If the same number is at the end of two different strings then those strings must be joined.
Thus, the number of permutations to be checked is further decreased.
Basically, Christian was able to implement this as a program and found that 6479 is the smallest k for which the numbers 1..k can be arranged so that any two next to each other add up to a perfect fourth power. (End)

Examples

			a(1) = 2 as the permutation (1, 2) of the integers has the property that the adjacent terms sum to a power of 1.
a(2) = 15 as the permutation of the positive integers 1 through 15 [8, 1, 15, 10, 6, 3, 13, 12, 4, 5, 11, 14, 2, 7, 9] has the property that every pair of adjacent terms sums to a power with exponent n = 2 (a square).
		

Crossrefs

For n=2, see A090461.

Programs

  • Sage
    See MathOverflow link.

Extensions

a(4) from Jordan D Fredette, May 28 2019
Showing 1-5 of 5 results.