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

A174069 Numbers that can be written as a sum of at least 2 squares of consecutive positive integers.

Original entry on oeis.org

5, 13, 14, 25, 29, 30, 41, 50, 54, 55, 61, 77, 85, 86, 90, 91, 110, 113, 126, 135, 139, 140, 145, 149, 174, 181, 190, 194, 199, 203, 204, 221, 230, 245, 255, 265, 271, 280, 284, 285, 294, 302, 313, 330, 355, 365, 366, 371, 380, 384, 385, 415, 421, 434, 446, 451
Offset: 1

Views

Author

Keywords

Comments

Numbers are listed without multiplicity: 365 is the first term that is the sum of two or more squares in more than one way. See A062681 for other numbers of that form. - M. F. Hasler, Dec 22 2013
A subsequence of A212016. This sequence focuses on the squares of consecutive positive integers. - Altug Alkan, Dec 24 2015

Examples

			5 = 1^2 + 2^2
13 = 2^2 + 3^2
14 = 1^2 + 2^2 + 3^2
25 = 3^2 + 4^2
		

Crossrefs

Cf. A111774, A138591, A151557 (subset of squares), A163251 (subset of primes).
See also A062681, A212016.

Programs

  • Mathematica
    max = 50^2; lst = {}; Do[z = n^2; Do[z += (n + x)^2; If[z > max, Break[]]; AppendTo[lst, z], {x, max/2}], {n, max/2}]; Union[lst]
  • PARI
    N=20;a=[];for(i=2,N, for(k=1,i-1,if(N^2*2>t=sum(j=i-k,i,j^2),a=setunion(a,Set(t)),break)));a \\ M. F. Hasler, Dec 22 2013

Extensions

Name edited by Altug Alkan, Dec 24 2015

A165347 Primes which are sum of at least two consecutive fourth powers.

Original entry on oeis.org

17, 97, 337, 353, 881, 3697, 7793, 10657, 16561, 24979, 37699, 45377, 49297, 66977, 89041, 149057, 588737, 721687, 847601, 988417, 1146097, 1146727, 1603073, 1972097, 1975333, 2131937, 2522257, 2700979, 2782097, 2836961, 3553777
Offset: 1

Views

Author

Keywords

Examples

			17=2^4+1^4, 97=3^4+2^4, ...
37699 = 7^4 +..+ 11^4, .. , 17351662206054298079 = 27563^4 +..+ 27592^4. - _Chai Wah Wu_, Feb 02 2016
		

Crossrefs

Cf. A163251.
Subsequence of A217844. - Chai Wah Wu, Jan 29 2016

Programs

  • Mathematica
    lst={};Do[p=m^4;Do[p+=n^4;If[PrimeQ[p]&&p<=9767999,AppendTo[lst,p]],{n,m+1,6!,1}],{m,6!}];Union@lst

A218214 Number of primes up to 10^n representable as sums of consecutive squares.

Original entry on oeis.org

1, 5, 18, 48, 117, 304, 823, 2224, 6113, 16974, 48614, 139349
Offset: 1

Views

Author

Martin Renner, Oct 23 2012

Keywords

Comments

There are no common representations of two, three or six squares for n < 13, so
a(n) = A218208(n) + A218210(n) + A218212(n); n < 13.

Examples

			a(1) = 1 because only one prime less than 10 can be represented as a sum of consecutive squares, namely 5 = 1^2 + 2^2.
a(2) = 5 because there are five primes less than 100 representable as a sum of consecutive squares: the aforementioned 5, as well as 13 = 2^2 + 3^2, 29 = 2^2 + 3^2 + 4^2, 41 = 4^2 + 5^2 and 61 = 5^2 + 6^2.
		

Crossrefs

Programs

  • Mathematica
    nn = 8; nMax = 10^nn; t = Table[0, {nn}]; Do[k = n; s = 0; While[s = s + k^2; s <= nMax, If[PrimeQ[s], t[[Ceiling[Log[10, s]]]]++]; k++], {n, Sqrt[nMax]}]; Accumulate[t] (* T. D. Noe, Oct 23 2012 *)

Formula

a(n) = sum(A218213(k),k=1..n)

A307493 Primes that are both centered triangular and centered square.

Original entry on oeis.org

16381, 23199907725541, 873105326726527441, 169377932722437899461, 532026300937919058017204151243671297356368598920355705257429996547710782877327451810988538831181
Offset: 1

Views

Author

Ilya Gutkovskiy, Apr 10 2019

Keywords

Comments

Primes that are the sum of three consecutive triangular numbers and the sum of two consecutive squares.
The next term is too large to include.

Crossrefs

Programs

  • Mathematica
    Select[LinearRecurrence[{195, -195, 1}, {1, 85, 16381}, 43], PrimeQ[#] &]
Showing 1-4 of 4 results.