login
a(n) = smallest k where (10^k+1)=0 mod prime(n)^2, or 0 if no such k exists.
3

%I #7 Mar 30 2012 17:29:08

%S 0,0,0,21,11,39,136,171,253,406,0,0,0,0,1081,0,1711,1830,0,0,292,0,0,

%T 1958,4656,202,1751,0,5886,6328,2667,8515,548,3197,11026,0,6123,0,

%U 13861,0,15931,16290,0,18528,9653,0,3165,24753,0,26106,27028,0,3615,6275

%N a(n) = smallest k where (10^k+1)=0 mod prime(n)^2, or 0 if no such k exists.

%C For a given a(n)>0, all the values of k such that (10^k+1)=0 mod prime(n)^2 are given by the sequence a(n)*A005408, i.e. odd multiples of a(n). For example, for n=5, prime(5)=11, a(n)=11, the set of values of k for which (10^k+1)=0 mod 11^2 is 11*A005408=11,33,55,77,99,... All the terms of the sequence a(n) are integer multiples of prime(n) for primes <1000 except for a(93)=243 where prime(93)=487.

%H Charles R. Greathouse IV, Sep 10, 2008, <a href="/A086981/b086981.txt">Table of n, a(n) for n = 1..4000</a>

%e a(4)=21 since 21 is least value of k for which (10^k+1)=0 mod 7^2.

%Y Cf. A000040, A086982.

%K nonn

%O 1,4

%A _Ray Chandler_, Jul 27 2003