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.

A256944 Squares which are not the sums of two consecutive nonsquares.

Original entry on oeis.org

0, 1, 4, 9, 16, 36, 49, 64, 100, 144, 196, 256, 289, 324, 400, 484, 576, 676, 784, 900, 1024, 1156, 1296, 1444, 1600, 1681, 1764, 1936, 2116, 2304, 2500, 2704, 2916, 3136, 3364, 3600, 3844, 4096, 4356, 4624, 4900, 5184, 5476, 5776, 6084, 6400, 6724, 7056, 7396, 7744, 8100, 8464
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Apr 25 2015

Keywords

Comments

The union of A008843, A055792, and A016742. [Corrected by Charles R Greathouse IV, May 07 2015]
Consists of the squares of all even numbers and odd numbers in A078057 = (1, 3, 7, 17, 41, 99, ...), see also A001333 = abs(A123335). See A257282 for the square roots and A257292 for their complement in the nonnegative integers A001477. - M. F. Hasler, May 08 2015

Examples

			0, 1, 4, 9, 16, 36, are in this sequence because first 14 sums of two consecutive nonsquares are 5, 8, 11, 13, 15, 18, 21, 23, 25, 27, 29, 32, 35, 37.
		

Crossrefs

Programs

  • Mathematica
    lim = 15000; s = Plus @@@ (Partition[#, 2, 1] & @ Complement[Range@ lim, Range[Floor@ Sqrt[lim]]^2]); Select[Range@ Floor[Sqrt[lim]]^2, !MemberQ[s, #] &] (* Michael De Vlieger, Apr 29 2015 *)
    lst=Partition[Select[Range[0,10^6],!IntegerQ[Sqrt[#]]&],2,1]/.{a_,b_}->  a+b;a256944=Complement[Table[n^2,{n,0,Sqrt[Last[lst]]}],lst] (* timing improved by Ivan N. Ianakiev, Apr 30 2015 *)
    Union[#, Range[0, Max@ #, 2]] &@ Numerator[Convergents[Sqrt@ 2, 6]]^2 (* Michael De Vlieger, Aug 06 2016, after Harvey P. Dale at A001333 *)
  • PARI
    is(n)=issquare(n) && (n%2==0 || issquare(n\2) || issquare(n\2+1)) \\ Charles R Greathouse IV, May 07 2015

Formula

a(n) ~ 4n^2. - Charles R Greathouse IV, May 07 2015
a(n) = A257282(n)^2. - M. F. Hasler, May 08 2015

A257292 Numbers whose square can be written as the sum of two consecutive nonsquares.

Original entry on oeis.org

5, 9, 11, 13, 15, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 43, 45, 47, 49, 51, 53, 55, 57, 59, 61, 63, 65, 67, 69, 71, 73, 75, 77, 79, 81, 83, 85, 87, 89, 91, 93, 95, 97, 101, 103, 105, 107, 109, 111, 113, 115, 117, 119, 121, 123, 125, 127, 129, 131
Offset: 1

Views

Author

M. F. Hasler, May 08 2015

Keywords

Comments

Equivalently, odd numbers such that neither of the two integers next to n^2/2 is a square.
Complement of A257282 = square roots of A256944.
The odd numbers missing here are 1, 3, 7, 17, 41, 99, ... = A078057 (see also A001333 = abs(A123335)).

Examples

			9 is a term because 9^2 = 81 = 40 + 41, neither of which are square.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[1, 131, 2], AllTrue[{Floor[#^2/2], Ceiling[#^2/2]}, ! IntegerQ@ Sqrt@ # &] &] (* Michael De Vlieger, Dec 11 2015 *)
  • PARI
    select( is(n)={bittest(n,0) && !issquare(n^2\2) && !issquare(n^2\/2)}, [0..140]) \\ Corrected Jul 06 2021, thanks to an observation by Bill McEachen

A257553 Primes whose squares are not the sums of two consecutive nonsquares.

Original entry on oeis.org

2, 3, 7, 17, 41, 239, 577, 665857, 9369319, 63018038201, 489133282872437279, 19175002942688032928599, 123426017006182806728593424683999798008235734137469123231828679
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Apr 29 2015

Keywords

Comments

Primes of the form A257282(k).
2 is in this sequence, and an odd prime p is in the sequence iff either (p^2 - 1)/2 or (p^2 + 1)/2 is a square. - Wolfdieter Lang, May 07 2015
According to the Neretin comment in A257282, and as the primes of A001333 are in A086395, this is (apart from the 2) the same as A086395. - R. J. Mathar, Jan 31 2024

Examples

			2 is in the sequence because it is prime and its square 4 is in A256944: 4 is not a sum of consecutive numbers.
3 is in the sequence because it is prime and its square 9 is in A256944: 9 = 2^2 + 5.
7 is in the sequence because it is prime and its square 49 is in A256944: 49 = 24 + 5^2.
5 is not in the sequence because neither 12 nor 13 is a square.
		

Crossrefs

Programs

  • Mathematica
    lim = 1000000; s = Plus @@@ (Partition[#, 2, 1] & @ Complement[Range@ lim, Range[Floor@ Sqrt[lim]]^2]); Select[Sqrt[#] & /@ Select[Range@ Floor[Sqrt[lim]]^2, ! MemberQ[s, #] &] , PrimeQ] (* Michael De Vlieger, Apr 29 2015 *)

Extensions

Name clarified by Michael De Vlieger and Jon E. Schoenfield, May 03 2015
Edited by Wolfdieter Lang, May 07 2015
Showing 1-3 of 3 results.