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 31-40 of 66 results. Next

A206768 a(n) = smallest number k such that sigma(k-n) = sigma(k) - n, with k > n+1.

Original entry on oeis.org

3, 5, 5, 7, 7, 11, 81, 11, 11, 13, 13, 17, 4431, 17, 17, 19, 19, 23, 25, 23, 23, 29
Offset: 1

Views

Author

Paolo P. Lava, Jan 10 2013

Keywords

Comments

This sequence begins
3, 5, 5, 7, 7, 11, 81, 11, 11, 13, 13, 17, 4431, 17, 17, 19, 19, 23, 25, 23, 23, 29, ?, 29, ?, 29, 29, 31, 31, 37, ?, 37, 51, 37, 37, 41, 81, 41, 41, 43, 43, 47, ?, 47, 47, 53, ?, 53, 3364, 53, 53, 59, ?, 59, ?, 59, 59, 61, 61, 67, ?, 67, ?, 67, 67, 71, ?, 71, 71, 73, 73, 79, 91, 79, ?, 79, 79, 83, ?, 83, 83, 89, ?, 89, ?, 89, 89, 101, ?, 97, ?, 97, 125, 97, 97, 101, ?, 101, 101, 103, 103, 107... where the other missing terms (designated by "?") are > 10^6, if they exist.
For a given n, n being even, among the integers k satisfying the property sigma(k-n) = sigma(k)-n, we will find prime numbers p, such that p and p-n are primes. This is because in that case sigma(p-n) = (p-n)+1 = (p+1)-n = sigma(p)-n. For instance, when n is even, for n=2 to 14, a(n) is the first term of A006512, A046132, A046117, A092402, A092146, A092216, A098933. If we restrict to composite numbers, then see A084293. - Michel Marcus, Feb 16 2013
For the missing terms mentioned in first comment, a(n) is > 10^7. - Michel Marcus, Sep 21 2013

Examples

			a(13) = 4431 because 4431 is the minimum number for which sigma(4431-13) = sigma(4418)= 6771 and sigma(4431) - 13 = 6784 -13 = 6771.
a(19) = 25 because 25 is the minimum number for which sigma(25-19) = sigma(6) = 12 and sigma(25) - 19 = 31 -19 = 12.
		

Crossrefs

Cf. A015886.

Programs

  • Maple
    A206768:=proc(q)
    local k,n;
    for n from 1 to q do
      for k from n+1 to q do
      if sigma(-n+k)=sigma(k)-n then print(k); break; fi;
    od; od; end:
    A206768(1000000000);

A236508 a(n) = |{0 < k < n-2: p = 2*phi(k) + phi(n-k)/2 - 1, p + 2, p + 6 and prime(p) + 6 are all prime}|, where phi(.) is Euler's totient function.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Jan 27 2014

Keywords

Comments

Conjecture: a(n) > 0 for all n > 146.
We have verified this for n up to 52000.
The conjecture implies that there are infinitely many prime triples {p, p + 2, p + 6} with {prime(p), prime(p) + 6} a sexy prime pair. See A236509 for such primes p.

Examples

			a(13) = 1 since 2*phi(3) + phi(10)/2 - 1 = 5, 5 + 2 = 7, 5 + 6 = 11 and prime(5) + 6 = 11 + 6 = 17 are all prime.
a(244) = 1 since 2*phi(153) + phi(244-153)/2 - 1 = 2*96 + 72/2 - 1 = 227, 227 + 2 = 229, 227 + 6 = 233 and prime(227) + 6 = 1433 + 6 = 1439 are all prime.
		

Crossrefs

Programs

  • Mathematica
    p[n_]:=PrimeQ[n]&&PrimeQ[n+2]&&PrimeQ[n+6]&&PrimeQ[Prime[n]+6]
    f[n_,k_]:=2*EulerPhi[k]+EulerPhi[n-k]/2-1
    a[n_]:=Sum[If[p[f[n,k]],1,0],{k,1,n-3}]
    Table[a[n],{n,1,100}]

A287050 Square array read by antidiagonals upwards: M(n,k) is the initial occurrence of first prime p1 of consecutive primes p1, p2, where p2 - p1 = 2*k, and p1, p2 span a multiple of 10^n, n>=1, k>=1.

Original entry on oeis.org

29, 599, 7, 2999, 97, 47, 179999, 1999, 1097, 89, 23999999, 69997, 21997, 1193, 139, 23999999, 199999, 369997, 23993, 691, 199, 29999999, 19999999, 3199997, 149993, 10993, 199, 113, 17399999999, 19999999, 6999997, 1199999, 139999, 997, 293, 1831
Offset: 1

Views

Author

Hartmut F. W. Hoft, May 18 2017

Keywords

Comments

The unit digits of the numbers in the matrix representation M(n,k) are 9's for column 1, 7's or 9's for column 2, 7's for column 3, 3's or 9's for column 4, and 1's, 3's, 7's or 9's for column 5.
The following matrix terms appear as first terms in sequence
A060229(1) = M(1,1)
A288021(1) = M(1,2)
A288022(1) = M(1,3)
A288024(1) = M(1,4)
A031928(1) = M(1,5)
A158277(1) = M(2,1)
A160440(1) = M(2,2)
A160370(1) = M(2,3)
A287049(1) = M(2,4)
A160500(1) = M(2,5)
A158861(1) = M(3,1).

Examples

			The matrix representation of the sequence with row n indicating the spanned power of 10 and column k indicating the difference of 2*k between the first pair of consecutive primes spanning a multiple of 10^n:
--------------------------------------------------------------------------
n\k   1             2             3             4            5
--------------------------------------------------------------------------
1 |   29            7             47            89           139
2 |   599           97            1097          1193         691
3 |   2999          1999          21997         23993        10993
4 |   179999        69997         369997        149993       139999
5 |   23999999      199999        3199997       1199999      1999993
6 |   23999999      19999999      6999997       38999993     1999993
7 |   29999999      19999999      159999997     659999999    379999999
8 |   17399999999   7699999999    9399999997    8999999993   499999993
9 |   92999999999   135999999997  85999999997   8999999993   28999999999
10|   569999999999  519999999997  369999999997  29999999993  819999999997
...
Every column in the matrix is nondecreasing.
For the first and fourth columns, ceiling(M[n,1]/10^n) and ceiling(M[n,4]/10^n) are divisible by 3, for all n>=1 (see A158277 and A287049).
		

Crossrefs

Formula

M(n,k) = min( p_i : p_(i+1) - p_i = 2*k, p_i and p_(i+1) consecutive primes and p_i < m*10^n < p_(i+1) for some integer m) where p_j is the j-th prime, n>=1 and k>=1.

A307561 Numbers k such that both 6*k - 1 and 6*k + 5 are prime.

Original entry on oeis.org

1, 2, 3, 4, 7, 8, 9, 14, 17, 18, 22, 28, 29, 32, 38, 39, 42, 43, 44, 52, 58, 59, 64, 74, 77, 84, 93, 94, 98, 99, 107, 108, 109, 113, 137, 143, 147, 157, 158, 162, 163, 169, 182, 183, 184, 197, 198, 203, 204, 213, 214, 217, 227, 228, 238, 239, 247, 248, 249, 259, 267, 268, 269, 312, 317, 318, 329, 333, 344
Offset: 1

Views

Author

Sally Myers Moite, Apr 14 2019

Keywords

Comments

There are 146 terms below 10^3, 831 terms below 10^4, 5345 terms below 10^5, 37788 terms below 10^6 and 280140 terms below 10^7.
Prime pairs differing by 6 are called "sexy" primes. Other prime pairs with difference 6 are of the form 6n + 1 and 6n + 7.
Numbers in this sequence are those which are not 6cd + c - d - 1, 6cd + c - d, 6cd - c + d - 1 or 6cd - c + d, that is, they are not (6c - 1)d + c - 1, (6c - 1)d + c, (6c + 1)d - c - 1 or (6c + 1)d - c.

Examples

			a(2) = 2, so 6(2) - 1 = 11 and 6(2) + 5 = 17 are both prime.
		

Crossrefs

Primes differing from each other by 6 are A023201, A046117.
Similar sequences for twin primes are A002822, A067611, for "cousin" primes A056956, A186243.
Intersection of A024898 and A059325.
Cf. also A307562, A307563.

Programs

  • Mathematica
    Select[Range[500], PrimeQ[6# - 1] && PrimeQ[6# + 5] &] (* Alonso del Arte, Apr 14 2019 *)
  • PARI
    is(k) = isprime(6*k-1) && isprime(6*k+5); \\ Jinyuan Wang, Apr 20 2019

A307562 Numbers k such that both 6*k + 1 and 6*k + 7 are prime.

Original entry on oeis.org

1, 2, 5, 6, 10, 11, 12, 16, 17, 25, 26, 32, 37, 45, 46, 51, 55, 61, 62, 72, 76, 90, 95, 100, 101, 102, 121, 122, 125, 137, 142, 146, 165, 172, 177, 181, 186, 187, 205, 215, 216, 220, 237, 241, 242, 247, 257, 270, 276, 277, 282, 290, 291, 292, 296, 297, 310, 311, 312, 331, 332, 335, 347, 355, 356, 380, 381, 390
Offset: 1

Views

Author

Sally Myers Moite, Apr 14 2019

Keywords

Comments

There are 138 such numbers between 1 and 1000.
Prime pairs that differ by 6 are called "sexy" primes. Other prime pairs that differ by 6 are of the form 6n - 1 and 6n + 5.
Numbers in this sequence are those which are not 6cd - c - d - 1, 6cd - c - d, 6cd + c + d - 1 or 6cd + c + d, that is, they are not (6c - 1)d - c - 1, (6c - 1)d - c, (6c + 1)d + c - 1 or (6c + 1)d + c.

Examples

			a(3) = 5, so 6(5) + 1 = 31 and 6(5) + 7 = 37 are both prime.
		

Crossrefs

For the primes see A023201, A046117.
Similar sequences for twin primes are A002822, A067611, for "cousin" primes A056956, A186243.
Intersection of A024899 and A153218.
Cf. also A307561, A307563.

Programs

  • Mathematica
    Select[Range[400], AllTrue[6 # + {1, 7}, PrimeQ] &] (* Michael De Vlieger, Apr 15 2019 *)
  • PARI
    isok(n) = isprime(6*n+1) && isprime(6*n+7); \\ Michel Marcus, Apr 16 2019

A104010 Sum of two successive sexy primes.

Original entry on oeis.org

16, 20, 28, 32, 40, 52, 68, 80, 88, 100, 112, 128, 140, 152, 172, 200, 208, 212, 220, 268, 308, 320, 340, 352, 388, 392, 452, 460, 472, 508, 520, 532, 548, 560, 620, 628, 668, 700, 712, 740, 752, 772, 872, 892, 920, 928, 1012, 1088, 1120, 1132, 1148, 1180, 1192
Offset: 1

Views

Author

Giovanni Teofilatto, Mar 31 2005

Keywords

Crossrefs

Programs

Formula

a(n)= A023201(n)+A046117(n) = 2*A087695(n). [From R. J. Mathar, Nov 26 2008]

Extensions

20 added, 84 removed, extended by R. J. Mathar, Nov 26 2008

A104037 Numbers of primes between two sexy primes.

Original entry on oeis.org

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

Views

Author

Giovanni Teofilatto, Mar 31 2005

Keywords

Crossrefs

Cf. A023201 (sexy primes), A046117.

Programs

  • Maple
    p:=1: q:= 0: r:= 1: s:= 1: count:= 0: Res:= NULL:
    while count < 100 do
      t:= charfcn[{true}](isprime(p+6));
      if t=1 and q=1 then
         count:= count + 1;
         Res:= Res, r+s;
      fi;
      p:= p+2;
      q:= r; r:= s; s:= t;
    od:
    Res; # Robert Israel, Jun 23 2019

Extensions

Corrected and extended by Robert Israel, Jun 23 2019

A172071 Primes p such that either p - 5/2 -+ 7/2 is prime.

Original entry on oeis.org

2, 11, 13, 17, 19, 23, 29, 37, 43, 47, 53, 59, 67, 73, 79, 89, 103, 107, 109, 113, 137, 157, 163, 173, 179, 197, 199, 229, 233, 239, 257, 263, 269, 277, 283, 313, 317, 337, 353, 359, 373, 379, 389, 439, 449, 463, 467, 509, 547, 563, 569, 577, 593, 599, 607, 613
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Jan 25 2010

Keywords

Comments

Two together with values of p+6 where (p,p+6) are both prime.

Examples

			2 is a term because 2 - 5/2 - 7/2 = -4 (nonprime) and 2 - 5/2 + 7/2 = 3 (prime).
		

Crossrefs

Programs

  • Maple
    for n from 1 to 200 do p := ithprime(n) ; if isprime(p+1) <> isprime(p-6) then printf("%d,",p) ; end if; end do: # R. J. Mathar, Apr 24 2010
  • Mathematica
    Join[{2}, Select[Prime[Range[5, 150]], PrimeQ[# - 6] &]] (* Paolo Xausa, Aug 17 2025 *)

Extensions

Entries checked by R. J. Mathar, Apr 24 2010

A236509 Primes p with p + 2, p + 6 and prime(p) + 6 all prime.

Original entry on oeis.org

5, 11, 107, 227, 311, 347, 821, 857, 1091, 1607, 1997, 2657, 3527, 4931, 5231, 8087, 8231, 9431, 10331, 11171, 12917, 13691, 13877, 21377, 22271, 24917, 27737, 29567, 32057, 33347, 35591, 36467, 37307, 39227, 42017
Offset: 1

Views

Author

Zhi-Wei Sun, Jan 27 2014

Keywords

Comments

According to the conjecture in A236508, this sequence should have infinitely many terms.

Examples

			a(1) = 5 since 5, 5 + 2 = 7, 5 + 6 = 11 and prime(5) + 6 = 17 are all prime, but 2 + 2 = 4 and 3 + 6 = 9 are both composite.
		

Crossrefs

Programs

  • Mathematica
    p[n_]:=p[n]=PrimeQ[n+2]&&PrimeQ[n+6]&&PrimeQ[Prime[n]+6]
    n=0;Do[If[p[Prime[m]],n=n+1;Print[n," ",Prime[m]]],{m,1,10^6}]

A261528 Least positive integer k such that both k and k*n belong to the set {m>0: prime(m)+2 is prime with prime(prime(m)+2) = prime(prime(m))+6}.

Original entry on oeis.org

2, 891, 81002, 814812, 86050, 5917, 65527, 109853, 2563344, 25379, 2640232, 266076, 775889, 67387, 68111, 37950, 353416, 347139, 56390, 11299, 89491, 545458, 910786, 353416, 1913477, 9025, 111569, 511796, 1456228, 37909, 1494675, 212092, 69352, 107769, 300657, 1155675, 391972, 1073031, 55074, 49892
Offset: 1

Views

Author

Zhi-Wei Sun, Aug 23 2015

Keywords

Comments

Conjecture: Any positive rational number r can be written as m/n with m and n in the set {k>0: prime(k)+2 is prime with prime(prime(k)+2) = prime(prime(k))+6}.
This implies that there are infinitely many twin prime pairs {p, p+2} with prime(p+2) - prime(p) = 6.
Note that if prime(n+2)-prime(n) = 6 then prime(n+1)-prime(n) = 2 or 4.

Examples

			a(1) = 2 since 2*1 = 2, and prime(2)+2 = 3+2 = 5 is prime with prime(5)-prime(3) = 11-5 = 6.
a(2) = 891 since prime(891)+2 = 6947 + 2 = 6949 is prime with prime(6949)-prime(6947) = 70123-70117 = 6, and prime(891*2)+2 = 15269 + 2 = 15271 is prime with prime(15271)-prime(15269) = 167119-167113 = 6.
		

References

  • Zhi-Wei Sun, Problems on combinatorial properties of primes, in: M. Kaneko, S. Kanemitsu and J. Liu (eds.), Number Theory: Plowing and Starring through High Wave Forms, Proc. 7th China-Japan Seminar (Fukuoka, Oct. 28 - Nov. 1, 2013), Ser. Number Theory Appl., Vol. 11, World Sci., Singapore, 2015, pp. 169-187.

Crossrefs

Programs

  • Mathematica
    f[n_]:=Prime[n]
    PQ[k_]:=PrimeQ[f[k]+2]&&f[f[k]+2]-f[f[k]]==6
    Do[k=0;Label[bb];k=k+1;If[PQ[k]&&PQ[k*n],Goto[aa],Goto[bb]];Label[aa];Print[n," ", k];Continue,{n,1,40}]
Previous Showing 31-40 of 66 results. Next