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

A218047 Numbers n such that n^2+1, (n+2)^2+1, (n+6)^2+1, (n+10)^2+1 and (n+12)^2+1 are prime.

Original entry on oeis.org

4, 14, 31464, 37684, 65664, 202034, 287414, 300174, 430044, 630734, 791834, 809244, 885274, 1230334, 1347834, 1411654, 1424674, 1475744, 1635134, 1721844, 1914514, 2391364, 2536414, 2855194, 3151704, 3386994, 3421844, 4010614, 4121494, 4186664, 4566484
Offset: 1

Views

Author

Michel Lagneau, Oct 19 2012

Keywords

Comments

This is a subsequence of A096012.
a(k)==4 mod 10 because if n==0, 2, 6 or 8 mod 10, then n^2+1 or (n+2)^2+1 is divisible by 5. When n==4 (mod 10), then (n+4)^2+1 and (n+8)^2+1 are always divisible by 5.

Examples

			4 is in the sequence because 4^2+1 = 5; 6^2+1 = 37; 10^2+1 = 101; 14^2+1 = 197 and 16^2+1 = 257 are prime.
		

Crossrefs

Programs

  • Maple
    with(numtheory):f:=n->n^2+1: for n from 1 to  460000 do:if type(f(n),prime) and type(f(n+2),prime) and type(f(n+6),prime) and type(f(n+10),prime) and type(f(n+12),prime) then printf(`%d, `,n):else fi:od:
  • Mathematica
    lst={}; Do[p1=n^2+1; p2=(n+2)^2+1; p3=(n+6)^2+1; p4=(n+10)^2+1; p5=(n+12)^2+1;If[PrimeQ[p1] && PrimeQ[p2] && PrimeQ[p3] && PrimeQ[p4]&& PrimeQ[p5], AppendTo[lst, n]], {n, 0, 460000}];lst
    Select[Range[457*10^4],AllTrue[(#+{0,2,6,10,12})^2+1,PrimeQ]&] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Nov 30 2019 *)
  • PARI
    is_A218047(n,d=[0,2,6,10,12])=!for(i=1,#d,isprime(1+(n+d[i])^2) || return)
    forstep(n=4,9e9,10,is_A218047(n) & print1(n",")) \\ M. F. Hasler, Oct 21 2012

Extensions

Given terms a(1..31) double checked by M. F. Hasler, Oct 21 2012

A316189 Decimal expansion of Sum(1/p + 1/q) as (p, q) runs through the twin m^2 + 1 primes.

Original entry on oeis.org

3, 5, 7, 7, 4, 5, 1, 4, 7
Offset: 0

Views

Author

Michel Lagneau, Jun 26 2018

Keywords

Comments

Or decimal expansion of (1/5 + 1/17) + Sum_{i>=0} (1/p(i) + 1/q(i)) where p(i) and q(i) are primes of the form p(i) = m^2 + 1 = (10*i+4)^2 + 1 and q(i) = (m + 2)^2 + 1 = (10*i + 6)^2 + 1 (for m > 1, m == 4 (mod 10)). See A096012.
The sum is convergent; it must be less than 0.81459657... (see A172168).
Conjecture: the series of all twin m^2 + 1 prime reciprocals converges to 0.357745147...
It is probable that a(9) = 1.
A good approximation to the constant is (2*log(7/3)/log(17))^2 = 0.35774506... which agrees with the constant through the first 6 significant digits.

Examples

			0.3577451... = (1/5 + 1/17) + (1/17 + 1/37) + (1/197 + 1/257) + ...
		

References

  • Steven R. Finch, Mathematical Constants, Encyclopedia of Mathematics and its Applications, vol. 94, Cambridge University Press, pp. 94-98.
  • J. W. L. Glaisher, On the Sums of Inverse Powers of the Prime Numbers, Quart. J. Math. 25, 347-362, 1891.

Crossrefs

Programs

  • Mathematica
    s=N[1/5+1/17,20];Do[p=(10*k+4)^2+1;q=(10*k+6)^2+1;If[PrimeQ[p]&&PrimeQ[q],s=s+1/p+1/q],{k,0,10^7}];Print[N[s,20]]

Formula

Equals (1/5 + 1/17) + Sum_{n>=1} (1/(A096012(n)^2 + 1) + 1/(A096012(n) + 2)^2 + 1).

A351141 Pairs of primes (p,q) = (A002496(m), A002496(m+1)) such that q-p is a power r of the product of its prime factors for some m.

Original entry on oeis.org

37, 101, 577, 677, 15877, 16901, 57601, 62501, 33988901, 34035557, 113209601, 113507717, 121528577, 121572677, 345960001, 346332101, 635040001, 635544101, 7821633601, 7823402501, 17748634177, 17749167077, 24343488577, 24344112677, 97958984257, 97962740101
Offset: 1

Views

Author

Michel Lagneau, Feb 02 2022

Keywords

Comments

Subsequence of A002496.
The corresponding sequence of numbers q - p is a subsequence of A076292.
Conjecture: the sequence is infinite.
The corresponding powers r are given by the sequence b(n) = 6, 2, 10, 2, 6, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, ... It seems that b(n) = 2 for n > 5.

Examples

			The pair (257, 401) = (16^2+1, 20^2+1) is not in the sequence because 401 - 257 = 144 = 2^4*3^2.
The pair (577, 677) = (24^2+1, 26^2+1) is in the sequence because 577 - 677 = 100 = 2^2*5^2.
The pair (33988901, 34035557) = (5830^2+1, 5834^2+1) is in the sequence because 33988901 - 34035557 = 46656 = 2^6*3^6.
		

Crossrefs

Programs

  • Maple
    with(numtheory):
    T:=array(1..26):nn:=350000:q:=5:j:=1:
    for n from 4 by 2 to nn do:
      p:=n^2+1:
       if type(p, prime)=true
        then
         x:=p-q:r:=q:q:=p:
         u:=factorset(x):n0:=nops(u):ii:=0:d:=product(u[i],i=1..n0):
          for k from 2 to 20 while(ii=0) do:
           if d^k=x
            then ii=1:T[j]:=r:T[j+1]:=q:j:=j+2:
            else
           fi:
          od:
       fi:
    od:
    print(T):
  • PARI
    lista(nn) = my(lastp=2); forprime(p=nextprime(lastp+1), nn, if (issquare(p-1), if (ispowerful(p-lastp), my(f=factor(p-lastp)[,2]); if (vecmin(f) == vecmax(f), print1(lastp, ", ", p, ", "));); lastp = p;);); \\ Michel Marcus, Feb 03 2022
Previous Showing 11-13 of 13 results.