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.

A066388 Numbers j such that j and 2j are both between a pair of twin primes.

Original entry on oeis.org

6, 30, 660, 810, 2130, 2550, 3330, 3390, 5850, 6270, 10530, 33180, 41610, 44130, 53550, 55440, 57330, 63840, 65100, 70380, 70980, 72270, 74100, 74760, 78780, 80670, 81930, 87540, 93240, 102300, 115470, 124770, 133980, 136950, 156420
Offset: 1

Views

Author

Jud McCranie, Dec 23 2001

Keywords

Comments

Also terms of A014574 such that twice the term is also in A014574. Related to a problem of anti-divisors.
All a(n) > 6 must be a multiple of 30: As for elements of A014574, we must have a(n) = 6k, and k = 5m+-1 would lead to a(n)-+1 divisible by 5, while k = 5m+-2 would lead to 2*a(n)+-1 divisible by 5, so only k=5m is possible. - M. F. Hasler, Nov 27 2010

Examples

			j = 30 is a term since 29 and 31 are prime, as are 59 and 61.
		

Crossrefs

Subsequence of A014574.
Subsequences: A118859, A118860, A349321.

Programs

  • Mathematica
    lst={}; Do[p1=Prime[n]; p2=Prime[n+1]; d=2; If[p2-p1==d, w=p1+1; If[PrimeQ[2*w-1]&&PrimeQ[2*w+1], AppendTo[lst, w]]], {n, 1, 10^4}]; lst (* Vladimir Joseph Stephan Orlovsky, Aug 07 2008 *)
  • PARI
    { n=0; forstep (m=2, 10^9, 2, if (isprime(m - 1) && isprime(m + 1) && isprime(2*m - 1) && isprime(2*m + 1), write("b066388.txt", n++, " ", m); if (n==1000, return)) ) } \\ Harry J. Smith, Feb 13 2010

Formula

A117499(a(n)) = 4. - Reinhard Zumkeller, Mar 23 2006
{k in A014574: 2*k in A014574}. - R. J. Mathar, Jan 20 2025

A118860 Numbers k such that k-1, k+1, 2k-1, 2k+1, 3k-1, 3k+1, 4k-1 and 4k+1 are all primes.

Original entry on oeis.org

21968100, 37674210, 81875220, 356467230, 416172330, 750662640, 1007393730, 1150070040, 1586271960, 1963954650, 3127171320, 3669568560, 4377895410, 4383541050, 5575083360, 5686935870, 5708418870, 7365234450, 7478474430, 7681046100, 8453862690, 8898688680
Offset: 1

Views

Author

Labos Elemer, May 03 2006

Keywords

Comments

All terms are multiples of 210, hence simpler code is possible.

Examples

			21968100 is a term because 21968099, 21968101, 43936199, 43936201, 65904299, 65904301, 87872399, 87872401 are all prime.
		

Crossrefs

Subsequence of A014574, A066388 and A118859.
Subsequence: A349321.

Programs

  • Mathematica
    tb={};Do[If[(PrimeQ[n-1]&&PrimeQ[n+1])&& (PrimeQ[2*n-1]&&PrimeQ[2*n+1])&& (PrimeQ[3*n-1]&&PrimeQ[3*n+1])&& (PrimeQ[4*n-1]&&PrimeQ[4*n+1]), Print[n];AppendTo[tb,n]], {n,21968100,10^8,210}];tb
    Select[210*Range[424*10^5],AllTrue[{#-1,#+1,2#-1,2#+1,3#-1,3#+1,4#-1,4#+1},PrimeQ]&] (* Harvey P. Dale, Jul 23 2024 *)
  • PARI
    isok(k) = if(k % 210, 0, for(i = 1, 4, forstep(j = -1, 1, 2, if(!isprime(i*k-j), return(0)))); 1); \\ Amiram Eldar, Mar 13 2025

Formula

a(n) = 210*A174293(n).

Extensions

Edited by Don Reble, May 16 2006
a(20)-a(22) from Pontus von Brömssen, Oct 14 2021

A118859 Numbers k such that k-1, k+1, 2*k-1, 2*k+1, 3*k-1 and 3*k+1 are primes.

Original entry on oeis.org

6, 53550, 420420, 422310, 1624350, 2130240, 3399900, 5199810, 5246010, 6549270, 7384440, 7775880, 9516570, 9565710, 10430280, 11845260, 13207950, 14562870, 14619990, 18747960, 20099940, 21596820, 21968100, 24358950, 24610740, 26916120, 28359240, 30838080
Offset: 1

Views

Author

Labos Elemer, May 03 2006

Keywords

Examples

			6 is a term because 5, 7, 11, 13, 17, 19 are all prime.
		

Crossrefs

Subsequence of A014574 and A066388.
Subsequences: A118860, A349321.

Programs

  • Mathematica
    Select[Range[25*10^6],AllTrue[Flatten[{#+{1,-1},2#+{1,-1},3#+{1,-1}}], PrimeQ]&] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Sep 13 2016 *)
  • PARI
    isok(k) = isprime(k-1) && isprime(k+1) && isprime(2*k-1) && isprime(2*k+1) && isprime(3*k-1) && isprime(3*k+1); \\ Amiram Eldar, Mar 13 2025

Formula

a(n) = 6*A290811(n).

Extensions

Edited by Don Reble, May 16 2006
a(26)-a(28) from Jon E. Schoenfield, Dec 07 2021

A348348 Smallest k such that the numbers j*k - 1 and j*k + 1 are prime for 1 <= j <= n.

Original entry on oeis.org

4, 6, 6, 21968100, 100803789240, 683751016938990, 1651735848676253340
Offset: 1

Views

Author

Pontus von Brömssen, Oct 13 2021

Keywords

Comments

The following heuristic argument suggests that a(n) exists for all n: For large (random) k and a specific j <= n, the probability that both j*k - 1 and j*k + 1 are prime should be of the order 1/(log k)^2 (a slight twist of the first Hardy-Littlewood conjecture). Assuming independence between different j, the probability that this holds for 1 <= j <= n is of the order 1/(log k)^(2*n). Since the sum over k of 1/(log k)^(2*n) diverges, this should hold for infinitely many k by the second Borel-Cantelli lemma (assuming independence between different k).

Examples

			a(1) = A014574(1) = 4.
a(2) = A066388(1) = 6.
a(3) = A118859(1) = 6.
a(4) = A118860(1) = 21968100.
a(5) = A349321(1) = 100803789240.
		

Crossrefs

Programs

  • PARI
    isok(k, n) = for (j=1, n, if (!isprime(j*k-1) || !isprime(j*k+1), return(0))); return(1);
    a(n) = my(k=1); while (!isok(k, n), k++); k; \\ Michel Marcus, Jul 01 2022
  • Python
    from sympy import isprime,nextprime
    def A348348(n):
        p = 2
        while 1:
            p_next = nextprime(p)
            if p_next == p+2 and all(isprime(j*(p+1)-1) and isprime(j*(p+1)+1) for j in range(2,n+1)):
                return p+1
            p = p_next
    

Extensions

a(5), a(6) from Jon E. Schoenfield, Nov 14 2021
a(7) from Klaus Muuss, Jul 01 2022
Showing 1-4 of 4 results.