A343447 Smallest m such that alternating integer 101...101 = A094028(m) is a multiple of A045572(n), (i.e., integers coprime with 10).
0, 2, 2, 8, 10, 2, 7, 8, 2, 10, 26, 13, 14, 32, 2, 2, 4, 20, 22, 20, 23, 12, 8, 28, 29, 8, 32, 32, 34, 3, 32, 12, 80, 40, 41, 21, 2, 14, 47, 98, 1, 16, 52, 53, 2, 55, 8, 23, 120, 14, 20, 20, 64, 8, 3, 22, 68, 32, 20, 73, 74, 71, 38, 38, 32, 80, 82, 38, 8, 42
Offset: 1
Examples
A045572(3) = 7, the smallest alternating multiple of 7 in A094028 is A094028(2) = 10101 because 1443*7 = 10101, as 1 and 101 are not divisible by 7, so a(3) = 2.
Programs
-
Mathematica
a[n_] := Module[{k = (5*n + (Mod[3*n + 2, 4] - 4))/2, m = 0}, While[! Divisible[1 + 100*(100^m - 1)/99, k], m++]; m]; Array[a, 100] (* Amiram Eldar, Apr 15 2021 *)
-
PARI
a045572(n)=10*(n>>2)+[-1,1,3,7][n%4+1] \\ after Charles R Greathouse IV in A045572 a094028(n) = 1+100*(100^n-1)/99 a(n) = for(m=0, oo, if(a094028(m)%a045572(n)==0, return(m))) \\ Felix Fröhlich, Apr 15 2021
Extensions
More terms from Felix Fröhlich, Apr 15 2021
Comments