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.

Previous Showing 11-20 of 43 results. Next

A176441 Decimal expansion of sqrt(210).

Original entry on oeis.org

1, 4, 4, 9, 1, 3, 7, 6, 7, 4, 6, 1, 8, 9, 4, 3, 8, 5, 7, 3, 7, 1, 8, 6, 6, 4, 1, 5, 7, 1, 6, 9, 7, 7, 1, 7, 2, 3, 1, 4, 0, 1, 3, 2, 8, 7, 4, 7, 5, 8, 9, 7, 3, 0, 8, 8, 6, 9, 5, 9, 2, 4, 8, 0, 7, 1, 1, 8, 1, 4, 4, 3, 7, 2, 6, 5, 3, 6, 8, 0, 4, 2, 1, 7, 1, 2, 5, 6, 3, 1, 9, 2, 0, 0, 3, 6, 1, 7, 4, 9, 7, 7, 5, 3, 0
Offset: 2

Views

Author

Klaus Brockhaus, Apr 19 2010

Keywords

Comments

Continued fraction expansion of sqrt(210) is A040195.

Examples

			sqrt(210) = 14.49137674618943857371...
		

Crossrefs

Cf. A010467 (decimal expansion of sqrt(10)), A010477 (decimal expansion of sqrt(21)), A176440 (decimal expansion of (14+sqrt(210))/4), A040195 (14 followed by (repeat 2, 28)).

Programs

  • Mathematica
    RealDigits[Sqrt[210],10,120][[1]]  (* Harvey P. Dale, Apr 21 2011 *)

A018072 Powers of fourth root of 10 rounded down.

Original entry on oeis.org

1, 1, 3, 5, 10, 17, 31, 56, 100, 177, 316, 562, 1000, 1778, 3162, 5623, 10000, 17782, 31622, 56234, 100000, 177827, 316227, 562341, 1000000, 1778279, 3162277, 5623413, 10000000, 17782794, 31622776, 56234132, 100000000, 177827941, 316227766, 562341325, 1000000000, 1778279410
Offset: 0

Views

Author

Keywords

Examples

			a(2) = 3 because 10^(2/4) = 10^(1/2) = sqrt(10) = 3.16228...
a(3) = 5 because 10^(3/4) = 5.62341...
a(4) = 10 because 10^(4/4) = 10^1 = 10.
a(5) = 17 because 10^(5/4) = 17.78279...
		

Crossrefs

Programs

Extensions

A few additional terms from Alonso del Arte, Jan 26 2013

A042937 Denominators of continued fraction convergents to sqrt(1000).

Original entry on oeis.org

1, 1, 2, 3, 5, 8, 53, 114, 281, 4329, 8939, 22207, 142181, 164388, 306569, 470957, 777526, 1248483, 78183472, 79431955, 157615427, 237047382, 394662809, 631710191, 4184923955, 9001558101, 22188040157, 341822160456, 705832361069, 1753486882594
Offset: 0

Views

Author

Keywords

Examples

			sqrt(1000) = 31.62... = 31 + 1/(1 + 1/(1 + ...)) with convergents 31/1, 32/1, 63/2, 95/3, 158/5, ... - _M. F. Hasler_, Nov 02 2019
		

Crossrefs

Cf. A042936 (numerators), A040968 (continued fraction), A010467 (decimals).
Analog for sqrt(m): A000129 (m=2), A002530 (m=3), A001076 (m=5), A041007 (m=6), A041009 (m=7), A041011 (m=8), A005663 (m=10), A041015 (m=11), A041017 (m=12), ..., A042933 (m=998), A042935 (m=999).

Programs

  • Mathematica
    Denominator[Convergents[Sqrt[1000], 30]] (* Vincenzo Librandi, Feb 01 2014 *)
  • PARI
    A42937=contfracpnqn(c=contfrac(sqrt(1000)),#c-1)[2,] \\ Possibly incorrect last term ignored. NB: a(n) = A42937[n+1]. For more terms use e.g. \p999, or compute any a(n) from this as in A042936. - M. F. Hasler, Nov 01 2019

Extensions

More terms from Vincenzo Librandi, Feb 01 2014

A081168 Differences of Beatty sequence for square root of 10.

Original entry on oeis.org

3, 3, 3, 3, 3, 3, 4, 3, 3, 3, 3, 3, 4, 3, 3, 3, 3, 3, 4, 3, 3, 3, 3, 3, 4, 3, 3, 3, 3, 3, 4, 3, 3, 3, 3, 3, 4, 3, 3, 3, 3, 3, 3, 4, 3, 3, 3, 3, 3, 4, 3, 3, 3, 3, 3, 4, 3, 3, 3, 3, 3, 4, 3, 3, 3, 3, 3, 4, 3, 3, 3, 3, 3, 4, 3, 3, 3, 3, 3, 3, 4, 3, 3, 3, 3, 3, 4, 3, 3, 3, 3, 3, 4, 3, 3, 3, 3, 3, 4, 3, 3, 3, 3, 3, 4
Offset: 0

Views

Author

Benoit Cloitre, Apr 16 2003

Keywords

Comments

Let S(0) = 3; obtain S(k) from S(k-1) by applying the morphism 3 -> 333334, 4 -> 3333334; sequence is S(0), S(1), S(2), ...
More generally, for a(n,m) = floor((n+1)*sqrt(m^2+ 1)) - floor(n*sqrt(m^2+1)) start with m and apply the morphism: m -> m^(2m-1), m+1; m+1 -> m^(2m), m+1.

Crossrefs

Programs

  • Magma
    A081168:= func< n | Floor((n+1)*Sqrt(10)) - Floor(n*Sqrt(10)) >;
    [A081168(n): n in [0..120]]; // G. C. Greubel, Jan 15 2024
    
  • Mathematica
    Differences[Floor[Sqrt[10]*Range[0, 120]]] (* G. C. Greubel, Jan 15 2024 *)
  • PARI
    a(n)=floor((n+1)*sqrt(10))-floor(n*sqrt(10))
    
  • SageMath
    def A081168(n): return floor((n+1)*sqrt(10)) - floor(n*sqrt(10))
    [A081168(n) for n in range(121)] # G. C. Greubel, Jan 15 2024

Formula

a(n) = floor((n+1)*sqrt(10)) - floor(n*sqrt(10)).

A088995 Least k > 0 such that the first n digits of 2^k and 5^k are identical.

Original entry on oeis.org

5, 98, 1068, 1068, 127185, 2728361, 15917834, 73482154, 961700165, 961700165, 83322853582, 1404948108914, 7603192018819, 167022179253602, 3550275020220728, 5729166542536373, 106675272785875442, 331484151442699072, 2330288635428230258177, 2330288635428230258177
Offset: 1

Views

Author

Lekraj Beedassy, Dec 01 2003

Keywords

Comments

The number of matching first digits of 2^n and 5^n increases with n and forms the sequence 3,1,6,2,2,7,7,6,6,... which approaches sqrt(10).
Numbers are half of the denominator of some convergent to log_10(2). - J. Mulder (jasper.mulder(AT)planet.nl), Feb 03 2010 [WARNING: This holds only for n < 6, it is wrong from a(6) = 2728361 on: The denominators are ..., 325147, 6107016, ... which would yield the larger solution 3053508 for n = 6. - M. F. Hasler, Mar 20 2025]
Xianwen Wang guesses that if the length of the continued fraction of m/k is h (where m is the difference between the numbers of digits of 2^k and 5^k), the first h-1 items of the continued fractions of m/k and log_10(2.5) agree. But this guess is not true for the similar sequence A359698. - Zhao Hui Du, Jun 06 2023
The terms grow like 10^n, oscillating by a few orders of magnitude around this value. I conjecture that log(a(n)/10^n) = O(log log n). - M. F. Hasler, Mar 22 2025

Examples

			a(2) = 98: 2^98 = 316912650057057350374175801344 and 5^98 = 315544362088404722164691426113114491869282574043609201908111572265625.
		

Crossrefs

Programs

  • Mathematica
    L2 = N[ Log[ 10, 2 ], 50 ]; L5 = N[ Log[ 10, 5 ], 50 ]; k = 1; Do[ While[ Take[ RealDigits[ 10^FractionalPart[ L2*k ] ][[ 1 ] ], n ] != Take[ RealDigits[ 10^FractionalPart[ L5*k ] ][[ 1 ] ], n ], k++ ]; Print[ k ], {n, 1, 10} ]
    L2 = N[ Log[ 10, 2 ], 50 ]; L5 = N[ Log[ 10, 5 ], 50 ]; k = 1; Do[ While[ Take[ RealDigits[ 10^FractionalPart[ L2*k ]][[ 1 ]], n ] != Take[ RealDigits[ 10^FractionalPart[ L5*k ]][[ 1 ]], n ], k++ ]; Print[ k ], {n, 1, 7} ]
    f[n_, k_] := {Floor[ 10^(k - 1 + N[FractionalPart[n Log[5]/Log[10]], 20])], Floor[10^(k - 1 + N[FractionalPart[n Log[2]/Log[10]], 20])]} Flatten@Block[{$MaxExtraPrecision = \[Infinity]}, Block[{l = Denominator /@ Convergents[Log10[2], 1000]}, Array[k \[Function] l[[Flatten@Position[f[ #/2, k] & /@ l, {x_, x_}, {1}, 1]]]/2, 20]]] (* J. Mulder (jasper.mulder(AT)planet.nl), Feb 03 2010 *)
    (* alternate program *)
    n = 100; $MaxExtraPrecision = n; ans =
     ContinuedFraction[Log10[5/2], n]; data =
     Denominator /@
      Flatten[Table[
        FromContinuedFraction[Join[ans[[1 ;; p - 1]], {#}]] & /@
         Range[1, ans[[p]]], {p, 2, n}]]; sol =
     Select[Table[{k, a = N[FractionalPart[{k Log10[2], k Log10[5]}], n];
        10^a, b = RealDigits[10^a][[All, 1]];
        LengthWhile[Range[Length[b[[1]]]], b[[1, #]] == b[[2, #]] &],
        10^a . {-1, 1}, RealDigits[10^a . {-1, 1}][[-1]]}, {k, data}],
      Abs[#[[-2]]] < 1 &];
    acc = Association[{}]; s = sol[[All, {1, 3}]]; For[i = 1,
     i < Length[s], i++,
     If[Lookup[acc, s[[i, 2]], 0] == 0,
      acc[s[[i, 2]]] = s[[i, 1]]]]; final =
     Rest[Sort[Normal[acc]]] /. Rule -> List;
    bcc = Association[{}]; For[i = Max[Keys[acc]], i >= Min[Keys[acc]], i--,
      j = i; While[Lookup[acc, j, 0] == 0 && j < Max[Keys[acc]], j++];
     bcc[i] = acc[j]; j = i; While[bcc[j] >= bcc[j + 1], j++];
     bcc[i] = Min[bcc[i], bcc[j]]]; bb =
     Rest[Sort[Normal[Reverse[bcc]]]] /. Rule -> List (* Xianwen Wang, Jun 02 2023 *)
  • PARI
    apply( {A088995(n) = localprec(max(n/.4,38)); my(L1=log(10), L2=log(2)/L1, L5=1-L2, c=contfrac(L5-L2), T=sqrtint(10^(2*n-1)), a=log(T)/L1%1, b=log(T+1)/L1%1, d(x)=a3, while(t(c-cv[i]), c-=cv[i]))+return(c))}, [1..15]) \\ - M. F. Hasler, Mar 22 2025
  • Python
    # NOTE: Although sympy's frac() may give incorrect results in some cases, care has been taken to ensure there should be no issue here. - M. F. Hasler, Mar 26 2025
    from sympy import S, sqrt, log, frac
    def A088995(n):
        T = 10**n//sqrt(10); prec = (n+9)/.4; cf = 'continued_fraction'
        L2, L5, a, b = (frac(log(x,10).n(prec)) for x in (2, 5, T, T+1))
        L = []; test = lambda k: a < frac(k*L2) < b > frac(k*L5) > a
        for K in S(f"{cf}_convergents({cf}_iterator(log(5/2,10)))"):
            if test(k := K.q):    # = K.denominator but K.denominator() in old versions
                for step in L[::-1]:
                  while test(k - step): k -= step
                return k
            if k > 99: L.append(k) # M. F. Hasler, Mar 22 2025, edited Mar 26 2025
    print(first30 := [A088995(n) for n in range(1,30)]) # M. F. Hasler, Mar 18 2025, edited Mar 24 2025, Mar 28 2025
    

Extensions

Edited by Robert G. Wilson v, Dec 02 2003
More terms from J. Mulder (jasper.mulder(AT)planet.nl), Feb 03 2010
a(6) and a(7) corrected by Keith F. Lynch, May 25 2023
a(11), a(13)-a(15), a(17) corrected by Zhao Hui Du, Jun 07 2023

A194386 Numbers m such that Sum_{k=1..m} (<1/2 + k*r> - ) > 0, where r=sqrt(10) and < > denotes fractional part.

Original entry on oeis.org

1, 2, 3, 4, 5, 7, 8, 9, 10, 11, 13, 14, 15, 16, 17, 19, 20, 21, 22, 23, 25, 26, 27, 28, 29, 31, 32, 33, 34, 35, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75
Offset: 1

Views

Author

Clark Kimberling, Aug 23 2011

Keywords

Comments

See A194368.

Crossrefs

Programs

  • Mathematica
    r = Sqrt[10]; c = 1/2;
    x[n_] := Sum[FractionalPart[k*r], {k, 1, n}]
    y[n_] := Sum[FractionalPart[c + k*r], {k, 1, n}]
    t1 = Table[If[y[n] < x[n], 1, 0], {n, 1, 300}];
    Flatten[Position[t1, 1]]   (* empty *)
    t2 = Table[If[y[n] == x[n], 1, 0], {n, 1, 400}];
    Flatten[Position[t2, 1]]     (* A194385 *)
    t3 = Table[If[y[n] > x[n], 1, 0], {n, 1, 100}];
    Flatten[Position[t3, 1]]     (* A194386 *)

A136583 n such that floor(sqrt(10^(2*n-1))) is (probably) prime.

Original entry on oeis.org

1, 2, 7, 18, 33, 206, 468, 1061, 6831, 40377
Offset: 1

Views

Author

Lekraj Beedassy, Jan 09 2008

Keywords

Comments

Number of digits of sqrt(10)-primes (A136582).
The n such that A017934(2*n-1) is (probably) prime.

Crossrefs

Programs

  • Magma
    for n in [1..10^6] do if IsPrime(Isqrt(10^(2*n-1))) then printf "%o, ", n; end if; end for; // Jason Kimberley, Sep 03 2011
  • Mathematica
    rd = RealDigits[Sqrt[10], 10, 10^5][[1]]; Do[ If[ PrimeQ@ FromDigits@ Take[rd, n], Print@n], {n, 10^5}] (* Robert G. Wilson v, Jan 20 2008 *)

Extensions

a(6) - a(8) from Robert G. Wilson v, Jan 20 2008
Probable terms a(9) and a(10) from Jason Kimberley, Aug 19 and Sep 03 2011

A176219 Decimal expansion of (6+2*sqrt(10))/3.

Original entry on oeis.org

4, 1, 0, 8, 1, 8, 5, 1, 0, 6, 7, 7, 8, 9, 1, 9, 5, 5, 4, 6, 6, 5, 9, 2, 9, 0, 2, 9, 6, 2, 1, 8, 1, 2, 3, 5, 5, 8, 1, 3, 0, 3, 6, 7, 5, 9, 5, 5, 0, 1, 4, 4, 5, 5, 1, 2, 3, 8, 3, 3, 6, 5, 6, 8, 5, 2, 8, 3, 9, 6, 2, 9, 2, 4, 2, 6, 1, 5, 8, 8, 1, 4, 2, 2, 9, 4, 9, 8, 7, 3, 8, 9, 1, 9, 5, 3, 3, 5, 3, 0, 1, 2, 4, 8, 9
Offset: 1

Views

Author

Klaus Brockhaus, Apr 12 2010

Keywords

Comments

Continued fraction expansion of (6+2*sqrt(10))/3 is A010714.

Examples

			(6+2*sqrt(10))/3 = 4.10818510677891955466...
		

Crossrefs

Cf. A010467 (decimal expansion of sqrt(10)), A010714 (repeat 4, 9).

A194385 Numbers m such that Sum_{k=1..m} (<1/2 + k*r> - ) = 0, where r=sqrt(10) and < > denotes fractional part.

Original entry on oeis.org

6, 12, 18, 24, 30, 36, 228, 234, 240, 246, 252, 258, 264, 456, 462, 468, 474, 480, 486, 492, 684, 690, 696, 702, 708, 714, 720
Offset: 1

Views

Author

Clark Kimberling, Aug 23 2011

Keywords

Comments

See A194368.

Crossrefs

Programs

  • Mathematica
    r = Sqrt[10]; c = 1/2;
    x[n_] := Sum[FractionalPart[k*r], {k, 1, n}]
    y[n_] := Sum[FractionalPart[c + k*r], {k, 1, n}]
    t1 = Table[If[y[n] < x[n], 1, 0], {n, 1, 300}];
    Flatten[Position[t1, 1]]  (* empty *)
    t2 = Table[If[y[n] == x[n], 1, 0], {n, 1, 800}];
    Flatten[Position[t2, 1]]     (* A194385 *)
    t3 = Table[If[y[n] > x[n], 1, 0], {n, 1, 100}];
    Flatten[Position[t3, 1]]     (* A194386 *)

A335320 Decimal expansion of a prime generating constant c for which round(c^k) is prime for 2 <= k <= 388.

Original entry on oeis.org

3, 1, 6, 2, 2, 7, 7, 6, 7, 1, 8, 5, 5, 9, 5, 6, 9, 3, 4, 1, 1, 8, 1, 9, 7, 8, 7, 0, 6, 1, 4, 2, 8, 8, 0, 9, 2, 1, 1, 9, 6, 0, 5, 0, 1, 9, 8, 7, 0, 6, 6, 9, 1, 6, 8, 5, 0, 9, 2, 6, 0, 4, 3, 9, 7, 2, 3, 1, 7, 8, 5, 0, 3, 6, 2, 0, 7, 4, 0, 8, 6, 4, 7, 5, 4
Offset: 5

Views

Author

Hugo Pfoertner, Jun 30 2020

Keywords

Comments

See A332308 for more information and references.
Apart from the offset, first differs from A010467 at the 9th digit. - Omar E. Pol, Jun 30 2020

Examples

			31622.7767185595693411819787061428809211960501987066916850926...
		

Crossrefs

Previous Showing 11-20 of 43 results. Next