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.

A162930 Primes that can be written as a sum of a positive square and a positive cube in more than one way.

Original entry on oeis.org

17, 89, 233, 449, 577, 593, 1289, 1367, 1601, 1753, 2089, 2521, 3391, 4481, 4721, 5953, 6121, 6427, 7057, 7577, 8081, 9649, 10313, 10657, 10729, 11969, 12329, 13121, 13457, 15137, 15193, 15641, 15661, 16033, 16649, 18523, 21673, 21961, 23201
Offset: 1

Views

Author

Keywords

Comments

A subset of these, 2089, 4481, 7057, 15193, 15641, etc., allows this representation in more than two ways (See A206606).

Examples

			The prime 17 can be written 1^3 + 4^2 as well as 2^3 + 3^2.
		

Crossrefs

Programs

  • Maple
    isA162930 := proc(n) if isprime(n) then wa := 0 ; for y from 1 to n/2 do if issqr(n-y^3) then if n -y^3 > 0 then wa := wa+1 ; fi; fi; od: RETURN( wa>1) ; else false; fi; end:
    for i from 1 to 2700 do if isA162930 ( ithprime(i)) then printf("%d,",ithprime(i)) ; fi; od: # R. J. Mathar, Jul 21 2009
  • Mathematica
    lst={};Do[Do[AppendTo[lst,n^2+m^3],{n,2*5!}],{m,2*5!}];lst=Sort[lst]; lst2={};Do[If[lst[[n]]==lst[[n+1]]&&PrimeQ[lst[[n]]],AppendTo[lst2, lst[[n]]]],{n,Length[lst]-1}];lst2;
  • PARI
    upto(n) = {my(res = List(), v = vector(n), i, j, i2); for(i = 1, sqrtint(n), i2 = i^2; for(j = 1, sqrtnint(n - i^2, 3), v[i2 + j^3]++)); forprime(p = 2, n, if(v[p] > 1, listput(res, p))); kill(v); res} \\ David A. Corneth, Jun 20 2023

Formula

A000040 INTERSECT A054402.

Extensions

Slightly edited by R. J. Mathar, Jul 21 2009

A207650 Squares that can be written as a sum of 3 distinct nonzero squares in 3 or more ways.

Original entry on oeis.org

441, 529, 729, 841, 961, 1089, 1225, 1369, 1521, 1681, 1764, 1849, 2025, 2116, 2209, 2401, 2601, 2809, 2916, 3025, 3249, 3364, 3481, 3721, 3844, 3969, 4225, 4356, 4489, 4761, 4900, 5041, 5329, 5476, 5625, 5929, 6084, 6241, 6561, 6724, 6889, 7056, 7225, 7396
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    t = Sort@Select[Flatten[Table[x^2 + y^2 + z^2, {x, 400}, {y, x + 1, 400}, {z, y + 1, 400}]], # < 160006 && IntegerQ[Sqrt[#]] &];
    f1[l_] := Module[{t = {}}, Do[If[l[[n]] != l[[n + 1]] && l[[n]] != l[[n - 1]], AppendTo[t, l[[n]]]], {n, Length[l] - 1}]; t];
    f2[l_] := Module[{t = {}}, Do[If[l[[n]] == l[[n + 1]], AppendTo[t, l[[n]]]], {n, Length[l] - 1}]; t];
    s1 = Join[{First[t]}, f1[t]];
    Complement[t, s1];
    t = f2[t];
    s2 = Join[{First[t]}, f1[t]];
    Complement[t, s2]
Showing 1-2 of 2 results.