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 21-30 of 71 results. Next

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}]

A092216 Primes of the form p + 12 where p is a prime.

Original entry on oeis.org

17, 19, 23, 29, 31, 41, 43, 53, 59, 71, 73, 79, 83, 101, 109, 113, 139, 149, 151, 163, 179, 191, 193, 211, 223, 239, 241, 251, 263, 269, 281, 283, 293, 349, 359, 379, 401, 409, 421, 431, 433, 443, 461, 479, 491, 499, 503, 521, 569, 599, 613, 619, 631, 643, 653
Offset: 1

Views

Author

Douglas Winston (douglas.winston(AT)srupc.com), Apr 02 2004

Keywords

Crossrefs

Programs

Formula

a(n) = 12 + A046133(n). - R. J. Mathar, Jun 21 2010

A143203 Numbers having exactly two distinct prime factors p, q with q = p+4.

Original entry on oeis.org

21, 63, 77, 147, 189, 221, 437, 441, 539, 567, 847, 1029, 1323, 1517, 1701, 2021, 2873, 3087, 3757, 3773, 3969, 4757, 5103, 5929, 6557, 7203, 8303, 9261, 9317, 9797, 10051, 11021, 11907, 12317, 15309, 16637, 21609
Offset: 1

Views

Author

Reinhard Zumkeller, Aug 12 2008

Keywords

Comments

Subsequence of A007774.
A033850 is a subsequence.
Subsequence of A195106. - Reinhard Zumkeller, Sep 13 2011

Examples

			a(1) = 21 = 3 * 7 = A023200(1) * A046132(1).
a(2) = 63 = 3^2 * 7 = A023200(1)^2 * A046132(1).
a(3) = 77 = 7 * 11 = A023200(2) * A046132(2).
a(4) = 147 = 3 * 7^2 = A023200(1) * A046132(1)^2.
a(5) = 189 = 3*3 * 7 = A023200(1)^3 * A046132(1).
a(6) = 221 = 13 * 17 = A023200(3) * A046132(3).
a(7) = 437 = 19 * 23 = A023200(4) * A046132(4).
a(8) = 441 = 3^2 * 7^2 = A023200(1)^2 * A046132(1)^2.
a(9) = 539 = 7^2 * 11 = A023200(2)^2 * A046132(2).
a(10) = 567 = 3^4 * 7 = A023200(1)^4 * A046132(1).
		

Crossrefs

Programs

  • Haskell
    a143203 n = a143203_list !! (n-1)
    a143203_list = filter f [1,3..] where
       f x = length pfs == 2 && last pfs - head pfs == 4 where
           pfs = a027748_row x
    -- Reinhard Zumkeller, Sep 13 2011
  • Mathematica
    dpf2Q[n_]:=Module[{fi=FactorInteger[n][[;;,1]]},Length[fi]==2&&fi[[2]]-fi[[1]]==4]; Select[Range[22000],dpf2Q] (* Harvey P. Dale, Mar 18 2023 *)

Formula

A143201(a(n)) = 5.
A020639(a(n)) in A023200 and A006530(a(n)) in A046132.
A001221(a(n)) = 2.
Sum_{n>=1} 1/a(n) = Sum_{n>=1} 1/((A023200(n)+1)^2-4) = 0.109882433872... . - Amiram Eldar, Oct 26 2024

A067830 Primes p such that sigma(p-4) < p.

Original entry on oeis.org

5, 7, 11, 17, 23, 41, 47, 71, 83, 101, 107, 113, 131, 167, 197, 227, 233, 281, 311, 317, 353, 383, 401, 443, 461, 467, 491, 503, 617, 647, 677, 743, 761, 773, 827, 857, 863, 881, 887, 911, 941, 971, 1013, 1091, 1097, 1217, 1283, 1301, 1307, 1427, 1433, 1451
Offset: 1

Views

Author

Benoit Cloitre, Feb 08 2002

Keywords

Comments

Except for the first term, terms are primes of the form p+4 with p prime, i.e., the sequence is essentially A031505, A046132. In other words, the solutions to sigma(x) < x + 4 are 1,2,4 and the odd primes. - Ralf Stephan, Feb 09 2004

Crossrefs

Programs

  • Mathematica
    Select[Prime[Range[3, 230]], DivisorSigma[1, #-4] < # &] (* Amiram Eldar, Apr 25 2025 *)
  • PARI
    isok(p) = isprime(p) && (p>4) && (sigma(p-4) < p); \\ Michel Marcus, Feb 15 2021

Extensions

Edited by Charles R Greathouse IV, Mar 19 2010

A098429 Number of cousin prime pairs (p, p+4) with p <= n.

Original entry on oeis.org

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

Views

Author

Reinhard Zumkeller, Sep 07 2004

Keywords

Comments

Convention: a prime pair is <= n iff its smallest member is <= n.
Except for (3, 7), there is only 1 pair congruence class for cousin primes, i.e. (+1, -1) (mod 6). [Daniel Forgues, Aug 05 2009]

Examples

			First cousin prime pairs: (3,7),(7,11),(13,17),(19,23), ...
therefore the sequence starts: 0 0 1 1 1 1 2 2 2 2 2 2 3 ...
		

Crossrefs

Programs

  • Mathematica
    Accumulate[Table[If[PrimeQ[i]&&PrimeQ[i+4],1,0],{i,1,100}]] (* Seiichi Kirikami, May 28 2017 *)

Extensions

Edited by Daniel Forgues, Aug 01 2009

A237348 Number of ordered ways to write n = k + m with k > 0 and m > 0 such that prime(k) + 4 and prime(prime(m)) + 4 are both prime.

Original entry on oeis.org

0, 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 2, 2, 2, 2, 2, 1, 1, 2, 2, 1, 2, 3, 1, 2, 1, 1, 1, 2, 3, 1, 2, 2, 1, 2, 3, 3, 3, 5, 4, 2, 4, 1, 5, 1, 5, 1, 4, 4, 3, 3, 3, 1, 5, 4, 4, 3, 5, 3, 5, 6, 3, 3, 4, 3, 4, 5, 1, 5, 3, 3, 3, 5, 4, 2, 8, 1, 2, 5, 6
Offset: 1

Views

Author

Zhi-Wei Sun, Feb 06 2014

Keywords

Comments

Conjecture: For each d = 1, 2, 3, ... there is a positive integer N(d) for which any integer n > N(d) can be written as k + m with k > 0 and m > 0 such that prime(k) + 2*d and prime(prime(m)) + 2*d are both prime. In particular, we may take (N(1), N(2), ..., N(10)) = (2, 11, 4, 15, 31, 4, 2, 77, 4, 7).
This extension of the "Super Twin Prime Conjecture" (posed by the author) implies de Polignac's well-known conjecture that any positive even number can be a difference of two primes infinitely often.

Examples

			a(7) = 1 since 7 = 6 + 1 with prime(6) + 4 = 13 + 4 = 17 and prime(prime(1)) + 4 = prime(2) + 4 = 7 both prime.
a(114) = 1 since 114 = 78 + 36 with prime(78) + 4 = 397 + 4 = 401 and prime(prime(36)) + 4 = prime(151) + 4 = 877 + 4 = 881 both prime.
		

Crossrefs

Programs

  • Mathematica
    pq[n_]:=pq[n]=PrimeQ[Prime[n]+4]
    PQ[n_]:=PrimeQ[Prime[Prime[n]]+4]
    a[n_]:=Sum[If[pq[k]&&PQ[n-k],1,0],{k,1,n-1}]
    Table[a[n],{n,1,80}]

A288021 Prime p1 of consecutive primes p1, p2, where p2 - p1 = 4, and p1, p2 are in different decades.

Original entry on oeis.org

7, 19, 37, 67, 79, 97, 109, 127, 229, 277, 307, 349, 379, 397, 439, 457, 487, 499, 739, 757, 769, 859, 877, 907, 937, 967, 1009, 1087, 1279, 1297, 1429, 1447, 1489, 1549, 1567, 1579, 1597, 1609, 1867, 1999, 2137, 2239, 2269, 2347, 2377, 2389, 2437, 2539, 2617, 2659, 2689, 2707, 2749, 2797, 2857
Offset: 1

Views

Author

Hartmut F. W. Hoft, Jun 04 2017

Keywords

Comments

The unit digits of the numbers in the sequence are 7's or 9's.

Examples

			7 is in this sequence since pair (7,11) is the first with difference 4 spanning a multiple of 10.
		

Crossrefs

Programs

  • Mathematica
    a288021[n_] := Map[Last, Select[Map[{NextPrime[#, 1], NextPrime[#, -1]}&, Range[10, n, 10]], First[#]-Last[#]==4&]]
    a288021[3000] (* data *)

A288022 Prime p1 of consecutive primes p1, p2, where p2 - p1 = 6, and p1, p2 are in different decades.

Original entry on oeis.org

47, 157, 167, 257, 367, 557, 587, 607, 647, 677, 727, 947, 977, 1097, 1117, 1187, 1217, 1367, 1657, 1747, 1777, 1907, 1987, 2207, 2287, 2417, 2467, 2677, 2837, 2897, 2957, 3307, 3407, 3607, 3617, 3637, 3727, 3797, 4007, 4357, 4457, 4507, 4597, 4657, 4937, 4987
Offset: 1

Views

Author

Hartmut F. W. Hoft, Jun 04 2017

Keywords

Comments

The unit digits of the numbers in the sequence are 7's.
Number of terms < 10^k: 0, 0, 1, 13, 81, 565, 4027, 30422, 237715, ... - Muniru A Asiru, Jan 09 2018

Examples

			47 is in the sequence since pair (47,53) is the first with difference 6 spanning a multiple of 10.
		

Crossrefs

Programs

  • GAP
    P:=Filtered([1..20000], IsPrime);
    P1:=List(Filtered(Filtered(List([1..Length(P)-1],n->[P[n],P[n+1]]),i->i[2]-i[1]=6),j->j[1] mod 5=2),k->k[1]); # Muniru A Asiru, Jul 08 2017
  • Maple
    for n from 1 to 2000 do if [ithprime(n+1)-ithprime(n), ithprime(n) mod 5] = [6,2] then print(ithprime(n)); fi; od; # Muniru A Asiru, Jan 19 2018
  • Mathematica
    a288022[n_] := Map[Last, Select[Map[{NextPrime[#, 1], NextPrime[#, -1]}&, Range[10, n, 10]], First[#]-Last[#]==6&]]
    a288022[3000] (* data *)

A288024 Prime p1 of consecutive primes p1, p2, where p2 - p1 = 8, and p1, p2 are in different decades.

Original entry on oeis.org

89, 359, 389, 449, 479, 683, 719, 743, 929, 983, 1109, 1163, 1193, 1373, 1439, 1523, 1559, 1733, 1823, 1979, 2003, 2153, 2213, 2243, 2273, 2459, 2609, 2663, 2699, 2843, 2879, 2909, 3209, 3449, 3623, 3719, 4289, 4349, 4583, 4943, 5189, 5399, 5573, 5693, 5783, 5813
Offset: 1

Views

Author

Hartmut F. W. Hoft, Jun 04 2017

Keywords

Comments

The unit digits of the numbers in the sequence are 3's or 9's.

Examples

			89 is in the sequence since pair (89,97) is the first with difference 8 spanning a multiple of 10.
		

Crossrefs

Programs

  • Mathematica
    a288024[n_] := Map[Last, Select[Map[{NextPrime[#, 1], NextPrime[#, -1]}&, Range[10, n, 10]], First[#]-Last[#]==8&]]
    a288024[6000] (* data *)
    Select[Partition[Prime[Range[800]],2,1],#[[2]]-#[[1]]==8&&IntegerDigits[#[[1]]][[-2]]!= IntegerDigits[ #[[2]]][[-2]]&][[;;,1]] (* Harvey P. Dale, Jan 09 2024 *)

A080840 Number of cousin primes < 10^n.

Original entry on oeis.org

1, 8, 41, 203, 1216, 8144, 58622, 440258, 3424680, 27409999, 224373161, 1870585459, 15834656003, 135779962760, 1177207270204
Offset: 1

Views

Author

Jason Earls, Mar 28 2003

Keywords

Comments

The corresponding numbers for twin primes and sexy primes are in A007508 and A080841, the greater of twin primes, cousin primes and sexy primes are in A006512, A046132 and A046117 respectively.
In this sequence, only the upper member of each prime cousin pair is counted. See A152052 for the variant where only the lower member is counted. - James Rayman, Jan 17 2021

Crossrefs

Programs

  • PARI
    {c=0; p=5; for(n=1,9, while(p<10^n,if(isprime(p-4),c++); p=nextprime(p+1)); print1(c,","))}

Extensions

a(8) and a(9) from Klaus Brockhaus, Mar 30 2003
More terms from R. J. Mathar, Aug 05 2007
a(13)-a(15) from Martin Ehrenstein, Sep 03 2021
Previous Showing 21-30 of 71 results. Next