login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A029503
Numbers n such that n divides the (right) concatenation of all numbers <= n written in base 10 (most significant digit on right).
2
1, 2, 3, 5, 6, 9, 101, 107, 153, 167, 277, 414, 486, 858, 1659, 2894, 3093, 4299, 4842, 8838, 22734, 31869, 69492, 361057, 429786, 462018, 859002, 1170801, 1334667, 1663923, 6143512, 6162396, 6212646, 7034661, 8164443
OFFSET
1,2
COMMENTS
This sequence differs from A061939 in that all least significant zeros are kept during concatenation.
Right concatenation, reverse order.
No more terms < 10^7. - Lars Blomberg, Oct 06 2011
EXAMPLE
n = 22 is not a term since 12345678901112131415161718191021222 is not divisible by 22.
See A029495 for other examples.
MATHEMATICA
b = 10; c = {}; Select[Range[10^4], Divisible[FromDigits[c = Join[c, Reverse[IntegerDigits[#, b]]], b], #] &] (* Robert Price, Mar 12 2020 *)
PROG
(PARI) isok(n) = my(s = ""); for (k=1, n, sk = digits(k); forstep (j=#sk, 1, -1, s = concat(s, sk[j]))); (eval(s) % n) == 0; \\ Michel Marcus, Jan 28 2017
KEYWORD
nonn,base,more
EXTENSIONS
Edited and updated by Larry Reeves (larryr(AT)acm.org), Apr 12 2002
Additional comments and more terms from Larry Reeves (larryr(AT)acm.org), May 25 2001
a(25)-a(35) from Lars Blomberg, Oct 06 2011
STATUS
approved