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!)
A340218 a(n) is the number of k < n such that prime(n)*prime(n+1) mod prime(k)*prime(k+1) is prime. 1
0, 1, 2, 3, 2, 4, 2, 3, 2, 2, 2, 3, 3, 6, 1, 2, 5, 5, 3, 3, 4, 4, 4, 3, 6, 6, 6, 4, 9, 7, 4, 2, 8, 4, 5, 4, 4, 10, 4, 4, 10, 6, 3, 7, 4, 4, 7, 8, 4, 10, 6, 6, 9, 7, 3, 8, 7, 6, 9, 6, 7, 8, 11, 7, 4, 7, 9, 9, 9, 6, 5, 13, 4, 6, 7, 6, 5, 13, 8, 9, 11, 9, 7, 14, 12, 9, 7, 15, 10, 17, 10, 9, 13, 10 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
LINKS
EXAMPLE
a(3) = 2 because prime(3)*prime(4) = 5*7 = 35, and 35 mod (2*3) = 5 and 35 mod (3*5) = 5 are prime.
MAPLE
N:= 100: # for a(1)..a(N)
P:= [seq(ithprime(i), i=1..N+1)]:
PP:= [seq(P[i]*P[i+1], i=1..N)]:
f:= proc(n) nops(select(t -> isprime(PP[n] mod PP[t]), [$1..n-1])) end proc:
map(f, [$1..N]);
PROG
(PARI) a(n) = sum(k=1, n-1, isprime(lift(Mod(prime(n)*prime(n+1), prime(k)*prime(k+1))))); \\ Michel Marcus, Jan 04 2021
CROSSREFS
Cf. A006094.
Sequence in context: A205689 A050206 A127237 * A199968 A066482 A324507
KEYWORD
nonn
AUTHOR
J. M. Bergot and Robert Israel, Jan 03 2021
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 August 11 01:05 EDT 2024. Contains 375059 sequences. (Running on oeis4.)