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.

Previous Showing 11-20 of 25 results. Next

A214514 Numbers of the form p^2 + q^2 + r^2, where p, q, and r are primes.

Original entry on oeis.org

12, 17, 22, 27, 33, 38, 43, 54, 57, 59, 62, 67, 75, 78, 83, 99, 102, 107, 123, 129, 134, 139, 147, 150, 155, 171, 174, 177, 179, 182, 187, 195, 198, 203, 219, 222, 227, 243, 246, 251, 267, 291, 294, 297, 299, 302, 307, 315, 318, 323, 339, 342, 347, 363, 369
Offset: 1

Views

Author

T. D. Noe, Jul 29 2012

Keywords

Crossrefs

Cf. A045636 (two primes), A214515 (four primes).

Programs

  • Mathematica
    nn = 10^3; ps = Prime[Range[PrimePi[Sqrt[nn]]]]; t = Flatten[Table[ps[[i]]^2 + ps[[j]]^2 + ps[[k]]^2, {i, Length[ps]}, {j, i, Length[ps]}, {k, j, Length[ps]}]]; t = Select[t, # <= nn &]; Union[t]
  • Python
    from sympy import primerange as primes
    from itertools import takewhile, combinations_with_replacement as mc
    def aupto(N):
        psqs = list(takewhile(lambda x: x<=N, (p**2 for p in primes(1, N+1))))
        sum3 = set(sum(c) for c in mc(psqs, 3) if sum(c) <= N)
        return sorted(sum3)
    print(aupto(369)) # Michael S. Branicky, Dec 17 2021

A226539 Numbers which are the sum of two squared primes in exactly two ways (ignoring order).

Original entry on oeis.org

338, 410, 578, 650, 890, 1010, 1130, 1490, 1730, 1802, 1898, 1970, 2330, 2378, 2738, 3050, 3170, 3530, 3650, 3842, 3890, 4010, 4658, 4850, 5018, 5090, 5162, 5402, 5450, 5570, 5618, 5690, 5858, 6170, 6410, 6530, 6698, 7010, 7178, 7202, 7250, 7850, 7970, 8090
Offset: 1

Views

Author

Henk Koppelaar, Jun 10 2013

Keywords

Examples

			338 = 7^2 + 17^2 = 13^2 + 13^2;
410 = 7^2 + 19^2 = 11^2 + 17^2.
		

References

  • Stan Wagon, Mathematica in Action, Springer, 2000 (2nd ed.), Ch. 17.5, pp. 375-378.

Crossrefs

Cf. A054735 (restricted to twin primes), A037073, A069496.
Cf. A045636 (sum of two squared primes: a superset).
Cf. A214511 (least number having n representations).
Cf. A226562 (restricted to sums decomposed in exactly three ways).

Programs

  • Maple
    Prime2PairsSum := p -> select(x ->`if`(andmap(isprime, x),true,false), numtheory:-sum2sqr(p)):
    for n from 2 to 10^6 do
      if nops(Prime2PairsSum(n)) = 2 then print(n, Prime2PairsSum(n)) fi;
    od;
  • Mathematica
    Select[Range@10000, Length[Select[ PowersRepresentations[#, 2, 2], And @@ PrimeQ[#] &]] == 2 &] (* Giovanni Resta, Jun 11 2013 *)
  • PARI
    select( is_A226539(n)={#[0|t<-sum2sqr(n),isprime(t[1])&&isprime(t[2])]==2}, [1..10^4]) \\ For more efficiency, apply selection to A045636. See A133388 for sum2sqr(). - M. F. Hasler, Dec 12 2019

Extensions

a(25)-a(44) from Giovanni Resta, Jun 11 2013

A226562 Numbers which are the sum of two squared primes in exactly three ways (ignoring order).

Original entry on oeis.org

2210, 3770, 5330, 6290, 12818, 16490, 18122, 19370, 24050, 24650, 26690, 32810, 33410, 34970, 36530, 39650, 39770, 44642, 45050, 45890, 49010, 50690, 51578, 57770, 59450, 61610, 63050, 66170, 67490, 72410, 73610, 74210, 80330, 85202, 86210, 86330, 88010
Offset: 1

Views

Author

Henk Koppelaar, Jun 11 2013

Keywords

Comments

Suggestion: difference between successive terms is always at least 3. (With the known 115885 terms <10^9, the smallest difference is 24.) - Zak Seidov, Jun 12 2013

Examples

			2210 = 19^2 + 43^2 = 23^2 + 41^2 = 29^2 + 37^2;
		

References

  • Stan Wagon, Mathematica in Action, Springer, 2000 (2nd ed.), Ch. 17.5, pp. 375-378.

Crossrefs

Cf. A054735 (restricted to twin primes), A037073, A069496.
Cf. A045636 (sum of two squared primes), A226539.
Cf. A214511 (least number having n representations).
Cf. A226539 (restricted to sums decomposed in exactly three ways).

Programs

  • Maple
    Prime2PairsSum := s -> select( x -> `if`(andmap(isprime, x), true, false), numtheory:-sum2sqr(s)):
    for n from 2 to 10 do
    if nops(Prime2PairsSum(n)) = 3 then print(n,Prime2PairsSum(n)) fi
    od;
  • Mathematica
    Select[Range@20000, Length[Select[ PowersRepresentations[#, 2, 2], And @@ PrimeQ[#] &]] == 3 &] (* Giovanni Resta, Jun 11 2013 *)

Extensions

a(22)-a(37) from Giovanni Resta, Jun 11 2013

A124866 Numbers of the form (p^2-q^2)/8, p, q odd primes, p>q.

Original entry on oeis.org

2, 3, 5, 6, 9, 12, 14, 15, 18, 20, 21, 24, 30, 33, 35, 36, 39, 42, 44, 45, 51, 54, 60, 63, 65, 66, 69, 75, 81, 84, 90, 96, 99, 102, 104, 105, 111, 114, 117, 119, 120, 126, 129, 135, 141, 144, 150, 156, 159, 165, 168, 170, 171, 174, 180, 186, 189, 195, 201, 204, 207
Offset: 1

Views

Author

Alexander Adamchuk, Nov 10 2006

Keywords

Comments

Primes in a(n) are {2, 3, 5}.

Crossrefs

Cf. A124865 Numbers of the form p^2-q^2, p, q primes, p>q. Cf. A045636 Numbers of the form p^2+q^2, p, q primes.

Programs

  • Mathematica
    Take[Union[Flatten[Table[(Prime[p]^2 - Prime[q]^2)/8, {p, 2, 100}, {q, 2, p - 1}]]], 60] (* Alonso del Arte, Jul 14 2011 *)

A212292 Odd numbers not of the form p^2 + q^2 + r with p, q, and r prime.

Original entry on oeis.org

1, 3, 5, 7, 9, 17, 33, 43, 83, 179, 623, 713, 1019
Offset: 1

Views

Author

Keywords

Comments

The corresponding sequence with the restriction to primes removed is empty.
Wang shows that all but x^{9/20+e} members of this sequence up to x are congruent to 2 mod 3, for any e > 0.
There are no more terms < 10^7. - Donovan Johnson, Jun 27 2012
There are no more terms < 4*10^9. - Jud McCranie, Jun 09 2013
There are no more terms < 10^11. - Giovanni Resta, Jun 09 2013

References

  • Wang Mingqiang, On sums of a prime, and a square of prime, and a k-power of prime, Northeastern Mathematical Journal 18:4 (2002), pp. 283-286.

Crossrefs

Programs

  • PARI
    list(lim)=my(p1=vector(primepi(sqrt(lim-5.5)),i,prime(i)^2), p2=List(), v=List(), u=List([1,3,5,7,9]), t); for(i=1,#p1, for(j=i,#p1,t=p1[i]+p1[j]; if(t>lim, break, listput(p2,t)))); p2=vecsort(Vec(p2),,8); for(i=1,#p2,forprime(p=2,lim-p2[i],listput(v,p2[i]+p))); v=select(n->n%2, vecsort(Vec(v),,8)); for(i=2,#v,forstep(j=v[i-1]+2,v[i]-2,2,listput(u,j))); Vec(u)

A242230 Primes p of the form p^2 + q + 1 where p < q are consecutive primes.

Original entry on oeis.org

61, 4561, 9511, 17299, 19471, 26737, 30109, 37447, 49957, 69439, 94561, 196699, 209311, 259603, 317539, 333517, 352249, 414097, 427069, 459013, 678157, 845491, 886429, 943819, 1027189, 1217719, 1410163, 1472587, 1647379, 2165323, 2200777, 2230549, 2603389
Offset: 1

Views

Author

K. D. Bajpai, May 08 2014

Keywords

Examples

			a(1) = 61 = 7^2 + 11 + 1: 61 is prime, 7 and 11 are consecutive primes.
a(2) = 4561 = 67^2 + 71 + 1: 4561 is prime, 67 and 71 are consecutive primes.
		

Crossrefs

Programs

  • Maple
    with(numtheory): A242230:= proc()local k ; k:=(ithprime(x)^2+ithprime(x+1)+1); if  isprime(k) then RETURN (k); fi;end: seq(A242230 (),x=1..500);
  • Mathematica
    A242230 = {}; Do[p = Prime[n]^2 + Prime[n + 1] + 1; If[PrimeQ[p], AppendTo[A242230, p]], {n, 500}]; A242230
    Select[#[[1]]^2+#[[2]]+1&/@Partition[Prime[Range[300]],2,1],PrimeQ] (* Harvey P. Dale, Mar 28 2016 *)

A242231 Primes p of the form p^2 + q - 1 where p < q are consecutive primes.

Original entry on oeis.org

13, 31, 59, 307, 383, 557, 997, 1409, 1723, 3541, 5113, 5407, 6323, 6977, 8017, 10303, 19469, 52673, 94559, 109897, 151717, 158009, 187927, 193163, 249503, 274069, 326617, 361807, 383791, 419261, 427067, 546863, 573809, 592133, 636017, 684757, 735307, 738743
Offset: 1

Views

Author

K. D. Bajpai, May 08 2014

Keywords

Examples

			a(1) = 13 = 3^2 + 5 - 1: 13 is prime, 3 and 5 are consecutive primes.
a(2) = 31 = 5^2 + 7 - 1: 31 is prime, 5 and 7 are consecutive primes.
		

Crossrefs

Programs

  • Maple
    with(numtheory): A242231:= proc()local k ; k:=(ithprime(x)^2+ithprime(x+1)-1);if  isprime(k) then RETURN (k); fi;end: seq(A242231 (),x=1..500);
  • Mathematica
    A242231 = {}; Do[p = Prime[n]^2 + Prime[n + 1] - 1; If[PrimeQ[p], AppendTo[A242231, p]], {n, 500}]; A242231
    Select[#[[1]]^2+#[[2]]-1&/@Partition[Prime[Range[250]],2,1],PrimeQ] (* Harvey P. Dale, Mar 05 2022 *)

A167276 Primes p such that p^2=x^2+y^2-1 with x and y also prime.

Original entry on oeis.org

7, 13, 17, 23, 31, 37, 41, 43, 47, 53, 67, 73, 83, 89, 103, 107, 109, 137, 149, 151, 157, 163, 173, 191, 193, 227, 229, 233, 241, 263, 269, 293, 307, 311, 313, 317, 331, 337, 353, 359, 383, 389, 397, 401, 421, 431, 439, 443, 457, 463, 467, 487, 499, 523, 557, 577, 593, 599, 613, 619, 643, 683, 701, 727, 733, 757, 773, 829, 839, 853, 857, 863, 887, 947, 967, 977, 983, 997
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Nov 01 2009

Keywords

Comments

Appears to be infinite.
Since (5*x+13)^2 + 1 = (3*x+7)^2 + (4*x+11)^2, it appears that there are infinitely many members of this sequence of the form 5*x+13 where x is an even number, that is the form of A030431(n). See the solution 78 at page 49 in the given reference (250 Problems in Elementary Number Theory) for the related conjecture. - Altug Alkan, Mar 30 2016

Examples

			a(1)=7 (x=5, y=5); a(2)=13 (x=7, y=11); a(3)=17 (x=11, y=17); a(4)=23 (x=13, y=19); a(5)=31 (x=11, y=31);...; a(21)=463 (x=461, y=43)
		

References

  • W. Sierpiński, 250 Problems in Elementary Number Theory. New York: American Elsevier, Warsaw, 1970, Problem 78 page 7.

Crossrefs

Cf. A000040.

Programs

  • Maple
    isA045636 := proc(n) local p,q ; p := 2 ; while p^2+4 <= n do q := p ; while p^2+q^2 <= n do if q^2+p^2 = n then return true; end if ; q := nextprime(q) ; end do ; p := nextprime(p) ; end do ; return false ; end proc: A066872 := proc(n) ithprime(n)^2+1 ; end: for n from 1 to 200 do if isA045636(A066872(n)) then printf("%d,",ithprime(n)) ; end if ; end do ; # R. J. Mathar, Nov 09 2009
  • Mathematica
    Select[Prime@ Range@ 168, Resolve[Exists[{x, y}, Reduce[#^2 == x^2 + y^2 - 1, {x, y}, Primes]]] &] (* Michael De Vlieger, Mar 30 2016 *)

Formula

{ A000040(i): A066872(i) in A045636}. [R. J. Mathar, Nov 09 2009]

Extensions

Edited and extended by Daniel Platt, Nov 02 2009

A226599 Numbers which are the sum of two squared primes in exactly four ways (ignoring order).

Original entry on oeis.org

10370, 10730, 11570, 12410, 13130, 19610, 22490, 25010, 31610, 38090, 38930, 39338, 39962, 40970, 41810, 55250, 55970, 59330, 59930, 69530, 70850, 73730, 76850, 77090, 89570, 98090, 98930, 103298, 118898, 125450, 126290, 130730, 135218, 139490
Offset: 1

Views

Author

Henk Koppelaar, Jun 13 2013

Keywords

Comments

It appears that all first differences are divisible by 24. - Zak Seidov, Jun 14 2013

Examples

			10370 = 13^2 + 101^2 = 31^2 + 97^2 = 59^2 + 83^2 = 71^2 + 73^2.
10730 = 11^2 + 103^2 = 23^2 + 101^2 = 53^2 + 89^2 = 67^2 + 79^2.
		

References

  • Stan Wagon, Mathematica in Action, Springer, 2000 (2nd ed.), Ch. 17.5, pp. 375-378.

Crossrefs

Cf. A054735 (restricted to twin primes), A037073, A069496.
Cf. A045636 (sum of two squared primes is a superset).
Cf. A214511 (least number having n representations).
Cf. A225104 (numbers having at least three representations is a superset).
Cf. A226539, A226562 (sums decomposed in exactly two and three ways).

Programs

  • Maple
    Prime2PairsSum := s -> select(x ->`if`(andmap(isprime, x), true, false),
       numtheory:-sum2sqr(s)):
    for n from 2 to 10^6 do
      if nops(Prime2PairsSum(n)) = 4 then print(n, Prime2PairsSum(n)) fi;
    od;
  • Mathematica
    (* Assuming mod(a(n),24) = 2 *) Reap[ For[ k = 2, k <= 2 + 240000, k = k + 24, pr = Select[ PowersRepresentations[k, 2, 2], PrimeQ[#[[1]]] && PrimeQ[#[[2]]] &]; If[Length[pr] == 4 , Print[k]; Sow[k]]]][[2, 1]] (* Jean-François Alcover, Jun 14 2013 *)

Formula

a(n) = p^2 + q^2; p, q are (not necessarily different) primes

A242243 Semiprimes sp of the form p^2 + q + 1 where p and q are consecutive primes.

Original entry on oeis.org

15, 33, 187, 309, 559, 1411, 1897, 2263, 2869, 3543, 6979, 10717, 11559, 11995, 22353, 32953, 39009, 54529, 57363, 58333, 66313, 77011, 80383, 113917, 120759, 124969, 147079, 158011, 167701, 175983, 177673, 237661, 241581, 253519, 299767, 310813, 376387, 381309
Offset: 1

Views

Author

K. D. Bajpai, May 09 2014

Keywords

Examples

			a(1) = 15 = 3^2 + 5 + 1 = 3 * 5 is semiprime, 3 and 5 are consecutive primes.
a(2) = 33 = 5^2 + 7 + 1 = 3 * 11 is semiprime, 5 and 7 are consecutive primes.
		

Crossrefs

Programs

  • Maple
    with(numtheory): A242243:= proc()local k ; k:=(ithprime(x)^2+ithprime(x+1)+1);if  bigomega(k)=2 then RETURN (k); fi;end: seq(A242243 (),x=1..500);
  • Mathematica
    Select[Table[Prime[n]^2 + Prime[n + 1] + 1, {n, 500}], PrimeOmega[#] == 2 &]
Previous Showing 11-20 of 25 results. Next