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.

A007811 Numbers k for which 10k+1, 10k+3, 10k+7 and 10k+9 are primes.

Original entry on oeis.org

1, 10, 19, 82, 148, 187, 208, 325, 346, 565, 943, 1300, 1564, 1573, 1606, 1804, 1891, 1942, 2101, 2227, 2530, 3172, 3484, 4378, 5134, 5533, 6298, 6721, 6949, 7222, 7726, 7969, 8104, 8272, 8881, 9784, 9913, 10111, 10984, 11653, 11929, 12220, 13546, 14416, 15727
Offset: 1

Views

Author

N. J. A. Sloane and J. H. Conway, Mar 15 1996

Keywords

Crossrefs

Programs

  • Haskell
    a007811 n = a007811_list !! (n-1)
    a007811_list = map (pred . head) $ filter (all (== 1) . map a010051') $
       iterate (zipWith (+) [10, 10, 10, 10]) [1, 3, 7, 9]
    -- Reinhard Zumkeller, Jul 18 2014
    
  • Magma
    [n: n in [0..10000] | forall{10*n+r: r in [1,3,7,9] | IsPrime(10*n+r)}]; // Bruno Berselli, Sep 04 2012
    
  • Maple
    for n from 1 to 10000 do m := 10*n: if isprime(m+1) and isprime(m+3) and isprime(m+7) and isprime(m+9) then print(n); fi: od: quit
  • Mathematica
    Select[ Range[ 1, 10000, 3 ], PrimeQ[ 10*#+1 ] && PrimeQ[ 10*#+3 ] && PrimeQ[ 10*#+7 ] && PrimeQ[ 10*#+9 ]& ]
    Select[Range[15000], And @@ PrimeQ /@ ({1, 3, 7, 9} + 10#) &] (* Ray Chandler, Jan 12 2007 *)
  • PARI
    p=2;q=3;r=5;forprime(s=7,1e5,if(s-p==8 && r-p==6 && q-p==2 && p%10==1, print1(p", ")); p=q;q=r;r=s) \\ Charles R Greathouse IV, Mar 21 2013
    
  • Perl
    use ntheory ":all"; my @s = map { ($-1)/10 } sieve_prime_cluster(10,1e9, 2,6,8); say for @s; # _Dana Jacobsen, May 04 2017

Formula

a(n) = 3*A014561(n) + 1. - Zak Seidov, Sep 21 2009

A238713 Least member of decadal prime triples: First prime beyond 10*A008470(n).

Original entry on oeis.org

11, 41, 71, 101, 131, 191, 223, 311, 431, 461, 613, 641, 821, 853, 881, 1031, 1061, 1091, 1301, 1423, 1451, 1481, 1601, 1663, 1693, 1783, 1871, 1993, 2081, 2381, 2683, 2711, 3163, 3251, 3461, 3671, 3761, 3911, 4001, 4091, 4153, 4211, 4513, 4721, 4783, 4931
Offset: 1

Views

Author

M. F. Hasler, Mar 03 2014

Keywords

Crossrefs

Programs

  • PARI
    for(d=1,999,primepi(10*(d+1))-primepi(10*d) >2|next; print1(nextprime(d*10+1)","))
    
  • PARI
    is(n)=my(t=n%10); if(t==1, isprime(n) && if(isprime(n+2), isprime(n+6) || isprime(n+8), isprime(n+6) && isprime(n+8)), t==3 && isprime(n) && !isprime(n-2) && isprime(n+4) && isprime(n+6)) \\ Charles R Greathouse IV, Mar 04 2014

Formula

a(n) = nextprime(10*A008470(n)).

A238715 Least prime of a run of 3 or more consecutive decadal prime triples.

Original entry on oeis.org

11, 821, 1031, 1423, 5413, 13691, 140831, 220873, 266023, 283571, 464741, 1596311, 1660661, 1966813, 2655403, 3303341, 5191331, 5485393, 8125511, 14241911, 14848511, 15586993, 15852043, 16539163, 19608041, 19696841, 30624071, 31809073, 35493551, 38335541, 40430771
Offset: 1

Views

Author

M. F. Hasler, Mar 03 2014

Keywords

Comments

Sequence A008470 lists "prime triple decades", i.e., numbers m>1 such that the interval (10m,10m+10) contains at least 3 primes. The decades must be of the form m=3k+1, since for m=3k, 10m+3 and 10m+9 cannot be prime and for m=3k+2, 10k+1 and 10k+7 cannot be prime. Thus, "consecutive" prime triples are meant here in the sense of consecutive k-values.
Alternatively, the present sequence lists the terms A238713(n) for which A238713(n+2) <= A238713(n)+75, or equivalently, floor(A238713(n+2)/30) <= floor(A238713(n)/30)+2, but only if A238713(n-1) < A238713(n)-15, to keep only the first of a possibly longer run, cf. example.
See A238716 for the length of the runs of "consecutive" decades A008470 in this sense.

Examples

			The first occurrence of 5 consecutive triples is: {11, 13, 17 (or 19)} ; {41, 43, 47} ; {71, 73, 79} ; {101, 103, 107 (or 109)} ; {131, 137, 139}. This corresponds to decades 1,4,7,10,13; i.e., the first 5 terms of sequence A008470. The present sequence only lists a(1)=11, but not 41 or 71 which also start a run of 3 consecutive prime triple decades, but they are not listed because already part of the run starting at a(1).
The next occurrence of 4 consecutive triples starts with decade m=541, and the next occurrence of 5 consecutive triples starts with decade m=910052463685, at p = 9100524636851 (found by J. K. Andersen).
		

Crossrefs

Programs

  • PARI
    {d=10; p=primepi(d); i=0; while( po=p, p=primepi( d+=10 ); p>2+po && i++ && (p=primepi(d+=20)) && next; i || next; i>=3 && print1(nextprime(d-10-30*i)", ");i=0;)} \\ this could be optimized ...
    
  • PARI
    isA238713(n)=my(t=n%10); if(t==1, isprime(n) && if(isprime(n+2), isprime(n+6) || isprime(n+8), isprime(n+6) && isprime(n+8)), t==3 && isprime(n) && !isprime(n-2) && isprime(n+4) && isprime(n+6))
    isA008470(n)=if(isprime(10*n+1), if(isprime(10*n+3), isprime(10*n+7) || isprime(10*n+9), isprime(10*n+7) && isprime(10*n+9)), isprime(10*n+3) && isprime(10*n+7) && isprime(10*n+9))
    is(n)=isA238713(n) && isA008470(n\10+3) && isA008470(n\10+6) && !isA008470(n\10-3) \\ Charles R Greathouse IV, Mar 04 2014

Extensions

a(20)-a(31) from Charles R Greathouse IV, Mar 04 2014

A238730 The largest prime in each decade (10k,10k+10) containing at least three primes.

Original entry on oeis.org

7, 19, 47, 79, 109, 139, 199, 229, 317, 439, 467, 619, 647, 829, 859, 887, 1039, 1069, 1097, 1307, 1429, 1459, 1489, 1609, 1669, 1699, 1789, 1879, 1999, 2089, 2389, 2689, 2719, 3169, 3259, 3469, 3677, 3769, 3919, 4007, 4099, 4159, 4219, 4519, 4729, 4789, 4937, 5237, 5419, 5449, 5479, 5507, 5659, 5749, 5869, 6709, 6829
Offset: 1

Views

Author

M. F. Hasler, Mar 03 2014

Keywords

Comments

The initial term 7 does not correspond to a "decadal prime triple" according to the strict definition of A008470.

Crossrefs

Programs

  • Maple
    f:= proc(k) local P;
       P:= select(isprime, [10*k+1,10*k+3,10*k+7,10*k+9]);
       if nops(P) >= 3 then max(P) fi
    end proc:f(0):= 7:map(f, [$0..1000]); # Robert Israel, Jun 08 2020
  • PARI
    p=0; for(d=1,999,2+p < (p=primepi(10*d)) && print1(precprime(d*10)","))

A238716 Run lengths of decadal prime triples.

Original entry on oeis.org

5, 2, 1, 2, 2, 3, 3, 1, 3, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 2, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 2, 1, 1
Offset: 1

Views

Author

M. F. Hasler, Mar 03 2014

Keywords

Comments

Length of runs of "consecutive" (step = 3) values in A008470, which lists "prime triple decades", i.e., numbers m>1 such that the interval (10m,10m+10) contains at least 3 primes. The decades must be of the form m=3k+1, since for m=3k, 10m+3 and 10m+9 cannot be prime and for m=3k+2, 10k+1 and 10k+7 cannot be prime. Thus, "consecutive" prime triples are meant here in the sense of consecutive k-values.

Examples

			The first occurrence of 5 consecutive triples is: {11, 13, 17 (or 19)} ; {41, 43, 47} ; {71, 73, 79} ; {101, 103, 107 (or 109)} ; {131, 137, 139}. This corresponds to decades 1,4,7,10,13; i.e., the first 5 terms of sequence A008470. Therefore, a(1)=5.
The next "decadal prime triples" start at A238713(6)=191 and A238713(7)=223, they form the next run of length a(2)=2, since the decades A008470(6)=19 and A008470(7)=22 differ by the minimum which is 3, but the next one is further away.
The next term A238713(8)=311 starts an "isolated" decadal prime triple, i.e., the next "run" of length a(3)=1.
The next run of length 4 starts with decade m=541, and the next occurrence of 5 consecutive triples starts with decade m=910052463685 (found by J. K. Andersen).
		

Crossrefs

Programs

  • PARI
    {d=10; p=primepi(d); i=0; while( po=p, p=primepi( d+=10 ); p>2+po && i++ && (p=primepi(d+=20)) && next; i || next; print1(i",");i>=3 && print1("/*",[nextprime(d-10-30*i),precprime(d-30)]"*/ ");i=0;)}
Showing 1-5 of 5 results.