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-2 of 2 results.

A023516 Number of distinct prime divisors of prime(n)*prime(n-1) - 1.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

This is taking prime(0)=1 (see first comment in A023515). - Vincenzo Librandi, Apr 27 2019

Crossrefs

Programs

  • Magma
    [#PrimeDivisors(NthPrime(n)*(NthPrime(n-1))-1): n in [1..100]]; // Vincenzo Librandi, Apr 27 2019
    
  • Maple
    0,seq(nops(numtheory:-factorset(ithprime(n)*ithprime(n-1)-1)),n=2..120); # Muniru A Asiru, Apr 29 2019
  • Mathematica
    Prepend[Table[PrimeNu[Prime[n] Prime[n-1] - 1], {n, 2, 80}],0] (* Vincenzo Librandi, Apr 27 2019 *)
  • PARI
    a(n) = if (n==1, 0, omega(prime(n)*prime(n-1) - 1)); \\ Michel Marcus, Apr 30 2019

Formula

a(n) = A001221(A023515(n)).

A266163 Primes prime(k) such that (prime(k)*prime(k+1)+1)/2 is prime.

Original entry on oeis.org

467, 2179, 2777, 4877, 6151, 6173, 6871, 7907, 7937, 8329, 9791, 11261, 11287, 12119, 12227, 12941, 13009, 14657, 14831, 15061, 15607, 16127, 16193, 16453, 16787, 16831, 17989, 18701, 18803, 18947, 19507, 20483, 20521, 20627, 22291, 22397, 22409, 22877, 23497
Offset: 1

Views

Author

Robert Israel, Dec 22 2015

Keywords

Comments

22397 and 22409 are first consecutive primes in this sequence. - Altug Alkan, Dec 22 2015
The next consecutive primes in this sequence are 134093 and 134129, 405541 and 405553, 432073 and 432097, 480803 and 480827, 586213 and 586237, ... - Harvey P. Dale, Dec 25 2015

Crossrefs

Cf. A023524.

Programs

  • Magma
    [p: p in PrimesInInterval(3,3*10^4) | IsPrime((p*NextPrime(p+1)+1) div 2)]; // Vincenzo Librandi, Dec 23 2015
  • Maple
    lastp:= 3:
    count:= 0:
    while count < 100 do
      p:= nextprime(lastp);
      if isprime((lastp*p+1)/2) then
        count:= count+1;
        A[count]:= lastp;
      fi;
      lastp:= p;
    od:
    seq(A[i],i=1..100);
  • Mathematica
    Prime@ Select[Range@ 2620, PrimeQ[(Prime@ # Prime[# + 1] + 1)/2] &] (* Michael De Vlieger, Dec 22 2015 *)
    Transpose[Select[Partition[Prime[Range[50000]],2,1],PrimeQ[ (Times@@#+1)/2]&]] [[1]] (* Harvey P. Dale, Dec 25 2015 *)
  • PARI
    lista(nn) = {forprime(p=3, nn, if(ispseudoprime((p*nextprime(p+1)+1)/2), print1(p, ", ")));} \\ Altug Alkan, Dec 22 2015
    
Showing 1-2 of 2 results.