

A103876


A test for divisibility by the nth prime p(n).


1



2, 1, 9, 5, 17, 16, 26, 3, 11, 4, 30, 14, 37, 53, 6, 20, 7, 51, 71, 58, 80, 29, 10, 72, 32, 98, 79, 38, 13, 41, 125, 134, 15, 47, 114, 50, 121, 161, 18, 19, 135, 59, 179, 21, 156, 68, 206, 163, 215, 24, 25, 77, 184, 242, 27, 83, 28, 198, 205, 92, 31, 219, 95, 33, 101, 104
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

4,1


COMMENTS

Delete the last digit from the given number M and subtract a(n) times this deleted digit from the remaining number. If the result is divisible by p(n), M is divisible by p(n). This process may be repeated.


REFERENCES

Alfred S. Posamentier, Math Charmers, Tantalizing Tidbits for the Mind, Prometheus Books, NY, 2003, page 7681.


LINKS

Table of n, a(n) for n=4..69.


MATHEMATICA

f[n_] := Block[{p = Prime[n], k = 1}, While[ Mod[10k + 1, p] != 0, k++ ]; k]; Table[ f[n], {n, 4, 69}]


CROSSREFS

Cf. A078606.
Sequence in context: A177972 A011136 A067304 * A133174 A155545 A141618
Adjacent sequences: A103873 A103874 A103875 * A103877 A103878 A103879


KEYWORD

nonn,base


AUTHOR

Alfred S. Posamentier (asp2(AT)juno.com) and Robert G. Wilson v, Feb 10 2005


STATUS

approved



