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.

A171869 a(n) is the period of A175555(n) in the sequence {A175555}.

Original entry on oeis.org

1, 2, 2, 2, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536, 131072, 262144, 524288, 1048576, 2097152, 4194304, 8388608, 16777216, 33554432, 67108864, 134217728, 268435456, 536870912, 1073741824, 2147483648, 4294967296
Offset: 1

Views

Author

Michel Lagneau, Dec 30 2009, Apr 22 2010

Keywords

Examples

			{A175555} = {5, 25, 375, 625, 59375, ...} =>
a(1) = 1 because A175555(1) = 5 occurs with the period 1 in the sequence A175555;
a(2) = 2 because A175555(2) = 25 occurs with the period 2 in the sequence A175555;
a(3) = 2 because A175555(3) = 375 occurs with the period 2 in the sequence A175555.
		

Crossrefs

Programs

  • Maple
    nn:=2000:Digits:=nn:T:=array(1..nn):for n from 1 to nn do: T[n]:= irem(floor((1.5 ^n)*10^n),10^n): od: for a from 1 to nn do: z1:=T[a]: ii:=0:k:=0:for b from a+1 to nn while(ii)=0 do:k:=k+1:  z2:=irem(T[b],10^a): if z1=z2 then ii:=1:printf(`%d, `, k): else fi:od:od:

Formula

a(n) = 2^(n-4) if n > = 5.

Extensions

More terms and edits. - Michel Lagneau, Jul 14 2012

A114205 Write decimal expansion of 1/n as 0.PPP...PQQQ..., where QQQ... is the cyclic part. If the expansion does not terminate, any leading 0's in QQQ... are regarded as being at the end of the PPP...P part. Sequence gives PPP...P, right justified, with leading zeros omitted.

Original entry on oeis.org

5, 0, 25, 2, 1, 0, 125, 0, 1, 0, 8, 0, 0, 0, 625, 0, 0, 0, 5, 0, 0, 0, 41, 4, 0, 0, 3, 0, 0, 0, 3125, 0, 0, 0, 2, 0, 0, 0, 25, 0, 0, 0, 2, 0, 0, 0, 208, 0, 2, 0, 1, 0, 0, 0, 17, 0, 0, 0, 1, 0, 0, 0, 15625, 0, 0, 0, 1, 0, 0, 0, 13, 0, 0, 1, 1, 0, 0, 0, 125, 0, 0, 0, 1, 0, 0, 0, 11, 0, 0, 0, 10
Offset: 2

Views

Author

N. J. A. Sloane, Oct 17 2006

Keywords

Comments

b(n) = A386406(n) gives the length of P (including leading zeros), c(n) = A036275(n) gives the smallest cycle in QQQ... (including terminating zeros) and d(n) = A051626(n) gives the length of that cycle.
Thus 1/n = 10^(-b(n)) * ( a(n) + c(n)/(10^d(n) - 1) ). When c(n)=d(n)=0, the fraction c(n)/(10^d(n) - 1), which is 0/0, evaluates (by definition) to 0.

Examples

			n .. expansion of 1/n .... a b c d
2 .50000000000000000000... 5 1 0 0
3 .33333333333333333333... 0 0 3 1
4 .25000000000000000000... 25 2 0 0
5 .20000000000000000000... 2 1 0 0
6 .16666666666666666667... 1 1 6 1
7 .14285714285714285714... 0 0 142857 6
8 .12500000000000000000... 125 3 0 0
9 .11111111111111111111... 0 0 1 1
10 .1000000000000000000... 1 1 0 0
11 .0909090909090909090... 0 1 90 2
12 .0833333333333333333... 8 2 3 1
13 .0769230769230769230... 0 1 769230 6
14 .0714285714285714285... 0 1 714285 6
15 .0666666666666666666... 0 1 6 1
16 .0625000000000000000... 625 4 0 0
(Start)
92 .0108695652173913043... 10  3 869...260 22
102 .009803921568627450... 0   2 980...450 16
416 .002403846153846153... 240 5 384615    6
4544 .00022007042253521... 2200 7 704...450 35
(End) - _Ruud H.G. van Tol_, Nov 20 2024
		

Crossrefs

Programs

  • Maple
    A114205 := proc(n) local sh,lpow,mpow,a,b ; lpow:=1 ; while true do for mpow from lpow-1 to 0 by -1 do if (10^lpow-10^mpow) mod n =0 then a := (10^lpow-10^mpow)/n ; sh := 10^(lpow-mpow)-1 ; b := a mod sh ; a := floor(a/sh) ; while b>0 and b*10 < sh+1 do a := 10*a ; b := 10*b ; end ; RETURN(a) ; fi ; od ; lpow := lpow+1 ; od ; end: for n from 2 to 600 do printf("%d %d ",n,A114205(n)) ; od ; # R. J. Mathar, Oct 19 2006
  • Mathematica
    fa[n_] := Block[{p},p = First[RealDigits[1/n]];If[ ! IntegerQ[Last[p]], p =  Join[Most[p],TakeWhile[Last[p],#==0&]]];FromDigits[p]];Table[fa[n], {n, 100}] (* Ray Chandler, Oct 18 2006 *)
  • PARI
    a(n)= my(s=max(valuation(n, 2), valuation(n, 5))); s||return(0); my([p, r]= divrem(10^s, n)); if(r&&(r=n\r)>9, s+=logint(r, 10)); 10^s\n; \\ Ruud H.G. van Tol, Nov 19 2024

Extensions

More terms from Ray Chandler and Hans Havermann, Oct 18 2006
I would also like to get programs that produce this and A114206, A036275, A051626 in Maple.
Edited by Andrei Zabolotskii, Jul 20 2025

A175557 Prime preperiodic part of the decimal expansion of 1/k as k runs through A065502.

Original entry on oeis.org

5, 2, 5, 41, 3, 2, 2, 2, 17, 13, 11, 89, 7, 5, 5, 5, 41, 3, 3, 347, 3, 3, 3, 29, 2, 2, 2, 2, 26041, 2, 2, 2, 23, 2, 2, 2, 2, 2, 17, 13, 13, 1201, 11, 11, 107, 919, 89, 7, 7, 7, 7, 7, 7, 61, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 41, 4111, 3
Offset: 1

Views

Author

Michel Lagneau, Jun 30 2010

Keywords

Comments

Primes in A175555 in the order of appearance.
Multiples of 2 or 5 generate a quotient with a preperiodic sequence of digits, for example 1/24 = 0.041666666..., and 41 is the decimal form of the preperiodic part.
The corresponding values of n are: 2, 5, 20, 24, 28, 36, 44, 50, 56, 72, 88, 112, 136, 168, 184, ...

Examples

			The prime 347 is in the sequence because 1/288 = .00347222222222222222...
The prime 1201 is in the sequence because 1/832 =.001201 923076 923076 ...
		

References

  • H. Rademacher and O. Toeplitz, Von Zahlen und Figuren (Springer 1930, reprinted 1968), ch. 19, 'Die periodischen Dezimalbrueche'.

Crossrefs

Programs

  • Maple
    for n from 1 do
        p := A175555(n) ;
        if isprime(p) then
            print(p) ;
        end if;
    end do: # R. J. Mathar, Jul 22 2012

A179192 Numbers n, not relatively prime to 10, such that the decimal form of the period of 1/n is prime.

Original entry on oeis.org

12, 18, 30, 36, 45, 48, 75, 120, 180, 192, 198, 270, 288, 300, 330, 360, 450, 480, 495, 750, 768, 1152, 1200, 1584, 1800, 1875, 1920, 1980, 1998, 2304, 2700, 2880, 3000, 3072, 3300, 3330, 3600, 3690, 4500, 4800, 4950, 4995, 5625, 7500, 7680, 9090, 11520, 12000, 12288, 15840, 18000, 18432, 18750, 19200, 19800, 19980, 19998
Offset: 1

Views

Author

Michel Lagneau, Jul 01 2010

Keywords

Comments

The sequence A175545 (numbers n such that the decimal form of the period of 1/n is prime) is only concerned with numbers n such that gcd(n,10)=1. Each number n such that gcd(n,10)<>1 generates a quotient where there exist a sequence of digits which is periodic after a finite sequence of digits, for example 1/36 = .0277777.... and 7 is periodic.
The prime numbers corresponding to this sequence are :
3, 5, 3, 7, 2, 3, 3, 3, 5, 3, 5, 37, 2, 3, 3, 7, 2, 3, 2,...

Examples

			1584 is in the sequence because 1/1584 = .0006313131313131313131... and 31 is prime.
		

References

  • H. Rademacher and O. Toeplitz, Von Zahlen und Figuren (Springer 1930, reprinted 1968), ch. 19, 'Die periodischen Dezimalbrueche'.

Crossrefs

Programs

  • Mathematica
    Reap[Do[p=RealDigits[1/n][[1,-1]]; If[GCD[10,n]>1 && Head[p] === List, While[p[[-1]] == 0, p=Most[p]]; If[PrimeQ[FromDigits[p]], Sow[n]]], {n, 20000}]][[2,1]]

Formula

Union of A179192 and A175545 is A061564.

Extensions

Sequence corrected by T. D. Noe, Nov 18 2010
Showing 1-4 of 4 results.