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!)
A163001 a(n) = the number of integers k, 1 <= k <= n-1, such that p(n)-p(k) is divisible by n-k (here p(n) = the n-th prime.) 1

%I

%S 0,1,1,2,2,2,3,3,4,5,3,4,5,5,5,7,4,7,5,5,9,6,7,3,6,5,5,3,5,5,6,6,8,6,

%T 5,7,9,6,8,5,5,7,7,6,9,6,7,9,8,7,4,7,8,4,7,7,7,5,7,4,6,5,6,9,6,5,8,10,

%U 11,10,11,12,12,11,10,12,12,13,13,13,9,14,10,15,17,16,16,18,17,9,5,18,20

%N a(n) = the number of integers k, 1 <= k <= n-1, such that p(n)-p(k) is divisible by n-k (here p(n) = the n-th prime.)

%e The 10th prime is 29. Checking: 29-2=27 is divisible by 10-1=9. 29-3=26 is not divisible by 10-2=8. 29-5=24 is not divisible by 10-3=7. 29-7=22 is not divisible by 10-4=6. 29-11=18 is not divisible by 10-5=5. 29-13=16 is divisible by 10-6=4. 29-17=12 is divisible by 10-7=3. 29-19=10 is divisible by 10-8=2. And 29-23=6 is divisible by 10-9=1. There are therefore five k's where p(10)-p(k) is divisible by 10-k. So a(10)=5.

%p a := proc (n) local ct, k: ct := 0: for k to n-1 do if `mod`(ithprime(n)-ithprime(k), n-k) = 0 then ct := ct+1 else end if end do: ct end proc: seq(a(n), n = 1 .. 100); # _Emeric Deutsch_, Jul 30 2009

%p A163001 := proc(n) local a,k ; a := 0 ; for k from 1 to n-1 do if ( ithprime(n)-ithprime(k) ) mod (n-k) = 0 then a := a+1; fi; od: a ; end ; seq(A163001(n),n=1..120) ; # _R. J. Mathar_, Jul 30 2009

%K nonn

%O 1,4

%A _Leroy Quet_, Jul 20 2009

%E Extended by _Emeric Deutsch_ and _R. J. Mathar_, Jul 30 2009

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 21 09:30 EDT 2022. Contains 353908 sequences. (Running on oeis4.)