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-2 of 2 results.

A187041 Numbers for which Midy's theorem does not hold.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 8, 9, 10, 12, 15, 16, 18, 20, 21, 24, 25, 27, 30, 31, 32, 33, 36, 37, 39, 40, 41, 42, 43, 45, 48, 50, 51, 53, 54, 57, 60, 62, 63, 64, 66, 67, 69, 71, 72, 74, 75, 78, 79, 80, 81, 82, 83, 84, 86, 87, 90, 93, 96, 99, 100, 102, 105, 106, 107, 108, 111, 114, 117, 119, 120, 123, 124, 125, 126, 128, 129, 132, 134, 135, 138, 141, 142, 144, 147, 148, 150
Offset: 1

Views

Author

Jani Melik, Mar 02 2011

Keywords

Crossrefs

Programs

  • Maple
    fct1 := proc(an) local i,st:  st := 0:
    for i from 1 to nops(an)/2 do
       st := op(i,an)*10^(nops(an)/2-i) + st
    od: RETURN(st):  end:
    fct2 := proc(an) local i,st:  st := 0:
    for i from nops(an)/2+1 to nops(an) do
       st := op(i,an)*10^(nops(an)/2-i+nops(an)/2) + st
    od:  RETURN(st):  end:
    A187041 := proc(n) local st:
    st := op(4,numtheory[pdexpand](1/n));
    if (modp(nops(st),2) <> 0 or nops(st) = 1 or n = 1) then
         RETURN(n)
    elif (modp(nops(st),2) = 0) then
       if not(10^(nops(st)/2)-1 - (fct1(st)+fct2(st)) = 0) then
           RETURN(n)
    fi: fi: end:  seq(A187041(n), n=1..250);
  • Mathematica
    okQ[n_] := Module[{ps = First /@ FactorInteger[n], d, len}, If[n < 2 || Complement[ps, {2, 5}] == {}, False, d = RealDigits[1/n, 10][[1, -1]]; len = Length[d]; EvenQ[len] && Union[Total[Partition[d, len/2]]] == {9}]]; Select[Range[300], ! okQ[#] &] (* T. D. Noe, Mar 02 2011 *)

Extensions

Corrected by T. D. Noe, Mar 02 2011

A216664 Odd numbers n such that the decimal expansion of 1/n contains the digit "9" at position (n + 1)/2.

Original entry on oeis.org

11, 17, 19, 23, 29, 47, 59, 61, 73, 91, 95, 97, 101, 103, 109, 113, 127, 131, 137, 139, 149, 167, 179, 181, 189, 193, 211, 223, 229, 233, 251, 255, 257, 263, 269, 313, 325, 331, 337, 349, 353, 367, 379, 383, 389, 419, 421, 433, 441, 457, 461, 463, 477, 487, 491
Offset: 1

Views

Author

Arkadiusz Wesolowski, Sep 14 2012

Keywords

Comments

First nine terms are primes.
This is not a subsequence of A187040: 189 belongs to this sequence but not to A187040.

Examples

			1/17 = .058823529..., therefore 17 is a term.
1/21 = .04761904761..., therefore 21 is not a term.
		

Crossrefs

Cf. A187040.

Programs

  • Mathematica
    lst = {}; Do[l = (n + 1)/2; d = Flatten@RealDigits[1/n, 10, l]; If[Join[Table[0, {-1*Last@d}], Most@d][[l]] == 9, AppendTo[lst, n]], {n, 1, 491, 2}]; lst
  • PARI
    forstep(n=1, 491, 2, s=(n+1)/2; "\p s"; if(Mod(floor(10^s/n), 10)==9, print1(n, ", "))); \\ Arkadiusz Wesolowski, Aug 23 2013
    
  • Python
    from itertools import count, islice
    def A216664_gen(startvalue=1): # generator of terms >= startvalue
        for n in count(max(startvalue+1-startvalue%2,1),2):
            if 10**((n+1)//2)//n % 10 == 9:
                yield n
    A216664_list = list(islice(A216664_gen(),20)) # Chai Wah Wu, Mar 04 2022
Showing 1-2 of 2 results.