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.

Original entry on oeis.org

1, 3, 5, 7, 9, 913, 13, 135, 357, 57, 357, 1357, 0, 135, 9135, 91357, 9135791357913, 35, 13579, 13579135791, 7913, 3579135791357913, 135, 913579135791, 79135, 357, 1357913, 7913579135, 57, 1357, 7913579135791357913579, 9135, 791357913579135791357913579135
Offset: 0

Views

Author

Amarnath Murthy, Jun 28 2001

Keywords

Comments

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

Examples

			a(7) = 135 = 3*(2*7 + 1) has increasing odd digits.
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.
		

Crossrefs

Programs

  • Maple
    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
  • Mathematica
    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]]]]];
    Table[a[n], {n, 0, 34}] (* Jean-François Alcover, Apr 17 2025, after Nathaniel Johnston *)

Extensions

More terms from Sascha Kurz, Mar 23 2002
a(6) and example corrected by, and terms after a(15) from Nathaniel Johnston, May 19 2011