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.

Showing 1-4 of 4 results.

A048963 Table in which n-th row lists digits in periodic part of decimal expansion of reciprocal of n-th prime.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

The length of row n is A048595(n). - T. D. Noe, May 14 2008
The convention is that the earliest period is displayed. - T. D. Noe, May 14 2008
Conjecture: regarded as a decimal fraction, this number is normal in base 10. - Franklin T. Adams-Watters, Aug 20 2012

Examples

			1/2=.5 ->0; 1/3=.3333... -> 3; 1/5=.2 ->0; 1/7=.142857... -> 1 4 2 8 5 7; etc.
0; 3; 0; 1,4,2,8,5,7; 0,9; 7,6,9,2,3,0; 5,8,8,2,3,5,2,9,4,1,1,7,6,4,7,0; ...
		

References

  • Conway and Guy, The Book of Numbers, p. 160

Crossrefs

Cf. A048962.

Programs

  • Mathematica
    Clear[d]; d[{{2|5}, 0}] = {0}; d[{{{n__}}, 0}] := {n}; d[{{{n__, 0}}, k_?Negative}] := Join[Table[0, {-k}], Drop[{n}, k+1]]; A048963 = d /@ RealDigits[1/Prime[Range[10]]] (* Jean-François Alcover, Dec 10 2014 *)

A048997 Sum of digits in decimal expansion of 1/n up to the point where it repeats for the first time.

Original entry on oeis.org

1, 5, 3, 7, 2, 7, 27, 8, 1, 1, 9, 11, 27, 27, 6, 13, 72, 5, 81, 5, 27, 9, 99, 11, 4, 27, 10, 30, 126, 3, 54, 11, 3, 72, 27, 9, 9, 81, 18, 7, 18, 27, 90, 11, 2, 99, 207, 13, 189, 2, 69, 28, 63, 14, 9, 35, 81, 126, 261, 7, 270, 54, 24, 19, 27, 6, 144, 73, 96, 27, 126, 12, 36, 9, 4
Offset: 1

Views

Author

Deepak R. N (deepak_rama(AT)bigfoot.com)

Keywords

Examples

			1/1=1. -> 1; 1/2=.5 ->5; 1/3=.3333... -> 3; 1/4=.25 -> 7; 1/5=.2 ->2; 1/6=.1666... -> 7; 1/7=.142857... -> 27; etc.
		

Crossrefs

Cf. A048962.

Programs

  • Mathematica
    Table[Total[Flatten[RealDigits[1/n][[1]]]], {n, 1, 75}] (* Jean-François Alcover, Mar 15 2011 *)

Extensions

More terms from Antonio G. Astudillo (afg_astudillo(AT)hotmail.com), Jun 17 2001

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.

A079483 Array read by rows in which n-th row lists the periodic part of the base-n expansion of 1/7.

Original entry on oeis.org

0, 0, 1, 0, 1, 0, 2, 1, 2, 0, 2, 1, 0, 3, 2, 4, 1, 2, 0, 5, 0, 1, 1, 2, 5, 1, 4, 2, 8, 5, 7, 1, 6, 3, 1, 8, 6, 10, 3, 5, 1, 11, 0, 2, 2, 4, 9, 2, 7, 4, 14, 9, 12, 2, 10, 5, 2, 13, 10, 16, 5, 8, 2, 17, 0, 3, 3, 6, 13, 3, 10, 6, 20, 13, 17, 3, 14, 7, 3, 18, 14
Offset: 2

Views

Author

Stephen K. Johnson, Jan 17 2003

Keywords

Examples

			In base 2, 1/111_2 = 0.001001001001 ..., where 111_2 = 7; the periodic part is 0 0 1, so these form the first three digits. The periodic portions in the next few bases are 010212 (base 3), 021 (base 4), etc.
Array begins:
  0, 0, 1;
  0, 1, 0, 2, 1, 2;
  0, 2, 1;
  0, 3, 2, 4, 1, 2;
  0, 5;
  ...
		

Crossrefs

Extensions

More terms from Sean A. Irvine, Aug 16 2025
Showing 1-4 of 4 results.