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.

A259558 Numbers n such that prime(n)-1 and prime(n+1)-1 have the same number of distinct prime factors.

Original entry on oeis.org

2, 4, 5, 8, 9, 12, 15, 16, 18, 19, 23, 24, 25, 28, 29, 31, 36, 38, 39, 40, 42, 44, 52, 56, 58, 59, 60, 63, 64, 71, 73, 74, 76, 80, 85, 88, 91, 92, 94, 96, 98, 99, 102, 103, 106, 107, 109, 110, 111, 112, 113, 117, 126, 129, 130, 131, 132, 133, 134, 136, 139, 141, 142, 143, 144, 151, 152, 159, 160, 161, 165, 168, 169, 173
Offset: 1

Views

Author

Keywords

Comments

Unlike A105403, this sequence appears to be infinite.
Dickson's conjecture would imply that there are infinitely many p such that p, p+6, 2*p+1 and 2*p+13 are prime and there are no primes between 2*p+1 and 2*p+13. Then n is in the sequence where 2*p+1=prime(n). - Robert Israel, Jun 30 2015

Examples

			The prime factors of prime(5)-1 are 2,5. The prime factors of prime(6)-1 are 2,3,3 and they have the same number of distinct prime factors.
		

Crossrefs

Programs

  • Maple
    N:= 2000: # to use primes <= N
    Primes:= select(isprime,[2,seq(2*i+1,i=1..floor((N-1)/2))]):
    npf:= map(t -> nops(numtheory:-factorset(Primes[t]-1)), [$1..nops(Primes)]):
    select(t -> npf[t+1]=npf[t],[$1..nops(Primes)-1]); # Robert Israel, Jun 30 2015
  • Mathematica
    Select[Range@ 173, PrimeNu[Prime[#] - 1] == PrimeNu[Prime[# + 1] - 1] &] (* Michael De Vlieger, Jul 01 2015 *)
  • PARI
    lista(nn) = {forprime(p=2, nn, if (omega(p-1)==omega(nextprime(p+1)-1), print1(primepi(p), ", ")););} \\ Michel Marcus, Jul 01 2015

A259559 Numbers n such that prime(n)-1 and prime(n+1)-1 have the same number of prime factors, including repeats.

Original entry on oeis.org

3, 4, 10, 12, 19, 29, 34, 36, 45, 46, 50, 61, 85, 89, 91, 104, 112, 117, 118, 119, 129, 130, 137, 138, 143, 147, 148, 158, 178, 179, 181, 185, 200, 202, 206, 214, 220, 233, 238, 239, 244, 248, 249, 258, 262, 275, 299, 304, 314, 333, 338, 340
Offset: 1

Views

Author

Keywords

Comments

Unlike A105403, this sequence appears to be infinite.

Examples

			The prime factors of prime(10)-1 are 2,2,7 and the prime factors of prime(11)-1 are 2,3,5 and so they have the same number of prime factors, including repeats.
		

Crossrefs

Programs

  • Mathematica
    Select[Range@ 360, PrimeOmega[Prime[#] - 1] == PrimeOmega[Prime[# + 1] - 1] &] (* Michael De Vlieger, Jul 01 2015 *)
    Transpose[SequencePosition[Table[PrimeOmega[Prime[n]-1],{n,400}],{x_,x_}]][[1]] (* The program uses the SequencePosition function from Mathematica version 10 *) (* Harvey P. Dale, Nov 29 2015 *)
  • PARI
    lista(nn) = {forprime(p=2, nn, if (bigomega(p-1)==bigomega(nextprime(p+1)-1), print1(primepi(p), ", ")););} \\ Michel Marcus, Jul 01 2015

A259562 Numbers n such that the sum of the distinct prime factors of prime(n)-1 and prime(n+1)-1 are the same.

Original entry on oeis.org

2, 414, 556, 3962, 4972, 6151, 6521, 8440, 8665, 13769, 13909, 15576, 16696, 17176, 19926, 20630, 21541, 27090, 30822, 62118, 65349, 74014, 94203, 98600, 101231, 103058, 108333, 112332, 136036, 142714, 145588, 147150, 160730, 162366, 169137, 194681, 200837
Offset: 1

Views

Author

Keywords

Comments

Although there are more terms than A105403 so far, these numbers are still fairly uncommon.
Is this sequence infinite?
It would follow from the generalized Bunyakovsky conjecture that, e.g., there are infinitely many primes p such that p+2, p+12, p+14, 6*p^2+84*p+1 and 6*p^2+84*p+145 are all prime, and there are no primes between 6*p^2+84*p+1 and 6*p^2+84*p+145. If so, then the sequence is infinite, because it contains n where prime(n) = 6*p^2+84*p+1, with prime(n)-1 having distinct prime factors 2,3,p,p+14 and prime(n+1) having distinct prime factors 2,3,p+2,p+12. - Robert Israel, Jun 30 2015

Examples

			The prime factors of prime(414)-1 are 2,3,5,5,19 and the prime factors of prime(415)-1 are 2,2,2,3,7,17. The sum of the distinct entries in each of these lists is 29.
		

Crossrefs

Programs

  • Maple
    Primes:= select(isprime,[2,seq(2*i+1,i=1..10^6)]):
    spf:= map(p -> convert(numtheory:-factorset(p-1),`+`), Primes):
    select(t -> spf[t+1]=spf[t], [$1..nops(Primes)-1]);
  • Mathematica
    Select[Range@ 250000, Total[First /@ FactorInteger[Prime@ # - 1]] == Total[First /@ FactorInteger[Prime[# + 1] - 1]] &] (* Michael De Vlieger, Jul 01 2015 *)
  • PARI
    spf(n) = {my(f=factor(n)); sum(k=1, #f~, f[k,1]);}
    lista(nn) = {forprime(p=2, nn, if (spf(p-1)==spf(nextprime(p+1)-1), print1(primepi(p), ", ")););} \\ Michel Marcus, Jun 30 2015

Extensions

More terms from Alois P. Heinz, Jun 30 2015

A259564 Numbers n such that the sum of the prime factors (including repeats) of prime(n)-1 and prime(n+1)-1 are the same.

Original entry on oeis.org

5, 7, 11, 30, 133, 160, 415, 527, 883, 1257, 2025, 2771, 2775, 6650, 6932, 13793, 19091, 30695, 32341, 33722, 36372, 37944, 40532, 42141, 47230, 60986, 77956, 82165, 90564, 111414, 113106, 136036, 147573, 148357, 158279, 169137, 169604, 171549, 174540, 187679
Offset: 1

Views

Author

Keywords

Comments

Although there are more terms than A105403 so far, these numbers are still fairly uncommon.
Is this sequence infinite?

Examples

			The prime factors of prime(30)-1 are 2,2,2,2,7 and the prime factors of prime(31)-1 are 2,3,3,7. The sum of entries in each of these lists is 15.
		

Crossrefs

Programs

  • Mathematica
    SequencePosition[Table[Total[Flatten[Table[#[[1]],#[[2]]]&/@ FactorInteger[ p-1]]],{p,Prime[Range[200000]]}],{x_,x_}][[All,1]] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Oct 12 2020 *)
  • PARI
    spff(n) = {my(f=factor(n)); sum(k=1, #f~, f[k,1]*f[k,2]);}
    lista(nn) = {forprime(p=2, nn, if (spff(p-1)==spff(nextprime(p+1)-1), print1(primepi(p), ", ")););} \\ Michel Marcus, Jun 30 2015

Extensions

More terms from Alois P. Heinz, Jun 30 2015
Name edited by Zak Seidov, Jul 02 2015

A260360 The absolute difference between the largest prime factors of prime(n)-1 and prime(n+1)-1.

Original entry on oeis.org

0, 1, 2, 2, 1, 1, 8, 4, 2, 2, 2, 2, 16, 10, 16, 24, 6, 4, 4, 10, 28, 30, 8, 2, 12, 36, 50, 4, 0, 6, 4, 6, 14, 32, 8, 10, 80, 40, 46, 84, 14, 16, 4, 4, 4, 30, 76, 94, 10, 12, 12, 0, 3, 129, 64, 62, 18, 16, 40, 26, 56, 14, 18, 66, 68, 4, 166, 144, 18, 168, 118, 30, 24, 184, 94, 86, 6, 12, 2, 12, 36, 40, 70, 56, 10
Offset: 2

Views

Author

Keywords

Comments

a(n)=0 if and only if n is in A105403.
It is an open question whether there are infinitely many zeros in this sequence. Are there infinitely many terms below some fixed upper bound?

Examples

			n=4: The prime factors of prime(4)-1 are 2,3 and the prime factors of prime(5)-1 are 2,5. The largest are 3 and 5, so a(4)=2.
		

Crossrefs

Programs

  • Maple
    B:= [seq(max(numtheory:-factorset(ithprime(i)-1)),i=2..101)]:
    seq(abs(B[n+1]-B[n]),n=1..99); # Robert Israel, Aug 06 2015
  • Mathematica
    Table[Abs[FactorInteger[Prime[n] - 1][[-1, 1]] - FactorInteger[Prime[n + 1] - 1][[-1, 1]]], {n, 2, 86}] (* Michael De Vlieger, Jul 24 2015 *)
    Rest[Abs[Differences[Table[FactorInteger[p-1][[-1,1]],{p,Prime[ Range[ 90]]}]]]] (* Harvey P. Dale, Aug 08 2021 *)
  • PARI
    gpf(n) = if(n>1, vecmax(factor(n)[, 1]), 1);
    a(n) = gpf(prime(n)-1) - gpf(prime(n+1)-1); \\ Michel Marcus, Aug 05 2015

Formula

a(n) = abs(A023503(n+1) - A023503(n)). - Robert Israel, Aug 06 2015
Showing 1-5 of 5 results.