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.

A192817 Numbers that are coprime to their 9's complement.

Original entry on oeis.org

1, 2, 4, 5, 7, 8, 10, 13, 14, 16, 17, 19, 20, 23, 25, 26, 28, 29, 31, 32, 34, 35, 37, 38, 40, 41, 43, 46, 47, 49, 50, 52, 53, 56, 58, 59, 61, 62, 64, 65, 67, 68, 70, 71, 73, 74, 76, 79, 80, 82, 83, 85, 86, 89, 91, 92, 94, 95, 97, 98, 100, 101, 103, 104, 106
Offset: 1

Views

Author

Alonso del Arte, Dec 01 2011

Keywords

Comments

If an integer is in this sequence, its 9's complement is in the sequence as well. No multiple of 3 is in this sequence. Multiples of 11 are in the sequence if they have an odd number of digits and they are not also multiples of 3.

Examples

			25 is in the sequence because its 9's complement is 74 and gcd(25, 74) = 1.
		

Crossrefs

Cf. A061601 (9's complement of n), A201462 (complement).

Programs

  • Haskell
    a192817 n = a192817_list !! (n-1)
    a192817_list = [x | x <- [1..], gcd x (a061601 x) == 1]
    -- Reinhard Zumkeller, Dec 03 2011
  • Magma
    [n: n in [1..106] | Gcd(10^#Intseq(n)-1,n) eq 1]; // Bruno Berselli, Dec 02 2011
    
  • Maple
    with(numtheory): P:=proc(q) local k,n; for n from 1 to q do for k from 1 to q do
    if type(((n-k)*10^(ilog10(n+k)+1)+n+k)/n,integer) then break; fi; od;
    if k=n then print(n); fi; od; end: P(10^4); # Paolo P. Lava, Nov 03 2014
  • Mathematica
    (* First run the program for A061601 to define nineComplement *) Select[Range[100], GCD[#, nineComplement[#]] == 1 &]