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 21-30 of 36 results. Next

A133390 Period 18: repeat 1, 4, 7, 2, 2, 5, 4, 1, 1, 8, 5, 2, 7, 7, 4, 5, 8, 8.

Original entry on oeis.org

1, 4, 7, 2, 2, 5, 4, 1, 1, 8, 5, 2, 7, 7, 4, 5, 8, 8, 1, 4, 7, 2, 2, 5, 4, 1, 1, 8, 5, 2, 7, 7, 4, 5, 8, 8, 1, 4, 7, 2, 2, 5, 4, 1, 1, 8, 5, 2, 7, 7, 4, 5, 8, 8, 1, 4, 7, 2, 2, 5, 4, 1, 1, 8, 5, 2, 7, 7, 4, 5, 8, 8, 1, 4, 7, 2, 2, 5, 4, 1, 1, 8, 5, 2, 7, 7, 4, 5, 8, 8
Offset: 0

Views

Author

Paul Curtz, Nov 23 2007

Keywords

Comments

Disordered, three times 1, 2, 4, 5, 7, 8.

Programs

  • Mathematica
    PadRight[{},18*5,{1,4,7,2,2,5,4,1,1,8,5,2,7,7,4,5,8,8}] (* Harvey P. Dale, Nov 06 2011 *)
  • PARI
    for(i=1,9,print1("1, 4, 7, 2, 2, 5, 4, 1, 1, 8, 5, 2, 7, 7, 4, 5, 8, 8, ")) \\ Charles R Greathouse IV, Jun 02 2011

Formula

Sum of digits mod 9 of 1, 4, 7, 11, 20, A130625. Digits of 1/7, A020806 or A029898, 1, 1, 2, 4, 8.

A255873 The first nonzero digit of n/7.

Original entry on oeis.org

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

Views

Author

Kit Scriven, Mar 08 2015

Keywords

Examples

			The leading (most significant) digit of 22/7 in A068028 is 3, so a(22)=3.
		

Crossrefs

Cf. A020806 (1/7), A068028 (22/7), A216606 (360/7).

Programs

  • Maple
    A255873 := proc(n)
        local nshf ;
        nshf := n/7 ;
        while nshf < 1 do
            nshf := 10*nshf;
        end do;
        while nshf >= 10 do
            nshf := nshf/10;
        end do;
        floor(nshf) ;
    end proc: # R. J. Mathar, May 28 2016
  • Mathematica
    f[n_] := RealDigits[n/7, 10, 9][[1, 1]]; Array[f, 105] (* Robert G. Wilson v, Mar 08 2015 *)
  • PARI
    a(n) = {my(x = n/7.0); if (x < 1, x *= 10); while (x >= 10, x /= 10); floor(x);} \\ Michel Marcus, Mar 12 2015

A271427 a(n) = 7^n - a(n-1) for n>0, a(0)=0.

Original entry on oeis.org

0, 7, 42, 301, 2100, 14707, 102942, 720601, 5044200, 35309407, 247165842, 1730160901, 12111126300, 84777884107, 593445188742, 4154116321201, 29078814248400, 203551699738807, 1424861898171642, 9974033287201501, 69818233010410500, 488727631072873507, 3421093417510114542
Offset: 0

Views

Author

Ilya Gutkovskiy, Apr 13 2016

Keywords

Comments

In general, the ordinary generating function for the recurrence b(n) = k^n - b(n-1), where n>0 and b(0)=0, is k*x/((1 + x)*(1 - k*x)). This recurrence gives the closed form b(n) = k*(k^n - (-1)^n)/(k + 1).

Examples

			a(2) = 7^2 - a(2-1) = 49 - 7 = 42.
a(4) = 7^4 - a(4-1) = 2401 - 301 = 2100.
		

Crossrefs

Cf. similar sequences with the recurrence b(n) = k^n - b(n-1): A125122 (k=1), A078008 (k=2), A054878 (k=3), A109499 (k=4), A109500 (k=5), A109501 (k=6), this sequence (k=7), A093134 (k=8), A001099 (k=n).

Programs

  • Mathematica
    LinearRecurrence[{6, 7}, {0, 7}, 30]
    Table[7 (7^n - (-1)^n)/8, {n, 0, 30}]
  • PARI
    vector(50, n, n--; 7*(7^n-(-1)^n)/8) \\ Altug Alkan, Apr 13 2016
    
  • Python
    for n in range(0,10**2):print((int)((7*(7**n-(-1)**n))/8))
    # Soumil Mandal, Apr 14 2016

Formula

O.g.f.: 7*x/(1 - 6*x - 7*x^2).
E.g.f.: (7/8)*(exp(7*x) - exp(-x)).
a(n) = 6*a(n-1) + 7*a(n-2).
a(n) = 7*(7^n - (-1)^n)/8.
a(n) = 7*A015552(n).
Sum_{n>0} 1/(a(n) + a(n-1)) = 1/6 = A020793.
Limit_{n->oo} a(n-1)/a(n) = 1/7 = A020806.

A355068 Square array read by upwards antidiagonals: T(n,k) = k-th digit after the decimal point in decimal expansion of 1/n, for n >= 1 and k >= 1.

Original entry on oeis.org

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

Views

Author

Chittaranjan Pardeshi, Jun 17 2022

Keywords

Comments

First row is all zeros since n=1 has all zeros after the decimal point.

Examples

			Array begins:
      k=1  2  3  4  5  6  7  8
  n=1:  0, 0, 0, 0, 0, 0, 0, 0,
  n=2:  5, 0, 0, 0, 0, 0, 0, 0,
  n=3:  3, 3, 3, 3, 3, 3, 3, 3,
  n=4:  2, 5, 0, 0, 0, 0, 0, 0,
  n=5:  2, 0, 0, 0, 0, 0, 0, 0,
  n=6:  1, 6, 6, 6, 6, 6, 6, 6,
  n=7:  1, 4, 2, 8, 5, 7, 1, 4,
  n=8:  1, 2, 5, 0, 0, 0, 0, 0,
Row n=7 is 1/7 = .142857142857..., whose digits after the decimal point are 1,4,2,8,5,7,1,4,2,8,5,7, ...
		

Crossrefs

Cf. A061480 (diagonal).
Cf. A355202 (binary).

Programs

  • PARI
    T(n,k) = my(r=lift(Mod(10,n)^(k-1))); floor(10*r/n)%10;
    
  • Python
    def T(n,k): return (10*pow(10,k-1,n)//n)%10

Formula

1/n = Sum_{k>=1} T(n, k)*10^-k, for n > 1.

A021039 Decimal expansion of 1/35.

Original entry on oeis.org

0, 2, 8, 5, 7, 1, 4, 2, 8, 5, 7, 1, 4, 2, 8, 5, 7, 1, 4, 2, 8, 5, 7, 1, 4, 2, 8, 5, 7, 1, 4, 2, 8, 5, 7, 1, 4, 2, 8, 5, 7, 1, 4, 2, 8, 5, 7, 1, 4, 2, 8, 5, 7, 1, 4, 2, 8, 5, 7, 1, 4, 2, 8, 5, 7, 1, 4, 2, 8, 5, 7, 1, 4, 2, 8, 5, 7, 1, 4, 2, 8, 5, 7, 1, 4, 2, 8, 5, 7, 1, 4, 2, 8, 5, 7, 1, 4, 2, 8
Offset: 0

Views

Author

Keywords

Comments

Same decimal period as A020806. - R. J. Mathar, Feb 13 2012

Examples

			0.0285714285714285..
		

Crossrefs

Cf. A020806.

Programs

  • Mathematica
    Join[{0},RealDigits[1/35,10,120][[1]]] (* or *) PadRight[{0},120,{4,2,8,5,7,1}] (* Harvey P. Dale, Oct 15 2013 *)

A021101 Decimal expansion of 1/97.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

From Daniel Forgues, Oct 28 2011: (Start)
Generalization:
1/7 = Sum_{i>=0} 3^i/10^(i+1) (A020806)
1/97 = Sum_{i>=0} 3^i/100^(i+1) (this sequence);
1/997 = Sum_{i>=0} 3^i/1000^(i+1) (A022001);
1/9997 = Sum_{i>=0} 3^i/1000^(i+1); ... (End)

Examples

			0.0103092783505154639175257731...
		

References

  • Albert H. Beiler, Recreations in the theory of numbers, New York, Dover, (2nd ed.) 1966. See p. 77.

Crossrefs

Programs

A021116 Decimal expansion of 1/112.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

Same decimal period as A020806. - R. J. Mathar, Feb 13 2012

Examples

			0.0089285714285714...
		

Crossrefs

Cf. A020806.

Programs

  • Mathematica
    Join[{0,0},RealDigits[1/112,10,120][[1]]] (* or *) PadRight[{0,0,8,9},120,{5,7,1,4,2,8}] (* Harvey P. Dale, Apr 01 2014 *)
  • PARI
    1/112. \\ Charles R Greathouse IV, Feb 13 2012

A021228 Decimal expansion of 1/224.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

Same decimal period as A020806. - R. J. Mathar, Feb 13 2012

Examples

			0.0044642857142857..
		

Crossrefs

Cf. A020806.

Programs

  • Mathematica
    Join[{0,0},RealDigits[1/224 ,10,120][[1]]]  (* Harvey P. Dale, Apr 23 2011 *)

A021319 Decimal expansion of 1/315.

Original entry on oeis.org

0, 0, 3, 1, 7, 4, 6, 0, 3, 1, 7, 4, 6, 0, 3, 1, 7, 4, 6, 0, 3, 1, 7, 4, 6, 0, 3, 1, 7, 4, 6, 0, 3, 1, 7, 4, 6, 0, 3, 1, 7, 4, 6, 0, 3, 1, 7, 4, 6, 0, 3, 1, 7, 4, 6, 0, 3, 1, 7, 4, 6, 0, 3, 1, 7, 4, 6, 0, 3, 1, 7, 4, 6, 0, 3, 1, 7, 4, 6, 0, 3, 1, 7, 4, 6, 0, 3, 1, 7, 4, 6, 0, 3, 1, 7, 4, 6, 0, 3
Offset: 0

Views

Author

Keywords

Comments

If the initial 0 is ignored, a(n) is periodic with period 6: [0, 3, 1, 7, 4, 6]. - Wesley Ivan Hurt, Oct 10 2014

Examples

			1/315 = 0.0031746031746031746031746031...
		

Crossrefs

Programs

  • Maple
    Digits:=100: evalf(1/315); # Wesley Ivan Hurt, Oct 10 2014
  • Mathematica
    RealDigits[1/315, 10, 100, -1][[1]] (* Wesley Ivan Hurt, Oct 10 2014 *)
    Join[{0},LinearRecurrence[{1, 0, -1, 1},{0, 3, 1, 7},98]] (* Ray Chandler, Aug 26 2015 *)

Formula

a(n) = a(n-1)-a(n-3)+a(n-4) for n>0, with a(0)=0; a(n) = A068028(n+1)-1 for n>0; a(n+1) = A020806(n)-1. - Wesley Ivan Hurt, Oct 10 2014
G.f.: x^2*(-6*x^2 + 2*x - 3)/(x^4 - x^3 + x - 1). - Chai Wah Wu, Sep 04 2025

A021452 Decimal expansion of 1/448.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

Same decimal period as A020806. - R. J. Mathar, Feb 13 2012

Examples

			0.00223214285714285714285714285714285714285714285714...
		

Crossrefs

Cf. A020806.

Programs

  • Mathematica
    First[RealDigits[1/448, 10, 100, -1]] (* Paolo Xausa, Aug 15 2025 *)
Previous Showing 21-30 of 36 results. Next