cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A069521 Smallest multiple of n with digit sum = 2, or 0 if no such number exists, e.g., a(3k)=0.

This page as a plain text file.
%I A069521 #14 Feb 12 2023 10:34:24
%S A069521 2,2,0,20,20,0,1001,200,0,20,11,0,1001,10010,0,2000,100000001,0,
%T A069521 1000000001,20,0,110,100000000001,0,200,10010,0,100100,
%U A069521 100000000000001,0,0,20000,0,1000000010,10010,0,0,10000000010,0,200,0,0,0,1100,0
%N A069521 Smallest multiple of n with digit sum = 2, or 0 if no such number exists, e.g., a(3k)=0.
%C A069521 a(n)=0 if n is a multiple of 3, 31, 37, 41, 43, 53, 67, 71, 79, or 83. - _Ray Chandler_, Jul 30 2003
%H A069521 Robert Israel, <a href="/A069521/b069521.txt">Table of n, a(n) for n = 1..2016</a>
%F A069521 From _Robert Israel_, Feb 11 2023: (Start)
%F A069521 If n = 2^a * 5^b, a(n) = 2*10^max(a-1,b).
%F A069521 Otherwise, if n = 2^a*5^b*c where c is in A043292, then a(n) = 10^max(a,b) * (1 + 10^A069531(c)).
%F A069521 Otherwise a(n) = 0. (End)
%e A069521 a(7) = a(13) = 1001. Digit sum of 1001 = 2 and is the smallest such multiple of 7 and 13. a(17) = 100000001 = 17*5882353.
%p A069521 f:= proc(n) local a,b,c,k;
%p A069521   a:= padic:-ordp(n,2);
%p A069521   b:= padic:-ordp(n,5);
%p A069521   c:= n/(2^a*5^b);
%p A069521   if c = 1 then return 2*10^max(a-1,b) fi;
%p A069521   k:= traperror(NumberTheory:-ModularLog(-1,10,c));
%p A069521   if k = "no solutions exist" then 0
%p A069521   else 10^max(a,b) * (1 + 10^k)
%p A069521   fi
%p A069521 end proc:
%p A069521 map(f, [$1..50]); # _Robert Israel_, Feb 11 2023
%Y A069521 Cf. A043292, A069531.
%K A069521 base,nonn
%O A069521 1,1
%A A069521 _Amarnath Murthy_, Apr 01 2002
%E A069521 More terms from _Ray Chandler_, Jul 30 2003