login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A318236 a(n) = (3*2^(4*n+3) + 1)/5. 1

%I #28 Jul 29 2022 20:24:52

%S 5,77,1229,19661,314573,5033165,80530637,1288490189,20615843021,

%T 329853488333,5277655813325,84442493013197,1351079888211149,

%U 21617278211378381,345876451382054093,5534023222112865485,88544371553805847757,1416709944860893564109,22667359117774297025741

%N a(n) = (3*2^(4*n+3) + 1)/5.

%C a(n) is the smallest positive multiplicative inverse of 5 modulo 2^(4*n+3).

%C In binary, a(n) is written as 10011001...1001101 where "1001" appears n times. When n approaches infinity we get the 2-adic expansion of 1/5: ...10011001101. Similarly, the 2-adic expansion of 1/3 is ...101010101011.

%H Jianing Song, <a href="/A318236/b318236.txt">Table of n, a(n) for n = 0..200</a>

%H <a href="/index/Rec#order_02">Index entries for linear recurrences with constant coefficients</a>, signature (17,-16).

%F O.g.f.: (5 - 8*x)/((1 - x)*(1 - 16*x)).

%F E.g.f.: (24*exp(16*x) + exp(x))/5.

%F a(0) = 5, a(1) = 77; for n>1, a(n) = 17*a(n-1) - 16*a(n-2).

%e The smallest solution to 5*x == 1 (mod 8) is x = (3*2^3 + 1)/5 = 5.

%e The smallest solution to 5*x == 1 (mod 128) is x = (3*2^7 + 1)/5 = 77.

%t Table[(3 2^(4 n + 3) + 1) / 5, {n, 0, 20}] (* _Vincenzo Librandi_, Aug 24 2018 *)

%t LinearRecurrence[{17,-16},{5,77},20] (* _Harvey P. Dale_, Sep 25 2020 *)

%o (PARI) a(n) = (3*2^(4*n + 3) + 1)/5

%o (Magma) [(3*2^(4*n + 3) + 1)/5: n in [0..20]]; // _Vincenzo Librandi_, Aug 24 2018

%o (Python)

%o def A318236(n): return (3*(1<<(n<<2)+3)+1)//5 # _Chai Wah Wu_, Jul 29 2022

%Y A007583 gives the smallest positive multiplicative inverse of 3 modulo 2^(2*n) and 2^(2*n+1), A299960 gives the smallest positive multiplicative inverse of 5 modulo 2^(4*n), 2^(4*n+1) and 2^(4*n+2).

%K nonn,easy

%O 0,1

%A _Jianing Song_, Aug 21 2018

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 12:14 EDT 2024. Contains 371792 sequences. (Running on oeis4.)