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

A270992 Number of distinct prime divisors of prime(n)+1 and prime(n+1)+1.

Original entry on oeis.org

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

Views

Author

Michel Marcus, Mar 28 2016

Keywords

Examples

			For n=1, p=2 and q=3; 3 and 4 have no common prime divisor, so a(1)=0.
For n=2, p=3 and q=5; 4 and 6 have 1 common prime divisor, so a(2)=1.
For n=9, p=23 and q=29; 24 and 30 have 2 common prime divisors, so a(9)=2.
		

Crossrefs

Cf. A008335, A270592 (records).

Programs

  • Mathematica
    Table[Length[Map[First, FactorInteger[GCD @@ {Prime@ n + 1, Prime[n + 1] + 1}]] /. 1 -> Nothing], {n, 101}] (* Michael De Vlieger, Mar 28 2016 *)
    Length[Intersection[FactorInteger[#[[1]]+1][[All,1]],FactorInteger[#[[2]] + 1][[All,1]]]]&/@Partition[Prime[Range[120]],2,1] (* Harvey P. Dale, Jun 11 2017 *)
  • PARI
    lista(nn) = {p = 2; f = factor(p+1)[,1]~; forprime(q=3, nn, g = factor(q+1)[,1]~; print1(#setintersect(f, g), ", "); p = q; f = g;);}
    
  • PARI
    a(n) = my(p = prime(n), q = nextprime(p+1)); #setintersect(factor(p+1)[,1]~, factor(q+1)[,1]~);

A378123 a(n) = number of prime divisors of the sum of the first n odd primes.

Original entry on oeis.org

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

Views

Author

Clark Kimberling, Nov 17 2024

Keywords

Examples

			3+5+7+11+13 = 39 = 3*13, so a(5) = 2.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := PrimeNu[Total[Prime[1+Range[n]]]]; Array[a, 500]
  • PARI
    a378123(n)=omega(sum(k=2,n+1,prime(k))) \\ Hugo Pfoertner, Nov 19 2024

Formula

a(n) = A001221(A071148(n)).

A245908 The number of distinct prime factors of prime(n)^2-1.

Original entry on oeis.org

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

Views

Author

R. J. Mathar, Aug 05 2014

Keywords

Crossrefs

Programs

  • Magma
    [#PrimeDivisors(NthPrime(n)^2 -1): n in [1..100]]; // Vincenzo Librandi, Apr 27 2019
  • Maple
    A245908 := proc(n)
        A082863(ithprime(n)) ;
    end proc:
  • Mathematica
    Table[PrimeNu[Prime[n]^2 - 1], {n, 100}] (* Wesley Ivan Hurt, Aug 05 2014 *)
  • PARI
    vector(100, n, omega(prime(n)^2-1)) \\ Derek Orr, Aug 05 2014
    

Formula

a(n) = A082863(prime(n)).
a(n) = A008334(n) + A008335(n) - 1, if n>1.

A378122 a(n) = number of prime divisors of the sum of the first n primes.

Original entry on oeis.org

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

Views

Author

Clark Kimberling, Nov 17 2024

Keywords

Examples

			2+3+5+7+11 = 28 = 2*2*7, so a(5) = 2.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := PrimeNu[Total[Prime[Range[n]]]]; Array[a, 500]
Showing 1-4 of 4 results.