The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A270992 Number of distinct prime divisors of prime(n)+1 and prime(n+1)+1. 2
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 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,9
LINKS
EXAMPLE
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.
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 *)
PROG
(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]~);
CROSSREFS
Cf. A008335, A270592 (records).
Sequence in context: A211993 A185646 A037829 * A117546 A274196 A096811
KEYWORD
nonn
AUTHOR
Michel Marcus, Mar 28 2016
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 12 23:04 EDT 2024. Contains 372497 sequences. (Running on oeis4.)