Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A078606
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A078606 Constant c(p) used in determining divisibility by the n-th prime, p=A000040(n), for n>=4. +0
2
-2, -1, 4, -5, 2, 7, 3, -3, -11, -4, 13, -14, 16, 6, -6, -20, -7, 22, 8, 25, 9, -29, -10, 31, -32, 11, 34, -38, -13, -41, 14, 15, -15, -47, 49, -50, 52, 18, -18, -19, 58, -59, 20, -21, 67, -68, 23, 70, 24, -24, -25, -77, 79, 27, -27, -83, -28, 85, 88, -92, -31, 94, -95, -33, -101, -104, 35, 106, 36, -110, 112, 38 (list; graph; listen)
OFFSET

4,1

COMMENT

To determine if N is divisible by p: Write N=10*M+D, where D=ones digit of N and M=N without ones digit. Then N is divisible by p iff M+c(p)*D is.

c(p) is the multiplicative inverse of 10 (mod p) with the smallest absolute value. (But note that the link below uses c(13)=9 rather than -4.)

LINKS

Ethan Magness, Steven Sinnott and Robert L. Ward, Divisibility Rules

EXAMPLE

The first few terms are c(7)=-2, c(11)=-1, c(13)=4. To find out if a number is divisible by 7, take the last digit, double it, and subtract the result from the rest of the number. If you get an answer divisible by 7 (including 0), then the original number is divisible by 7. If you do not know the new number's divisibility, you can apply the rule again. Example: If you had 203, you would subtract 2*3=6 from 20 to get 14; since 14 is divisible by 7, so is 203.

MATHEMATICA

c[p_] := If[(v=PowerMod[10, -1, p])>p/2, v-p, v]; c/@Prime/@Range[4, 100]

CROSSREFS

Sequence in context: A091564 A038574 A072014 this_sequence A065518 A072012 A038502

Adjacent sequences: A078603 A078604 A078605 this_sequence A078607 A078608 A078609

KEYWORD

sign,base

AUTHOR

Devora Rahav (rahav-d(AT)inter.net.il), Dec 09 2002

EXTENSIONS

Edited by Dean Hickerson (dean(AT)math.ucdavis.edu), Dec 23 2002

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 August 19 23:53 EDT 2008. Contains 142930 sequences.


AT&T Labs Research