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

A178228 Numbers k such that (k^3 - 2, k^3 + 2) is a pair of cousin primes (see A178227).

Original entry on oeis.org

129, 189, 369, 435, 549, 555, 561, 819, 1245, 1491, 1719, 1779, 1839, 1875, 1935, 2175, 2289, 2415, 2451, 2595, 2709, 2769, 3141, 3441, 4401, 4611, 4851, 5655, 5775, 6075, 6099, 6795, 6969, 7125, 7239, 7365, 8109, 8139, 8325, 8361, 8385, 8535, 8685, 9591, 9765
Offset: 1

Views

Author

Ulrich Krug (leuchtfeuer37(AT)gmx.de), May 23 2010

Keywords

Comments

Necessarily k is an odd multiple of 3, Least significant digit of k is e = 1, 5 or 9 (3^3 - 2, 7^3 + 2 are multiples of 5).

Examples

			189 is a term since 189^3 - 2 = 6751267 = prime(460792), 189^3 + 2 = 6751271 = prime(460793).
12471 is a term since 12471^3 - 2 = 1939562763109 = prime(i), i = 71166976775, 12471^3 + 2 = 1939562763113 = prime(i+1).
		

Crossrefs

Programs

  • Mathematica
    Select[Range[10^4], And @@ PrimeQ[#^3 + {-2, 2}] &] (* Amiram Eldar, Dec 24 2019 *)
  • PARI
    for(n=1,10000,my(p1=n^3-2,p2=n^3+2);if(isprime(p1)&&isprime(p2)&&ispower((p1+p2)/2,3),print1(n,", "))) \\ Hugo Pfoertner, Dec 24 2019

Extensions

Edited by N. J. A. Sloane, May 23 2010
a(1) and a(21) inserted by Amiram Eldar, Dec 24 2019

A227923 Number of ways to write n = x + y (x, y > 0) such that 6*x-1 is a Sophie Germain prime and {6*y-1, 6*y+1} is a twin prime pair.

Original entry on oeis.org

0, 1, 2, 2, 2, 3, 3, 3, 3, 3, 3, 4, 1, 4, 2, 4, 4, 2, 5, 3, 4, 4, 2, 5, 4, 4, 5, 1, 3, 3, 5, 8, 4, 7, 4, 3, 7, 2, 7, 6, 5, 8, 3, 6, 6, 4, 10, 4, 8, 5, 4, 10, 3, 9, 4, 4, 6, 1, 8, 5, 5, 8, 4, 4, 6, 3, 7, 1, 3, 5, 4, 10, 5, 7, 6, 3, 11, 3, 9, 5, 5, 6, 2, 7, 5, 5, 9, 4, 6, 4, 5, 9, 2, 6, 3, 4, 5, 2, 6, 7
Offset: 1

Views

Author

Zhi-Wei Sun, Oct 09 2013

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n > 1. Moreover, any integer n > 4 not equal to 13 can be written as x + y with x and y distinct and greater than one such that 6*x-1 is a Sophie Germain prime and {6*y-1, 6*y+1} is a twin prime pair.
(ii) Any integer n > 1 can be written as x + y (x, y > 0) such that 6*x-1 is a Sophie Germain prime, and {6*y+1, 6*y+5} is a cousin prime pair (or {6*y-1, 6*y+5} is a sexy prime pair).
Part (i) of the conjecture implies that there are infinitely many Sophie Germain primes, and also infinitely many twin prime pairs. For example, if all twin primes does not exceed an integer N > 2, and (N+1)!/6 = x + y with 6*x-1 a Sophie Germain prime and {6*y-1, 6*y+1} a twin prime pair, then (N+1)! = (6*x-1) + (6*y+1) with 1 < 6*y+1 < N+1, hence we get a contradiction since (N+1)! - k is composite for every k = 2..N.
We have verified that a(n) > 0 for all n = 2..10^8.
Conjecture verified up to 10^9. - Mauro Fiorentini, Jul 07 2023

Examples

			a(5) = 2 since 5 = 2 + 3 = 4 + 1, and 6*2-1 = 11 and 6*4-1 = 23 are Sophie Germain primes, and {6*3-1, 6*3+1} = {17, 19} and {6*1-1, 6*1+1} = {5,7} are twin prime pairs.
a(28) = 1 since 28 = 5 + 23 with 6*5-1 = 29 a Sophie Germain prime and {6*23-1, 6*23+1} = {137, 139} a twin prime pair.
		

Crossrefs

Programs

  • Mathematica
    SQ[n_]:=PrimeQ[6n-1]&&PrimeQ[12n-1]
    TQ[n_]:=PrimeQ[6n-1]&&PrimeQ[6n+1]
    a[n_]:=Sum[If[SQ[i]&&TQ[n-i],1,0],{i,1,n-1}]
    Table[a[n],{n,1,100}]

A178227 Lesser of a pair (p,p+4) of cousin primes whose arithmetic mean p+2 is a cube.

Original entry on oeis.org

2146687, 6751267, 50243407, 82312873, 165469147, 170953873, 176558479, 549353257, 1929781123, 3314613769, 5079577957, 5630252137, 6219352717, 6591796873, 7245075373, 10289109373, 11993263567, 14084823373, 14724139849, 17474794873, 19880486827, 21230922607, 30988732219
Offset: 1

Views

Author

Ulrich Krug (leuchtfeuer37(AT)gmx.de), May 23 2010

Keywords

Comments

p = n^3 - 2, p and p+4 are "near(est) cube" primes as n^3 -/+ 1 = (n -/+ 1) * (n^2 +/- n + 1).

Examples

			p = 2146687 is a term, as p + 2 = 129^3 and both p = 129^3 - 2 and p + 4 = 129^3 + 2 are prime.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[2300]^3 - 2, And @@ PrimeQ[# + {0, 4}] &] (* Amiram Eldar, Dec 24 2019 *)
  • PARI
    isok(p) = isprime(p) && (q=nextprime(p+1)) && (q-p==4) && ispower(p+2, 3); \\ Michel Marcus, Nov 27 2016

Formula

a(n) = A178228(n)^3 - 2. - Amiram Eldar, Dec 24 2019

Extensions

Corrected by D. S. McNeil, Nov 24 2010
More terms from Amiram Eldar, Dec 24 2019

A176185 Numbers n with property that concatenation (2*n+1)//n of the decimals is a square.

Original entry on oeis.org

29, 76, 2289, 3796, 6369, 8756, 16736, 19696, 24900, 28484, 77529, 83761, 94169, 222889, 887556, 22228889, 88875556, 112594641, 368762025, 651177616
Offset: 1

Views

Author

Ulrich Krug (leuchtfeuer37(AT)gmx.de), Apr 11 2010

Keywords

Comments

Sequence is infinite; two infinite "families" of such numbers n are:
(a) n = 8_(k)75_(k)6, 2 * n + 1 = 17_(k)51_(k)3, N = 2 * 6_(k+1)16_(k-1)7,
(b) n = 2_(k+1)8_(k)9, 2 * n + 1 = 4_(k)57_(k)9, N = 6_(k)76_(k)7, (k = 1, 2, ...)
List of (2*n+1)//n = N^2:
59//29 = 7^2 x 11^2, 153//76 = 2^4 x 31^2, 4579//2289 = 67^2 x 101^2,
7593//3796 = 2^2 x 4357^2, 12739//6369 = 11287^2, 17513//8756 = 2^2 x 13^2 x 509^2,
33473//16736 = 2^18 x 113^2, 39393//19696 = 2^4 x 13^2 x 17^2 x 71^2, 49801//24900,
56969//28484 = 2^2 x 13^2 x 2903^2, 155059//77529 = 7^2 x 17789^2, 167523//83761 = 347^2 x 373^2,
188339//94169 = 19^2 x 31^2 x 233^2, 445779//222889 = 7^2 x 11^2 x 13^2 x 23^2 x 29^2,
1775113//887556 = 2^2 x 666167^2, 44457779//22228889 = 59^2 x 73^2 x 113^2 x 137^2,
177751113//88875556 = 2^2 x 66661667 ^ 2, 225189283//112594641 = 23^2 x 83^2 x 331^2 x 751^2,
737524051//368762025 = 5^2 x 2161^2 x 79481^2, 1302355233//651177616 = 2^4 x 285301949^2

Examples

			n = 29 is a term: 2 * n + 1 = 59, 5929 = 59//29 = 77^2 is a perfect square.
n = 6369 is a term: 2 * n + 1 = 12739. 12739//6369 = 11287^2 is a perfect square.
		

References

  • J. Buchmann, U. Vollmer: Binary Quadratic Forms, Springer, Berlin, 2007
  • L. E. Dickson: History of the Theory of numbers, vol. 2: Diophantine Analysis, Dover Publications, 2005

Crossrefs

Programs

  • Maple
    isA176185 := proc(n)
        digcat2(2*n+1,n) ; # of oeis.org/transforms.txt
        issqr(%)  ;
    end proc:
    for n from 1 do
        if isA176185(n) then
            print(n) ;
        end if;
    end do: # R. J. Mathar, May 21 2025
  • Mathematica
    Select[Range[6512*10^5],IntegerQ[Sqrt[(2 #+1)10^IntegerLength[#]+#]]&] (* Harvey P. Dale, Mar 05 2022 *)

A339084 Smaller term p1 of the first of two consecutive cousin prime pairs (p1,p1+4) and (p2,p2+4) such that the distance (p2-p1) is a square.

Original entry on oeis.org

3, 127, 313, 1447, 2203, 2437, 2797, 3217, 4933, 5653, 6007, 7207, 7537, 7603, 7753, 8233, 10627, 11827, 12373, 20353, 22027, 22153, 23017, 23563, 25303, 27697, 27763, 29023, 29059, 29383, 31477, 32323, 32533, 32569, 32839, 33199, 33577, 35533, 36523, 37273, 41077
Offset: 1

Views

Author

Claude H. R. Dequatre, Nov 23 2020

Keywords

Comments

Considering the 10^6 cousin prime pairs from (3,7) to (252115609,252115613), we note the following:
43617 sequence terms (4.4%) are linked to a distance between two consecutive cousin prime pairs which is a square.
List of the 9 classes of distances which are squares: 4,36,144,324,576,900,1296,1764,2304.
The distance 36 occurs with the highest frequency.
Distances linked to the first 50 terms of the sequence: 4,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,324,144,36,36,36,144,144,144,36,36,36,36,36,36,36,36,144,36,144,36,36,36
From the class 36, the frequency of the distances decreases when their size increases; the distance 4 linked to the first term of the sequence occurs only once.
See for comparison the sequence A338812.

Examples

			a(3)=313 is in the sequence because the two consecutive cousin prime pairs being (313,317) and (349,353), the distance between them is 349-313=36 which is a square (6^2).
613 is not in the sequence because the two consecutive cousin prime pairs being (613,617) and (643,647), the distance between them is (643-613)=30 which is not a square.
		

Crossrefs

Programs

  • PARI
    lista(nn) = {my(last=3, p=7); forprime(q=11, nn, if(q-p==4, if (issquare(p-last), print1(last, ", ")); last = p;); p = q;);} \\ Michel Marcus, Nov 23 2020
  • R
    Mat<-matrix(0,14000000,5)
    primes<-generate_n_primes(14000000)
    Mat[,1]<-c(primes)
    a_n<-c()
    Squares<-c()
    Squares_sq<-c()
    j=1
    counter=0
    while(j<=13999999){
      if(is_prime((Mat[j,1])+4) & is_prime((Mat[j+1,1]))+4){
        counter=counter+1
        Mat[counter,2]<-(Mat[j,1])
        Mat[counter,3]<-Mat[j,1]+4
        Mat[counter+1,2]<-(Mat[j+1,1])
        Mat[counter+1,3]<-Mat[j+1,1]+4
      }
      j=j+1
    }
    k=1
    while(k<=1000000){
      dist<- Mat[k+1,2]-Mat[k,2]
      Mat[k,4]<-dist
      if(sqrt(dist)%%1==0){
        Mat[k,5]<-dist
        a_n<-append(a_n,Mat[k,2])
      }
      k=k+1
    }
    View(Mat)
    View(a_n)
    
Showing 1-5 of 5 results.