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.

A062886 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.

This page as a plain text file.
%I A062886 #20 Apr 17 2025 10:58:52
%S A062886 1,3,5,7,9,913,13,135,357,57,357,1357,0,135,9135,91357,9135791357913,
%T A062886 35,13579,13579135791,7913,3579135791357913,135,913579135791,79135,
%U A062886 357,1357913,7913579135,57,1357,7913579135791357913579,9135,791357913579135791357913579135
%N A062886 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 A062886 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 A062886 Nathaniel Johnston, <a href="/A062886/b062886.txt">Table of n, a(n) for n = 0..500</a>
%e A062886 a(7) = 135 = 3*(2*7 + 1) has increasing odd digits.
%e A062886 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 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
%t A062886 a[n_] := Module[{d, j, k, p, val}, p = 2*n+1; If[p ~Mod~ 25 == 0, Return[0]]; For[j = 1, True, j++, For[d = 1, d <= 9, d += 2, val = 0; For[k = 1, k <= j, k++, val = val + 10^(j-k)*((d + 2*(k-1)) ~Mod~ 10)]; If[val ~Mod~ p == 0, Return[val]]]]];
%t A062886 Table[a[n], {n, 0, 34}] (* _Jean-François Alcover_, Apr 17 2025, after _Nathaniel Johnston_ *)
%Y A062886 Cf. A062884, A062885.
%K A062886 nonn,base
%O A062886 0,2
%A A062886 _Amarnath Murthy_, Jun 28 2001
%E A062886 More terms from _Sascha Kurz_, Mar 23 2002
%E A062886 a(6) and example corrected by, and terms after a(15) from _Nathaniel Johnston_, May 19 2011