A029520 Numbers k such that k divides the (left) concatenation of all numbers <= k written in base 3 (most significant digit on right and removing all least significant zeros before concatenation).
1, 4, 5, 7, 19, 443, 19952, 81544, 919648, 1186844
Offset: 1
Examples
See A029519 for example.
Crossrefs
Programs
-
J
ab=. #.^:_1 mkcat=. [ ab&.> [ #.&.> [ |.@:ab&.> [: |. [: >: [: i. ] seq=. ] +. [ #. [: ; mkcat 3 (] #~ ] = seq"0) >: i.500x NB. Stephen Makdisi, May 03 2018
-
Mathematica
b = 3; c = {}; Select[Range[10^4], Divisible[FromDigits[c = Join[IntegerDigits[IntegerReverse[#, b], b], c], b], #] &] (* Robert Price, Mar 13 2020 *)
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), Jun 04 2001
a(9)-a(10) from Lars Blomberg, Sep 02 2011
Comments