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.

A369562 Smallest positive n-digit number divisible by 7.

This page as a plain text file.
%I A369562 #49 Jan 13 2025 18:32:35
%S A369562 7,14,105,1001,10003,100002,1000006,10000004,100000005,1000000001,
%T A369562 10000000003,100000000002,1000000000006,10000000000004,
%U A369562 100000000000005,1000000000000001,10000000000000003,100000000000000002,1000000000000000006,10000000000000000004,100000000000000000005
%N A369562 Smallest positive n-digit number divisible by 7.
%C A369562 The only semiprime terms are a(2) = 14 and a(n) such that (10^(n-1) + 3)/7 is a prime. - _Jon E. Schoenfield_, Jan 27 2024
%H A369562 <a href="/index/Rec#order_05">Index entries for linear recurrences with constant coefficients</a>, signature (11,-10,-1,11,-10).
%F A369562 a(n) = (floor(10^(n-1)/7) + 1)*7.
%F A369562 a(n) = 10^(n-1) + A033940(n+2). - _Amiram Eldar_, Jan 27 2024
%F A369562 G.f.: 7*x*(1 - 9*x + 3*x^2 - x^3 - 3*x^4)/((1 - x)*(1 + x)*(1 - 10*x)*(1 - x + x^2)). - _Stefano Spezia_, Jan 28 2024
%e A369562 a(3) = 105 = 7*15.
%t A369562 a[n_] := 10^(n - 1) + {6, 4, 5, 1, 3, 2}[[Mod[n, 6, 1]]]; Array[a, 30]
%t A369562 (* or *)
%t A369562 LinearRecurrence[{11, -10, -1, 11, -10}, {7, 14, 105, 1001, 10003, 100002}, 30] (* _Amiram Eldar_, Jan 27 2024 *)
%t A369562 Table[10^n+7-PowerMod[10,n,7],{n,0,20}] (* _Harvey P. Dale_, Jan 13 2025 *)
%Y A369562 Cf. A033940, A241217, A369613.
%K A369562 nonn,easy,base
%O A369562 1,1
%A A369562 _J. Lowell_, Jan 25 2024