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!)
A309751 Approximation of the 2-adic integer arctan(2) up to 2^n. 3
0, 0, 2, 2, 10, 10, 10, 74, 202, 202, 714, 714, 714, 714, 8906, 25290, 58058, 123594, 254666, 516810, 516810, 1565386, 1565386, 5759690, 14148298, 14148298, 47702730, 47702730, 181920458, 450355914, 987226826, 987226826, 3134710474, 7429677770, 7429677770 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
COMMENTS
arctan(x) = x - x^3/3 + x^5/5 - x^7/7 + ...
LINKS
Wikipedia, p-adic number
FORMULA
a(n) = (Sum_{i=0..floor(n/2)-1} (-1)^i*2^(2*i+1)/(2*i+1)) mod 2^n.
EXAMPLE
a(2) = 2^1 mod 2^2 = 2;
a(3) = 2^1 mod 2^3 = 2;
a(4) = (2^1 - 2^3/3) mod 2^4 = 2;
a(5) = (2^1 - 2^3/3) mod 2^5 = 10;
a(6) = (2^1 - 2^3/3 + 2^5/5) mod 2^6 = 10;
a(7) = (2^1 - 2^3/3 + 2^5/5) mod 2^7 = 74.
PROG
(PARI) a(n) = lift(sum(i=0, n/2-1, Mod((-1)^i*2^(2*i+1)/(2*i+1), 2^n)))
CROSSREFS
Sequence in context: A141610 A019241 A168295 * A249152 A216708 A032005
KEYWORD
nonn
AUTHOR
Jianing Song, Aug 15 2019
EXTENSIONS
Offset corrected by Georg Fischer, Jun 22 2022
STATUS
approved

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 May 11 07:10 EDT 2024. Contains 372388 sequences. (Running on oeis4.)