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”).

a(n) is the number of n-digit integers in which the first k digits are divisible by k-th prime. Leading zeros are not allowed.
2

%I #15 Jan 14 2021 21:15:12

%S 4,13,26,44,39,33,24,11,4,2

%N a(n) is the number of n-digit integers in which the first k digits are divisible by k-th prime. Leading zeros are not allowed.

%C For every 3-digit number, such a 4-digit number is guaranteed to exist - in a range of ten consecutive numbers, at least one of them must be divisible by 7. Since this is not true for 11 and greater, the number of eligible numbers goes down dramatically. 8757193191 and 6300846559 are the only 10-digit numbers to satisfy the requirements.

%e There are four one-digit numbers divisible by 2 (the even, nonzero numbers), so a(1) = 4.

%e For n = 2, the number must start with an even, nonzero digit and the second digit must make it divisible by 3, which gives 13 numbers: 21, 24, 27, 42, 45, 48, 60, 63, 66, 69, 81, 84 and 87. Appending a 0 or 5 to the end of any of these satisfies for a(3), so the count doubles to 26.

%Y Cf. A079206 (the actual integers).

%K base,easy,fini,full,nonn

%O 1,1

%A Ellis M. Eisen (xerol(AT)xerol.org), Sep 04 2008