

A069570


Numbers n in which the kth digit (counted from the right) is nonzero and either a divisor or a multiple of k, for all 1 <= k <= number of digits of n.


6



1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 13, 14, 15, 16, 17, 18, 19, 21, 22, 23, 24, 25, 26, 27, 28, 29, 41, 42, 43, 44, 45, 46, 47, 48, 49, 61, 62, 63, 64, 65, 66, 67, 68, 69, 81, 82, 83, 84, 85, 86, 87, 88, 89, 111, 112, 113, 114, 115, 116, 117, 118, 119, 121, 122, 123, 124, 125
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,2


COMMENTS

The units digits are 1, ..., 9 repeating (period 9). From n = 10 on, the 10's digits are { 1, 2, 4, 6, 8 } each repeated 9 times, and then starting over with 1. Similarly, starting with the first 3digit term, the 100's digits are {1, 3, 6, 9}, each repeated 45 times, then starting over with 1. From the first 4digit term on, the 1000's digits are { 1, 2, 4, 8 }, each repeated 180 times, then starting over with 1, etc.  M. F. Hasler, Sep 27 2016


LINKS

Table of n, a(n) for n=1..68.


FORMULA

a(n) % 10 = (n1) % 9 + 1.  M. F. Hasler, Sep 27 2016


EXAMPLE

The only restriction on the units digit is that it is nonzero. Therefore all singledigit numbers are included.
23 is a term because the 1st digit from the right is 3 which is a multiple of 1, and the 2nd digit from the right is 2 which is a multiple and also divisor of 2.
More generally, the second digit from the right ("10s digit") must be 1 or even.
Similarly, the third digit from the right must be 1, 3 6 or 9.
As all repunits are in the sequence, the sequence is infinite.


MATHEMATICA

Select[Range@ 125, Times @@ Map[Boole, MapIndexed[If[#1 == 0, False, Total@ Boole@ {First@ Divisible[#2, #1], First@ Divisible[#1, #2]} > 0] &, Reverse@ IntegerDigits@ #]] > 0 &] (* Michael De Vlieger, Sep 27 2016 *)


PROG

(PARI) select( is(n)=!for(i=1, #n=Vecrev(digits(n)), (!n[i](n[i]%i&&i%n[i]))&&return), [1..125]) \\ M. F. Hasler, Sep 27 2016
(PARI) is(n) = {my(d = digits(n)); for(i=1, #d, m=min(d[#d+1i], i); if(m==0, return(0)); if((d[#d+1i] + i)%m!=0, return(0))); 1} \\ David A. Corneth, Sep 27 2016
(PARI) A069570(n, s, k, d)={until(!n\=#d, s+=10^(k++1)*(d=select(d>!(k%d&&d%k), [1..9]))[n%#d+1]); s} \\ M. F. Hasler, Sep 28 2016


CROSSREFS

Cf. A069571.
Sequence in context: A052382 A055572 A052040 * A279367 A020731 A229300
Adjacent sequences: A069567 A069568 A069569 * A069571 A069572 A069573


KEYWORD

nonn,base


AUTHOR

Amarnath Murthy, Mar 24 2002


EXTENSIONS

Corrected (inserted missing terms) and extended by Jeremy Gardiner, Jun 17 2010
Definition clarified by M. F. Hasler, Sep 27 2016


STATUS

approved



