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 91-100 of 478 results. Next

A182481 a(n) is the least k such that 6*k*n-1 and 6*k*n+1 are twin primes, and a(n)=0, if such k does not exist.

Original entry on oeis.org

1, 1, 1, 3, 1, 2, 1, 4, 2, 1, 3, 1, 4, 5, 2, 2, 1, 1, 2, 2, 7, 5, 1, 3, 1, 2, 5, 16, 2, 1, 7, 1, 1, 5, 2, 2, 9, 1, 8, 1, 5, 9, 4, 5, 1, 3, 1, 4, 3, 2, 7, 1, 20, 5, 2, 8, 14, 1, 3, 21, 43, 4, 6, 3, 5, 8, 4, 9, 2, 1, 3, 1, 14, 15, 9, 30, 1, 4, 22, 7, 20, 21, 9
Offset: 1

Views

Author

Vladimir Shevelev, May 01 2012

Keywords

Comments

Conjecture: a(n)>0; equivalently, for every n, the arithmetic progression {6*k*n-1} contains infinitely many lessers of twin primes (A001359).

Crossrefs

Programs

  • Mathematica
    Table[k = 0; While[! (PrimeQ[6*k*n - 1] && PrimeQ[6*k*n + 1]), k++]; k, {n, 100}] (* T. D. Noe, May 02 2012 *)
  • PARI
    a(n)=my(k);n*=6;until(isprime(n*k++-1)&&isprime(n*k+1),);k \\ Charles R Greathouse IV, May 01 2012

A209328 Decimal expansion of the sum of the inverse twin prime products.

Original entry on oeis.org

1, 0, 7, 9, 8, 3, 9, 7, 4, 9, 5
Offset: 0

Views

Author

R. J. Mathar, Jan 19 2013

Keywords

Comments

Summation up to the lesser prime(100000) gives 0.1079839703839.., summation up to the lesser prime(5000000) gives 0.10798397490956.. and summation up to the lesser prime(100000000) gives 0.107983974949..
The constant splits Brun's constant B=A065421 into two portions: define L=Sum_{n>=1} 1/A001359(n) and U=Sum_{n>=1} 1/A006512(n). Then B=U+L and this constant here = (L-U)/2. This leads to the estimates L=1.059064 and U=0.843096. - R. J. Mathar, Feb 05 2013

Examples

			0.10798397495... = 1/(3*5) + 1/(5*7) + 1/(11*13) + .. = Sum_{n>=1} 1/A037074(n).
		

Crossrefs

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

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Dec 21 2013

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n > 4.
(ii) If n > 3 is different from 9 and 29, then k*sigma(n-k) - 1 and k*sigma(n-k) + 1 are both prime for some 0 < k < n.
Obviously, either of the two parts implies the twin prime conjecture. We have verified part (i) for n up to 10^8.

Examples

			a(5) = 1 since 2*phi(3) - 1 = 3 and 2*phi(3) + 1 = 5 are both prime.
a(7) = 1 since 3*phi(4) - 1 = 5 and 3*phi(4) + 1 = 7 are both prime.
a(18) = 1 since 5*phi(13) - 1 = 59 and 5*phi(13) + 1 = 61 are both prime.
a(91) = 1 since 13*phi(78) - 1 = 311 and 13*phi(78) + 1 = 313 are both prime.
a(101) = 1 since 6*phi(95) - 1 = 431 and 6*phi(95) + 1 = 433 are both prime.
		

Crossrefs

Programs

  • Mathematica
    TQ[n_]:=PrimeQ[n-1]&&PrimeQ[n+1]
    a[n_]:=Sum[If[TQ[k*EulerPhi[n-k]],1,0],{k,1,(n-1)/2}]
    Table[a[n],{n,1,100}]

A237127 Number of ways to write n = k + m (0 < k < m) with k and m terms of A072281.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Feb 04 2014

Keywords

Comments

Conjecture: a(n) > 0 for all n > 11.
Clearly, this implies the twin prime conjecture.

Examples

			 a(13) = 1 since 13 = 5 + 8 with phi(5) - 1 = 3, phi(5) + 1 = 5, phi(8) - 1 = 3 and phi(8) + 1 = 5 all prime.
a(60) = 1 since 60 = 18 + 42 with phi(18) - 1 = 5, phi(18) + 1 = 7, phi(42) - 1 = 11 and phi(42) + 1 = 13 all prime.
a(84) = 1 since 84 = 7 + 77 with phi(7) - 1 = 5, phi(7) + 1 = 7, phi(77) - 1 = 59 and phi(77) + 1 = 61 all prime.
		

Crossrefs

Programs

  • Mathematica
    PQ[n_]:=PrimeQ[EulerPhi[n]-1]&&PrimeQ[EulerPhi[n]+1]
    a[n_]:=Sum[If[PQ[k]&&PQ[n-k],1,0],{k,1,(n-1)/2}]
    Table[a[n],{n,1,70}]

A242490 Smallest even number k such that lpf(k-3) = prime(n) while lpf(k-1) > lpf(k-3), where lpf=least prime factor (A020639).

Original entry on oeis.org

6, 8, 80, 14, 224, 20, 440, 854, 32, 1460, 1742, 44, 2282, 3434, 4190, 62, 5432, 4760, 74, 12194, 8930, 8054, 12374, 13292, 104, 15350, 110, 14282, 31982, 17402, 18212, 140, 24050, 152, 25220, 29990, 28202, 32234, 33392, 182, 43262, 194, 44972, 200, 47564
Offset: 2

Views

Author

Vladimir Shevelev, May 16 2014

Keywords

Comments

Note that the "small terms" {6,8,14,20,32,44,...} correspond to a(n) for which {a(n)-3, a(n)-1} is a twin pair such that the corresponding positions form sequence A029707.
If we change the definition to consider k for which {k-3, k-1} is not a twin pair, we obtain a closely related sequence 12,38,80,212,224,530,440,854,1250,1460,1742,... which shows a "model behavior" of A242490, if there are only a finite number of twin primes. - Vladimir Shevelev, May 19 2014

Examples

			Let n=2, prime(2)=3. Then lpf(6-3)=3, but lpf(6-1)=5>3. Since k=6 is the smallest such k, a(2)=6.
		

Crossrefs

Programs

  • PARI
    a(n)=my(p=prime(n),k=p+3); while(factor(k-3)[1,1]

Extensions

Correction and more terms from Peter J. C. Moses, May 19 2014

A242767 Numbers of repetitions of terms in A242758.

Original entry on oeis.org

1, 1, 2, 2, 3, 3, 4, 3, 6, 2, 5, 2, 6, 2, 2, 4, 3, 5, 3, 4, 5, 12, 2, 6, 9, 6, 5, 4, 3, 4, 20, 2, 2, 4, 4, 19, 2, 3, 2, 4, 8, 11, 5, 3, 3, 3, 10, 5, 4, 2, 17, 3, 6, 3, 3, 9, 9, 2, 6, 2, 6, 5, 6, 2, 3, 2, 3, 9, 4, 7, 3, 7, 20, 4, 7, 6, 5, 3, 7, 3, 20, 2, 14, 4
Offset: 2

Views

Author

Vladimir Shevelev, May 22 2014

Keywords

Comments

If {pA242758. If this number occurs k times in A242758, then we say that k is the index of the pair of twin primes {p,q} with p in A001359.
Is this the same as A027833 shifted by two indices? - R. J. Mathar, May 23 2014

Crossrefs

Formula

From the construction of A242758, in supposition of an infinity of twin primes, we have a(2)=1; for n>=3, a(n) = A027833(n-2). Otherwise, A027833 is finite, while A242758 will coincide with A242720 after the last pair of twin primes. - Vladimir Shevelev, May 26 2014

Extensions

More terms from Peter J. C. Moses, May 22 2014

A282321 Lesser of twin primes congruent to 11 (mod 30).

Original entry on oeis.org

11, 41, 71, 101, 191, 281, 311, 431, 461, 521, 641, 821, 881, 1031, 1061, 1091, 1151, 1301, 1451, 1481, 1721, 1871, 1931, 2081, 2111, 2141, 2381, 2591, 2711, 2801, 3251, 3371, 3461, 3581, 3671, 3821, 3851, 4001, 4091, 4241, 4271, 4421, 4481, 4721, 4931, 5021
Offset: 1

Views

Author

Martin Renner, Feb 11 2017

Keywords

Comments

The union of [this sequence and A282322] is A132241.
The union of [{3, 5}, this sequence, A282323 and A060229] is the lesser of twin primes sequence A001359.
The union of [{3, 5, 7}, A282321 to A282326] is the twin primes sequence A001097.

Crossrefs

Programs

  • Magma
    [p: p in PrimesUpTo(5000) | IsPrime(p+2) and p mod 30 eq 11 ]; // Vincenzo Librandi, Feb 12 2017
    
  • Maple
    a:={}:
    for i from 1 to 1229 do
      if isprime(ithprime(i)+2) and ithprime(i) mod 30 = 11 then
        a:={op(a),ithprime(i)}:
      fi:
    od:
    a;
  • PARI
    list(lim)=my(v=List(), p=2); forprime(q=3, lim+2, if(q-p==2 && q%30==13, listput(v, p)); p=q); Vec(v) \\ Charles R Greathouse IV, Feb 14 2017

A321597 Number of permutations tau of {1,...,n} such that k*tau(k) + 1 is prime for every k = 1,...,n.

Original entry on oeis.org

1, 2, 1, 6, 1, 24, 9, 38, 36, 702, 196, 7386, 3364, 69582, 45369, 885360, 110224, 14335236, 640000, 19867008, 11009124, 1288115340, 188485441, 17909627257, 4553145529, 363106696516, 149376066064, 11141446425852, 990882875761, 371060259505399, 16516486146304, 1479426535706319, 497227517362801, 102319410607145600, 32589727661167504, 12597253470226980096
Offset: 1

Views

Author

Zhi-Wei Sun, Nov 14 2018

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n > 0. Similarly, for any integer n > 2, there is a permutation tau of {1,...,n} such that k*tau(k) - 1 is prime for every k = 1,...,n.
(ii) For any integer n > 2, there is a permutation tau of {1,...,n} such that k + tau(k) - 1 and k + tau(k) + 1 are twin prime for every k = 1,...,n.
Obviously, part (ii) of this conjecture implies the twin prime conjecture. P. Bradley proved in arXiv:1809.01012 that for any positive integer n there is a permutation tau of {1,...,n} such that k + tau(k) is prime for every k = 1,...,n.

Examples

			a(3) = 1, and (1,3,2) is a permutation of {1,2,3} with 1*1 + 1 = 2, 2*3 + 1 = 7 and 3*2 + 1 = 7 all prime.
a(5) = 1, and (1,5,4,3,2) is a permutation of {1,2,3,4,5} with 1*1 + 1 = 2, 2*5 + 1 = 11, 3*4 + 1 = 13, 4*3 + 1 = 13 and 5*2 + 1 = 11 all prime.
		

Crossrefs

Programs

  • Mathematica
    V[n_]:=V[n]=Permutations[Table[i,{i,1,n}]]
    tab={};Do[r=0;Do[Do[If[PrimeQ[i*Part[V[n],k][[i]]+1]==False,Goto[aa]],{i,1,n}];r=r+1;Label[aa],{k,1,n!}];tab=Append[tab,r],{n,1,11}]
  • PARI
    a(n) = matpermanent(matrix(n, n, i, j, ispseudoprime(i*j + 1))); \\ Jinyuan Wang, Jun 13 2020

Extensions

a(12)-a(26) from Alois P. Heinz, Nov 17 2018
a(27)-a(30) from Jinyuan Wang, Jun 13 2020
a(31)-a(36) from Vaclav Kotesovec, Aug 19 2021

A365795 Numbers k such that omega(k) = 3 and its prime factors satisfy the equation p_1 + p_2 = p_3.

Original entry on oeis.org

30, 60, 70, 90, 120, 140, 150, 180, 240, 270, 280, 286, 300, 350, 360, 450, 480, 490, 540, 560, 572, 600, 646, 700, 720, 750, 810, 900, 960, 980, 1080, 1120, 1144, 1200, 1292, 1350, 1400, 1440, 1500, 1620, 1750, 1798, 1800, 1920, 1960, 2160, 2240, 2250, 2288, 2400, 2430, 2450
Offset: 1

Views

Author

Stefano Spezia, Sep 19 2023

Keywords

Comments

The lower prime factor p_1 is equal to 2 and the other two are twin primes: p_3 - p_2 = 2.

Examples

			60 is a term since 60 = 2^2*3*5 and 2 + 3 = 5.
286 is a term since 286 = 2*11*13 and 2 + 11 = 13.
		

Crossrefs

Subsequence of A033992 and of A071140.

Programs

  • Mathematica
    Select[Range[2500],PrimeNu[#]==3&&Part[First/@FactorInteger[#],1]+Part[First/@FactorInteger[#],2]==Part[First/@FactorInteger[#],3]&]
  • PARI
    isok(k) = if (omega(k)==3, my(f=factor(k)[,1]); f[1] + f[2] == f[3]); \\ Michel Marcus, Sep 19 2023

A373825 Position of first appearance of n in the run-lengths (differing by 0) of the run-lengths (differing by 2) of the odd primes.

Original entry on oeis.org

1, 2, 13, 11, 105, 57, 33, 69, 59, 29, 227, 129, 211, 341, 75, 321, 51, 45, 407, 313, 459, 301, 767, 1829, 413, 537, 447, 1113, 1301, 1411, 1405, 2865, 1709, 1429, 3471, 709, 2543, 5231, 1923, 679, 3301, 2791, 6555, 5181, 6345, 11475, 2491, 10633
Offset: 1

Views

Author

Gus Wiseman, Jun 21 2024

Keywords

Comments

Positions of first appearances in A373819.

Examples

			The runs of odd primes differing by 2 begin:
   3   5   7
  11  13
  17  19
  23
  29  31
  37
  41  43
  47
  53
  59  61
  67
  71  73
  79
with lengths:
3, 2, 2, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1, 1, 1, 1, 2, 2, 1, 1, 1, 2, 2, 1, 1, 1, 1, 2, 2, 2, ...
which have runs beginning:
  3
  2 2
  1
  2
  1
  2
  1 1
  2
  1
  2
  1 1 1 1
  2 2
  1 1 1
with lengths:
1, 2, 1, 1, 1, 1, 2, 1, 1, 1, 4, 2, 3, 2, 4, 3, ...
with positions of first appearances a(n).
		

Crossrefs

Firsts of A373819 (run-lengths of A251092).
For antiruns we have A373827 (sorted A373826), firsts of A373820, run-lengths of A027833 (partial sums A029707, firsts A373401, sorted A373402).
The sorted version is A373824.
A000040 lists the primes.
A001223 gives differences of consecutive primes (firsts A073051), run-lengths A333254 (firsts A335406), run-lengths of run-lengths A373821.
A046933 counts composite numbers between primes.
A065855 counts composite numbers up to n.
A071148 gives partial sums of odd primes.
For composite runs: A005381, A054265, A068780, A176246, A373403, A373404.

Programs

  • Mathematica
    t=Length/@Split[Length/@Split[Select[Range[3,10000], PrimeQ],#1+2==#2&]//Most]//Most;
    spna[y_]:=Max@@Select[Range[Length[y]],SubsetQ[t,Range[#1]]&];
    Table[Position[t,k][[1,1]],{k,spna[t]}]
Previous Showing 91-100 of 478 results. Next