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.

A137366 Subsequence of A137365 where it is possible to choose p1, p2, p3 so that p1+p2+p3 = prime.

Original entry on oeis.org

1483, 5381, 6271, 7229, 9181, 11897, 13103, 13841, 14489, 17107, 20357, 25747, 26711, 27917, 30161, 30259, 31247, 32579, 36677, 36899, 36901, 42083, 48817, 54181, 55511, 55691, 56377, 57637, 64151, 66347, 69389, 75167, 76031, 76123
Offset: 1

Views

Author

Vladimir Joseph Stephan Orlovsky, Apr 09 2008, Apr 14 2008

Keywords

Comments

36161 is the first number that is in A137365 but not in the present sequence. See A138556.

Examples

			1483=3^3+5^3+11^3, 3+5+11=17;
7229=3^3+7^3+19^3, 3+7+19=29.
		

Crossrefs

Programs

  • Mathematica
    Array[r, 99]; Array[y, 99]; For[i = 0, i < 10^2, r[i] = y[i] = 0; i++ ]; z = 4^2; n = 0; For[i1 = 1, i1 < z, a = Prime[i1]; a2 = a^3; For[i2 = i1 + 1, i2 < z, b = Prime[i2]; b2 = b^3; For[i3 = i2 + 1, i3 < z, c = Prime[i3]; c2 = c^3; p = a2 + b2 + c2; p3 = a + b + c; If[PrimeQ[p] && PrimeQ[p3], Print[a2, " + ", b2, " + ", c2, " = ", p, "; ", a, " + ", b, " + ", c, " = ", p3]; n++; r[n] = p]; i3++ ]; i2++ ]; i1++ ]; Sort[Array[r, 71]]
    lst = {}; Do[q = Prime@a; r = Prime@b; s = Prime@c; p = q^3 + r^3 + s^3; t = q + r + s; If[PrimeQ@p && PrimeQ@t, AppendTo[lst, p]], {a, 14}, {b, a - 1}, {c, b - 1}]; Take[Sort@lst, 35] (* Robert G. Wilson v, Apr 13 2008 *)

A138556 Numbers in A137365 but not in A137366.

Original entry on oeis.org

36161, 36583, 56897, 59093, 67733, 69073, 74177, 81901, 98533, 98837, 104021, 110629, 110879, 110933, 149759, 155861, 157933, 173087, 173293, 175463, 179999, 199081, 207719, 217573, 223919, 229321, 235171, 235243, 240479
Offset: 1

Views

Author

Robert G. Wilson v, Apr 13 2008

Keywords

A138854 Numbers which are the sum of three cubes of distinct primes.

Original entry on oeis.org

160, 378, 476, 495, 1366, 1464, 1483, 1682, 1701, 1799, 2232, 2330, 2349, 2548, 2567, 2665, 3536, 3555, 3653, 3871, 4948, 5046, 5065, 5264, 5283, 5381, 6252, 6271, 6369, 6587, 6894, 6992, 7011, 7118, 7137, 7210, 7229, 7235, 7327, 7453, 8198, 8217, 8315
Offset: 1

Views

Author

M. F. Hasler, Apr 13 2008

Keywords

Comments

This is a subsequence of A024975. The odd terms of this sequence are A138853, the even terms are 8+{ even terms of A120398 }. Thus primes in this sequence, A137365, are the same as primes in A138853.

Crossrefs

Cf. A024975 (a^3+b^3+c^3, a>b>c>0), A138853 (odd terms of this), A120398, A137365 (primes in A138853 / A138854).

Programs

  • Maple
    isA030078 := proc(n)
        local f ;
        if n < 8 then
            false;
        else
            f := ifactors(n)[2] ;
            if nops(f) = 1 and op(2,op(1,f)) = 3 then
                true;
            else
                false;
            end if;
        end if;
    end proc:
    isA138854 := proc(n)
        local i,j,p,q,r,rcub ;
        for i from 1 do
            p := ithprime(i) ;
            if p^3+(p+1)^3+(p+2)^3 > n then
                return false;
            end if;
            for j from i+1 do
                q := ithprime(j) ;
                rcub := n-q^3-p^3 ;
                if rcub <= q^3 then
                    break;
                fi ;
                if isA030078(rcub) then
                    return true;
                end if;
            end do:
        end do:
    end proc:
    for n from 5 do
        if isA138854(n) then
            print(n);
        end if;
    end do: # R. J. Mathar, Jun 09 2014
  • Mathematica
    f[upto_]:=Module[{maxp=PrimePi[Floor[Power[upto, (3)^-1]]]}, Select[Union[Total/@(Subsets[Prime[Range[maxp]],{3}]^3)],#<=upto&]]; f[9000]  (* Harvey P. Dale, Mar 21 2011 *)
  • PARI
    isA138854(n)={ if( n%2, isA138853(n), isA120398(n-8)) }
    for( n=1,10^4, isA138854(n) & print1(n", "))

Formula

A138854 = { p(i)^3+p(j)^3+p(k)^3 ; i>j>k>0 } = A138853 union { p(i)^3+p(j)^3+8 ; i>j>1}

A182479 Primes of the form p^2 + q^2 + r^2, where p,q,r are distinct primes.

Original entry on oeis.org

83, 179, 227, 347, 419, 467, 491, 563, 587, 659, 827, 971, 1019, 1091, 1259, 1427, 1499, 1667, 1811, 1907, 1979, 2027, 2243, 2267, 2339, 2531, 2579, 2699, 2819, 2843, 2939, 3347, 3539, 3659, 3779, 3851, 4019, 4091, 4259, 4451, 4523, 4547, 4691, 4787, 5099
Offset: 1

Views

Author

Alex Ratushnyak, May 01 2012

Keywords

Comments

All terms are congruent to 5 modulo 6. Smallest of primes p, q, r is always 3. - Zak Seidov, Jun 03 2014
The number of such representations of a prime of that form is A263723. - Jonathan Sondow and Robert G. Wilson v, Nov 02 2015

Examples

			5099 = 3^2 + 7^2 + 71^2.
		

Crossrefs

Cf. A137364 (the same with repetitions). - Zak Seidov, Jun 03 2014

Programs

  • Mathematica
    mx = 20; ps = Prime[Range[2, mx + 1]]; t = Table[ps[[i]]^2 + ps[[j]]^2 + ps[[k]]^2, {i, mx}, {j, i + 1, mx}, {k, j + 1, mx}]; Select[Union[Flatten[t]], # <= 34 + ps[[-1]]^2 && PrimeQ[#] &] (* T. D. Noe, May 01 2012 *)
  • PARI
    list(lim)=my(v=List(),t);lim\=1;forprime(p=7,sqrt(lim), forprime(q=5,min(sqrtint(lim-p^2-9),p-1), t=p^2+q^2;forprime(r=3,min(sqrtint(lim-t),q-1), if(isprime(t+r^2), listput(v,t+r^2))))); vecsort(Vec(v),,8)
    \\ Charles R Greathouse IV, May 01 2012
Showing 1-4 of 4 results.