The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A034945 Successive approximations to 7-adic integer sqrt(2). 3
0, 3, 10, 108, 2166, 4567, 38181, 155830, 1802916, 24862120, 266983762, 1961835256, 5916488742, 19757775943, 116646786350, 9611769806236, 42844700375837, 275475214363044, 6789129606004840, 75182500718243698 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,2
REFERENCES
K. Mahler, Introduction to p-Adic Numbers and Their Functions, Cambridge, 1973, p. 35.
LINKS
PROG
(PARI) seq(n)={my(v=vector(n), i=1, k=0); while(i<#v, k++; my(t=truncate(sqrt(2 + O(7^k)))); if(t > v[i], i++; v[i]=t)); v} \\ Andrew Howroyd, Nov 03 2018
(Ruby)
def A034945(n)
ary = [0]
a, mod = 3, 7
while ary.size - 1 < n
b = a % mod
ary << b if b != ary[-1]
a = b * b + b - 2
mod *= 7
end
ary
end
p A034945(100) # Seiichi Manyama, Aug 03 2017
(Python)
def a034945(n):
ary=[0]
a, mod=3, 7
while len(ary) - 1<n:
b=a%mod
if b!=ary[-1]: ary.append(b)
a=b**2 + b - 2
mod*=7
return ary
print(a034945(100)) # Indranil Ghosh, Aug 03 2017, after Ruby
CROSSREFS
Cf. A290557.
Sequence in context: A048531 A073306 A290557 * A132480 A201694 A336210
KEYWORD
nonn,easy
AUTHOR
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 14 07:57 EDT 2024. Contains 372530 sequences. (Running on oeis4.)