Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A118123
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A118123 Number of k's such that prime(n+1) = prime(n) + (prime(n) mod k). +0
4
0, 0, 1, 0, 2, 1, 3, 2, 1, 3, 1, 2, 3, 2, 1, 1, 3, 2, 4, 3, 1, 4, 3, 3, 2, 5, 4, 7, 6, 2, 2, 2, 7, 2, 5, 2, 1, 2, 3, 1, 3, 3, 7, 6, 7, 2, 1, 2, 8, 7, 1, 3, 5, 4, 1, 1, 3, 2, 6, 5, 5, 3, 2, 3, 2, 2, 4, 2, 7, 6, 1, 6, 2, 1, 6, 3, 2, 2, 2, 5, 3, 2, 7, 3, 6, 3, 6, 2, 7, 6, 5, 2, 6, 5, 10, 3, 2, 3, 2, 2, 2, 3, 1, 9, 2 (list; graph; listen)
OFFSET

1,5

FORMULA

a(n) = number k such that prime(n+1) = prime(n) + (prime(n) mod k), or 0 if no such k exists.

PROGRAM

(PARI) f[n_] := If[n == 1, 0, Block[{p = Prime@n, np = Prime[n + 1]}, Length@Select[Divisors[2p - np], # >= np - p &]]]; Array[f, 105]

CROSSREFS

Cf. A117078, A117563.

Sequence in context: A126597 A076081 A107338 this_sequence A131756 A085014 A082074

Adjacent sequences: A118120 A118121 A118122 this_sequence A118124 A118125 A118126

KEYWORD

nonn

AUTHOR

Remi Eismann and Robert G. Wilson v (rgwv(AT)rgwv.com), May 12 2006

page 1

Search completed in 0.002 seconds

Lookup | Welcome | Find friends | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
More pages | Superseeker | Maintained by N. J. A. Sloane (njas@research.att.com)

Last modified November 18 20:14 EST 2008. Contains 147244 sequences.


AT&T Labs Research