login
Smallest multiple of 2n+1 with property that digits are odd and each digit is two more (mod 10) than the previous digit; or 0 if no such number exists.
1

%I #16 Mar 22 2020 09:25:13

%S 1,3,5,7,9,913,13,135,357,57,357,1357,0,135,9135,91357,9135791357913,

%T 35,13579,13579135791,7913,3579135791357913,135,913579135791,79135,

%U 357,1357913,7913579135,57,1357,7913579135791357913579,9135,791357913579135791357913579135

%N Smallest multiple of 2n+1 with property that digits are odd and each digit is two more (mod 10) than the previous digit; or 0 if no such number exists.

%C The size of terms of this sequence varies wildly. For example, a(453) has 755 digits, while a(456)=913. The only numbers n for which a(n)=0 up to n=500 are those for which 2*n+1 is divisible by 25. - _Nathaniel Johnston_, May 19 2011

%H Nathaniel Johnston, <a href="/A062886/b062886.txt">Table of n, a(n) for n = 0..500</a>

%e a(7) = 135 = 3*(2*7 + 1) has increasing odd digits.

%e a(12) does not exist because a number in base 10 divisible by 25 ends with 00, 25, 50 or 75, so a(12)=0.

%p A062886 := proc(n) local d,j,k,p,val: p:=2*n+1: if(p mod 25 = 0)then return 0: fi: for j from 1 do for d from 1 to 9 by 2 do val:=0: for k from 1 to j do val:=val+10^(j-k)*((d+2*(k-1)) mod 10): od: if(val mod p = 0)then return val: fi: od: od: end: seq(A062886(n),n=0..30); # _Nathaniel Johnston_, May 19 2011

%Y Cf. A062884, A062885.

%K nonn,base

%O 0,2

%A _Amarnath Murthy_, Jun 28 2001

%E More terms from _Sascha Kurz_, Mar 23 2002

%E a(6) and example corrected by, and terms after a(15) from _Nathaniel Johnston_, May 19 2011