[go: up one dir, main page]

login
A210707
a(1) and a(3) are 0. For all other n, a(n) is the smallest k such that 10*k is adjacent to a multiple of the n-th prime.
0
0, 1, 0, 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
OFFSET
1,4
EXAMPLE
a(6) = 4 because 13 (the sixth prime) divides 39, which is adjacent to 40.
MATHEMATICA
a[n_] := Block[{p = Prime[n], k = 0}, Mod[10, p] > 0 && While[! MemberQ[{1, p-1}, Mod[10*k, p]], k++]; k]; Array[a, 68] (* Giovanni Resta, Apr 30 2013 *)
CROSSREFS
Sequence in context: A072014 A213526 A308364 * A078606 A348706 A343250
KEYWORD
nonn
AUTHOR
J. Lowell, Apr 23 2013
EXTENSIONS
a(20)-a(68) from Giovanni Resta, Apr 30 2013
STATUS
approved