OFFSET
1,1
COMMENTS
Modest numbers (A054986) are the same but without assuming (a,b) = 1.
For given k, (see FORMULA section) b's are divisors of (10^k - 1), and a's are coprime with b, number of pairs (a,b) is Sum_{i=1..m} phi(b_i) - 1 where b_i are divisors of (10^k - 1),
m = d(10^k - 1) the number of divisors of n (A000005),
and phi is Euler totient function (A000010).
E.g., for k = 1: b = 1, 3, 9, and pairs of (a,b) are:
(1,3), (2,3), (1,9), (2,9), (4,9), (5,9), (7,9), and (8,9) - a total of 8 pairs. - Zak Seidov, Mar 22 2012
REFERENCES
Problem 1291, J. Rec. Math., 17 (No.2, 1984), 140-141.
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
H. Havermann, Modest numbers, J. Recreational Mathematics, 17.2 (1984), 140-141. (Annotated scanned copy)
FORMULA
n = a*10^k + b such that (a, b)=1, n == a (mod b), a < b < 10^k.
PROG
(Haskell)
import Data.List (inits, tails)
a007627 n = a007627_list !! (n-1)
a007627_list = filter modest' [1..] where
modest' x = or $ zipWith m
(map read $ (init $ tail $ inits $ show x) :: [Integer])
(map read $ (tail $ init $ tails $ show x) :: [Integer])
where m u v = u < v && (x - u) `mod` v == 0 && gcd u v == 1
-- Reinhard Zumkeller, Mar 27 2011
CROSSREFS
KEYWORD
nonn,easy,base
STATUS
approved