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-10 of 38 results. Next

A086137 Number of primes between p and p+8 if p is prime, i.e., number of primes between 8+A023202(n) and A023202(n).

Original entry on oeis.org

2, 2, 2, 1, 1, 1, 1, 1, 0, 2, 1, 1, 1, 2, 1, 1, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 2, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 1, 2, 0, 0, 0, 1, 1, 1, 0, 0, 2, 0, 0, 2, 1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 2, 1, 1, 0, 2, 0, 1, 1, 0, 0, 0, 1, 0, 1
Offset: 1

Views

Author

Labos Elemer, Jul 29 2003

Keywords

Examples

			a(n)=0,1,2 correspond to {p,p+8} prime-pairs either consecutive or pairs with various d-patterns as follows:
a(n)=0 to 89[8]97; a(n)=1 for 29[2,6]37, 53[6,2];
a(n)=2 for 101[2,4,2]109 and once to 3[2,2,4]11.
		

Crossrefs

Programs

  • Mathematica
    cp[x_,y_] := Count[Table[PrimeQ[i],{i,x,y}],True] Do[s=Prime[n]; s1=Prime[n+1]; If[PrimeQ[s+d],k=k+1; Print[cp[s+1,s+d-1]]],{n,1,1000}]; k

A031926 Lower prime of a difference of 8 between consecutive primes.

Original entry on oeis.org

89, 359, 389, 401, 449, 479, 491, 683, 701, 719, 743, 761, 911, 929, 983, 1109, 1163, 1193, 1373, 1439, 1523, 1559, 1571, 1733, 1823, 1979, 2003, 2153, 2213, 2243, 2273, 2459, 2531, 2609, 2663, 2699, 2741, 2843, 2879, 2909, 3011, 3041
Offset: 1

Views

Author

Keywords

Comments

Conjecture: The sequence is infinite and for every n, a(n+1) < a(n)^(1+1/n). Namely a(n)^(1/n) is a strictly decreasing function of n (see comment lines of the sequence A248855). - Jahangeer Kholdi and Farideh Firoozbakht, Nov 29 2014

Crossrefs

Cf. A023202.

Programs

  • Magma
    [p: p in PrimesUpTo(4000) | NextPrime(p)-p eq 8]; // Bruno Berselli, Apr 09 2013
    
  • Maple
    for i from 1 to 446 do if ithprime(i+1) = ithprime(i) + 8 then print({ithprime(i)}); fi; od; # Zerinvary Lajos, Mar 19 2007
    p:=ithprime; nx:=nextprime; f:=proc(d) global p,nx; local i,t0,n; t0:=[]; for n from 1 to 100000 do i:=p(n); if nx(i)-i=d then t0:=[op(t0),i]; fi; od: t0; end; f(8); # N. J. A. Sloane, Jan 17 2012
  • Mathematica
    Transpose[Select[Partition[Prime[Range[500]], 2, 1], Last[#] - First[#] == 8 &]][[1]] (* Bruno Berselli, Apr 09 2013 *)
  • PARI
    is_A031926(p)={precprime(p-1)==p-8 && isprime(p)} \\ M. F. Hasler, Apr 20 2013
    
  • PARI
    q=0;forprime(p=1,5000,q+8==(q=p)&&print1(p-8",")) \\ M. F. Hasler, Apr 20 2013

A049488 Primes p such that p+16 is prime.

Original entry on oeis.org

3, 7, 13, 31, 37, 43, 67, 73, 97, 151, 157, 163, 181, 211, 223, 241, 277, 331, 337, 367, 373, 433, 463, 487, 541, 547, 571, 577, 601, 631, 643, 661, 727, 757, 811, 823, 937, 967, 997, 1033, 1087, 1093, 1171, 1201, 1213, 1291, 1303, 1423, 1471, 1483, 1543
Offset: 1

Views

Author

Keywords

Comments

Using the Elliott-Halberstam conjecture, Goldston et al. prove that there are an infinite number of primes here. - T. D. Noe, Nov 26 2013

Examples

			7 and 7+16=23 are prime.
		

References

  • P. D. T. A. Elliott and H. Halberstam, A conjecture in prime number theory, Symposia Mathematica, Vol. IV (INDAM, Rome, 1968/69), pages 59-72, Academic Press, London, 1970.

Crossrefs

Programs

A049437 Primes p such that p+2 and p+8 are also primes but p+6 is not.

Original entry on oeis.org

3, 29, 59, 71, 149, 269, 431, 569, 599, 1031, 1061, 1229, 1289, 1319, 1451, 1619, 2129, 2339, 2381, 2549, 2711, 2789, 3299, 3539, 4019, 4049, 4091, 4649, 4721, 5099, 5441, 5519, 5639, 5741, 5849, 6269, 6359, 6569, 6701, 6959, 7211
Offset: 1

Views

Author

Keywords

Comments

p+4 is not prime here except for p=3.

Examples

			p=29 is the smallest prime so that p, p+2 and p+8 are consecutive primes.
		

Crossrefs

Subsequence of A001359. - R. J. Mathar, Feb 10 2013

Programs

  • Magma
    [p: p in PrimesUpTo(8000)| IsPrime(p+2) and IsPrime(p+8) and not IsPrime(p+6) ] // Vincenzo Librandi, Jan 28 2011
    
  • Maple
    select(p -> isprime(p) and isprime(p+2) and isprime(p+8) and not isprime(p+6), [3, seq(i,i=5..10000, 6)]); # Robert Israel, Nov 20 2017
  • Mathematica
    {3}~Join~Select[Partition[Prime@ Range[10^3], 3, 1], Differences@ # == {2, 6} &][[All, 1]] (* Michael De Vlieger, Nov 20 2017 *)
  • PARI
    lista(nn) = forprime(p=3, nn, if(isprime(p+2) && isprime(p+8) && !isprime(p+6), print1(p, ", "))) \\ Iain Fox, Nov 20 2017

A054905 Smallest composite x such that sigma(x) + 2n = sigma(x + 2n).

Original entry on oeis.org

434, 305635357, 104, 27, 195556, 65, 12, 39, 20, 56, 916, 80, 212282, 57, 44, 106645, 52, 125
Offset: 1

Views

Author

Labos Elemer May 23 2000

Keywords

Comments

a(19) > 4293000000, if it exists. - Jud McCranie, May 25 2000
a(19) > 10^11, if it exists. - Charles R Greathouse IV, Oct 26 2022

Examples

			a(5) corresponds to n=3+2=5, d=2n=10 and the smallest composite integer is 195556. The next solution is 1152136225.
		

Crossrefs

Programs

  • PARI
    a(n)=forcomposite(x=3,10^66,if(sigma(x)+2*n==sigma(x+2*n),return(x)));
    for(n=1,66,print1(a(n),", ")); \\ Joerg Arndt, Nov 15 2014
    
  • PARI
    a19(lim,startAt=39)=startAt=ceil(startAt); my(v=vectorsmall(38),i=(startAt-1)%38); forfactored(n=startAt,lim\1+38, my(t=sigma(n)); if(i++>38,i=1); if(t==v[i]+38, return(n[1]-38)); v[i]=if(vecsum(n[2][,2])>1,t,0)) \\ Charles R Greathouse IV, Oct 25 2022

Extensions

Description corrected by Jud McCranie, May 25 2000

A049489 Primes p such that p + 32 is also prime.

Original entry on oeis.org

5, 11, 29, 41, 47, 71, 107, 131, 149, 167, 179, 191, 197, 239, 251, 281, 317, 347, 389, 401, 431, 467, 491, 509, 569, 587, 599, 641, 659, 677, 701, 719, 797, 821, 827, 887, 977, 1019, 1031, 1061, 1091, 1097, 1181, 1217, 1259, 1289, 1367, 1427, 1439, 1451
Offset: 1

Views

Author

Keywords

Examples

			29 and 29 + 32 = 61 are both prime.
		

Crossrefs

Programs

  • Magma
    [p: p in PrimesUpTo(2000) | IsPrime(p+32)]; // Vincenzo Librandi, Apr 22 2015
  • Maple
    Primes:= select(isprime,{seq(i,i=3..10000,2)}):
    sort(convert(Primes intersect map(`-`,Primes,32),list)); # Robert Israel, Dec 20 2015
  • Mathematica
    Select[Range[2000], PrimeQ[#] && PrimeQ[# + 32] &] (* Vincenzo Librandi, Apr 22 2015 *)
    Select[Prime[Range[300]],PrimeQ[#+32]&] (* Harvey P. Dale, Oct 14 2017 *)
  • PARI
    isok(n) = isprime(n) && isprime(n+32); \\ Michel Marcus, Dec 31 2013
    

Extensions

Name improved by Bruno Berselli, Apr 22 2015

A049490 a(n) and a(n)+64 both prime.

Original entry on oeis.org

3, 7, 19, 37, 43, 67, 73, 103, 109, 127, 163, 193, 199, 229, 283, 337, 367, 379, 397, 439, 457, 499, 523, 577, 613, 619, 709, 733, 757, 823, 877, 883, 907, 919, 967, 997, 1033, 1039, 1087, 1117, 1123, 1129, 1153, 1213, 1237, 1297, 1303, 1423, 1429, 1447
Offset: 1

Views

Author

Keywords

Examples

			19 and 19+64=83 both prime.
		

Crossrefs

Programs

  • Mathematica
    Select[Prime[Range[300]],PrimeQ[#+64]&] (* Harvey P. Dale, Mar 21 2011 *)
  • PARI
    select(p -> isprime(p+64),primes(1000)) \\ Edward Jiang, Sep 05 2014

A156104 Primes p such that p+36 is also prime.

Original entry on oeis.org

5, 7, 11, 17, 23, 31, 37, 43, 47, 53, 61, 67, 71, 73, 101, 103, 113, 127, 131, 137, 157, 163, 191, 193, 197, 227, 233, 241, 257, 271, 277, 281, 311, 313, 317, 331, 337, 347, 353, 373, 383, 397, 421, 431, 443, 463, 467, 487, 521, 541, 557, 563, 571, 577, 607
Offset: 1

Views

Author

Vincenzo Librandi, Feb 08 2009

Keywords

Crossrefs

Cf. A156112.
Cf. sequences of the type p+n are primes: A001359 (n=2), A023200 (n=4), A023201 (n=6), A023202 (n=8), A023203 (n=10), A046133 (n=12), A153417 (n=14), A049488 (n=16), A153418 (n=18), A153419 (n=20), A242476 (n=22), A033560 (n=24), A252089 (n=26), A252090 (n=28), A049481 (n=30), A049489 (n=32), A252091 (n=34), this sequence (n=36); A062284 (n=50), A049490 (n=64), A156105 (n=72), A156107 (n=144).

Programs

  • Magma
    [p: p in PrimesUpTo(1000) | IsPrime(p + 36)]; // Vincenzo Librandi, Oct 31 2012
  • Mathematica
    Select[Prime[Range[1000]], PrimeQ[(#+ 36)]&] (* Vincenzo Librandi, Oct 31 2012 *)

A049438 p, p+6 and p+8 are all primes (A046138) but p+2 is not.

Original entry on oeis.org

23, 53, 131, 173, 233, 263, 563, 593, 653, 1013, 1223, 1283, 1601, 1613, 2333, 2543, 2963, 3323, 3533, 3761, 3911, 3923, 4013, 4211, 4253, 4643, 4793, 5003, 5273, 5471, 5843, 5861, 6263, 6353, 6563, 6653, 6863, 7121, 7451, 7481, 7541, 7583
Offset: 1

Views

Author

Keywords

Crossrefs

Subsequence of A031924. - R. J. Mathar, Jun 15 2013

Programs

  • Mathematica
    Select[Prime@ Range[10^3], MatchQ[Boole@ PrimeQ@ {# + 2, # + 6, # + 8}, {0, 1, 1}] &] (* Michael De Vlieger, Feb 05 2017 *)
  • PARI
    isok(p) = isprime(p) && !isprime(p+2) && isprime(p+6) && isprime(p+8); \\ Michel Marcus, Dec 13 2013

A015915 Numbers k such that sigma(k) + 8 = sigma(k+8).

Original entry on oeis.org

3, 5, 11, 23, 27, 29, 53, 59, 71, 89, 101, 131, 149, 173, 191, 233, 263, 269, 359, 389, 401, 431, 449, 479, 491, 563, 569, 593, 599, 653, 683, 701, 719, 743, 761, 821, 911, 929, 983, 1013, 1031, 1061, 1109, 1163, 1193, 1223, 1229, 1283, 1289
Offset: 1

Views

Author

Keywords

Comments

Different from A023202. Below 1000000 four composites were found [27, 1615, 1885, 218984] satisfying the "sigma(k) + 8 = sigma(k+8)" relation, together with more than 8000 primes. - Labos Elemer, May 23 2000

Examples

			sigma(27) + 8 = 48 = sigma(27+8), so 27 is in the sequence.
		

Crossrefs

Composite solutions are in A059118.

Programs

Showing 1-10 of 38 results. Next