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.

A184417 p^2 + (p+2)^2 - 1 where (p,p+2) is the n-th twin prime pair.

Original entry on oeis.org

33, 73, 289, 649, 1801, 3529, 7201, 10369, 20809, 23329, 38089, 45001, 64801, 73729, 78409, 103969, 115201, 145801, 159049, 194689, 242209, 352801, 373249, 426889, 544969, 649801, 720001, 763849, 824329, 871201, 1312201, 1351369, 1371169, 1472329, 1555849, 2080801, 2130049, 2205001, 2255689, 2384929, 2654209
Offset: 1

Views

Author

Robert Mohr, Feb 13 2011

Keywords

Comments

This seems to have a disproportionately high probability of generating a prime number.

Examples

			a(1) = prime(1)^2 + (prime(1)+2)^2 - 1 =  3^2 +  (3+2)^2 - 1 =  33;
a(2) = prime(2)^2 + (prime(2)+2)^2 - 1 =  5^2 +  (5+2)^2 - 1 =  73;
a(3) = prime(3)^2 + (prime(3)+2)^2 - 1 = 11^2 + (11+2)^2 - 1 = 289.
		

Programs

  • Mathematica
    Total/@(Select[Partition[Prime[Range[500]],2,1],#[[2]]-#[[1]]==2&]^2)-1  (* Harvey P. Dale, Feb 24 2011 *)

Formula

a(n) = A063533(n) - 1.

A224505 Primes p such that p+1 is the sum of the squares of a pair of twin primes.

Original entry on oeis.org

73, 1801, 3529, 10369, 20809, 103969, 115201, 426889, 649801, 2080801, 2205001, 2654209, 3266569, 3328201, 4428289, 5171329, 10017289, 10672201, 11347849, 14709889, 21780001, 22177801, 28395649, 29675809, 30701449, 32320801, 35583049, 40176649, 41368609
Offset: 1

Views

Author

Bruno Berselli, Apr 08 2013

Keywords

Comments

Primes in A184417.
Obviously, no prime has the form q^2+(q+2)^2+1, where q and q+2 are twin primes.

Examples

			3529 (prime) is in the sequence because 3529+1 = 41^2+43^2, where 41 and 43 are twin primes.
		

Crossrefs

Cf. A063533 (sums of the squares of a pair of twin primes), A118072 (primes which are sum of a pair of twin primes minus 1), A184417.

Programs

  • Magma
    [p: r in PrimesUpTo(5000) | IsPrime(r+2) and IsPrime(p) where p is 2*r^2+4*r+3];
  • Maple
    A224505:=proc(q) local a,n;
    for n from 1 to q do
      if ithprime(n+1)-ithprime(n)=2 then a:=ithprime(n+1)^2+ithprime(n)^2-1;
      if isprime(a) then print(a); fi; fi;
    od; end: A224505(10^6); # Paolo P. Lava, Apr 17 2013
  • Mathematica
    Select[(#[[1]]^2 + #[[2]]^2 - 1) & /@ Select[Partition[Prime[Range[700]], 2, 1], #[[2]] - #[[1]] == 2 &], PrimeQ]

A131348 Sum of squares of prime quadruplets.

Original entry on oeis.org

364, 940, 44140, 152140, 2722540, 8820940, 14062540, 17388940, 42380140, 48024940, 127916140, 356076940, 676520140, 979064140, 990360940, 1032336940, 1302488140, 1431108940, 1509322540, 1766520940, 1984702540, 2561372140
Offset: 1

Views

Author

Jonathan Vos Post, Sep 29 2007

Keywords

Comments

This is to prime quadruplets A007530 as sums of squares of twin primes A063533 are to twin primes. This is to prime quadruplets A007530 as A133524 is to four consecutive primes. Note that prime quadruplets are not the same as four consecutive primes. After a(1) these are always multiples of 20, because after A007530(1) = 5, all A007530(n) == 1 mod 10. a(n) is a prime times 20 for an = 1, 2, 3, 12, 16, 21.

Examples

			a(1) = 364 = 5^2 + 7^2 + 11^2 + 13^2.
a(2) = 940 = 11^2 + 13^2 + 17^2 + 19^2.
a(3) = 44140 = 101^2 + (103)^2 + (107)^2 + (109)^2 because 101, 103, 107, 109 are a prime quadruplet.
		

Crossrefs

Programs

  • Mathematica
    Total[#^2]&/@Select[Partition[Prime[Range[3000]],4,1],MatchQ[#,{#[[1]],#[[1]]+2,#[[1]]+6,#[[1]]+8}]&]  (* Harvey P. Dale, Feb 03 2011 *)

Formula

a(n) = p^2 + (p+2)^2 + (p+6)^2 + (p+8)^2 for p in A007530.

Extensions

Corrected and extended by Harvey P. Dale, Feb 03 2011
Showing 1-3 of 3 results.