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 11-20 of 30 results. Next

A097326 Largest integer m such that m*n has the same decimal digit length as n.

Original entry on oeis.org

9, 4, 3, 2, 1, 1, 1, 1, 1, 9, 9, 8, 7, 7, 6, 6, 5, 5, 5, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 9, 9, 9, 9, 9, 9
Offset: 1

Views

Author

Rick L. Shepherd, Aug 04 2004

Keywords

Comments

For any positive base B >= 2 the corresponding sequence contains only terms from 1 to B-1 inclusive so the corresponding sequence for binary is all 1's (A000012).

Examples

			a(12)=8 as 12 and 8*12=96 both have two decimal digits while 9*12=108 has three.
		

Crossrefs

Cf. A061601 (analog for decimal m+n), A035327 (analog for binary m+n), A097327.
Cf. A055642.

Programs

  • Mathematica
    limn[n_]:=Module[{k=9,len=IntegerLength[n]},While[IntegerLength[k*n] > len, k--];k]; Array[limn,110] (* Harvey P. Dale, Apr 28 2018 *)
    Table[Ceiling[10^IntegerLength[n]/n] - 1, {n, 100}] (* Paolo Xausa, Nov 06 2024 *)
  • PARI
    a(n) = my(m=1, sn=#Str(n)); while (#Str(m*n) <= sn, m++); m-1; \\ Michel Marcus, Oct 05 2021
  • Python
    def a(n): return (10**len(str(n))-1)//n
    print([a(n) for n in range(1, 106)]) # Michael S. Branicky, Oct 05 2021
    

Formula

a(n) = A097327(n) - 1.
a(n) = floor((10^A055642(n) - 1)/n). - Michael S. Branicky, Oct 05 2021

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 &]

A228628 9's complement of prime(n).

Original entry on oeis.org

7, 6, 4, 2, 88, 86, 82, 80, 76, 70, 68, 62, 58, 56, 52, 46, 40, 38, 32, 28, 26, 20, 16, 10, 2, 898, 896, 892, 890, 886, 872, 868, 862, 860, 850, 848, 842, 836, 832, 826, 820, 818, 808, 806, 802, 800, 788, 776, 772, 770, 766, 760, 758, 748, 742, 736, 730, 728
Offset: 1

Views

Author

Michel Lagneau, Aug 28 2013

Keywords

Comments

a(n) = 10^k - 1 - prime(n) where k is the number of digits in prime(n). If d is d digit in prime(n) replace it with 9 - d.

Examples

			a(6) = 86 because prime(6) = 13 and 9 - 1 = 8, 9 - 6 = 3.
		

Crossrefs

Programs

  • Maple
    a:= n-> (p-> 10^length(p)-p-1)(ithprime(n)):
    seq(a(n), n=1..100);  # Alois P. Heinz, Dec 08 2017
  • Mathematica
    nineComplement[n_] := FromDigits[Table[9, {Length[IntegerDigits[Prime[n]]]}] - IntegerDigits[Prime[n]]]; Table[nineComplement[n], {n, 1, 71}]
  • PARI
    a(n)=my(p=prime(n));10^#Str(p)-p-1 \\ Charles R Greathouse IV, Aug 29 2013
    
  • Python
    from sympy import primerange
    def nc(n): return 10**len(str(n)) - 1 - n
    def auptop(limit): return [nc(p) for p in primerange(1, limit+1)]
    print(auptop(271)) # Michael S. Branicky, Jul 06 2021

Formula

a(n) = A061601(A000040(n)). - Charles R Greathouse IV, Aug 29 2013
a(n) = A160668(n) - 1. Alois P. Heinz, Dec 08 2017

A378139 Smallest prime number such that the number of distinct prime factors with multiplicity of its 9's complement is equal to n. If no such number exists, return -1.

Original entry on oeis.org

2, 3, 23, 11, 19, 263, 167, 103, 487, 1039, 7951, 5903, 28319, 107071, 67231, 590399, 180799, 344639, 1480319, 12181759, 4757119, 10871039, 1611391, 140167679, 203082239, 228248063, 530237951, 1812718591, 5302379519, 13295347711, 12758476799, 132953477119, 1410065407
Offset: 1

Views

Author

Jean-Marc Rebert, Jan 08 2025

Keywords

Examples

			2 is prime, 9-2 = 7 and bigomega(7) = 1.
		

Crossrefs

Programs

  • PARI
    nc(n) = my(e=length(Str(n))); 10^e-1 - n; \\ A061601
    a(n) = my(p=2); while (bigomega(nc(p)) != n, p = nextprime(p+1)); p; \\ Michel Marcus, Jan 08 2025

A084019 a(n) = 9's complement of n-th palindrome (A002113).

Original entry on oeis.org

9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 88, 77, 66, 55, 44, 33, 22, 11, 0, 898, 888, 878, 868, 858, 848, 838, 828, 818, 808, 797, 787, 777, 767, 757, 747, 737, 727, 717, 707, 696, 686, 676, 666, 656, 646, 636, 626, 616
Offset: 1

Views

Author

Amarnath Murthy and Meenakshi Srikanth (menakan_s(AT)yahoo.com), May 23 2003

Keywords

Comments

Leading zeros in the 9's complement are omitted.
For palindromes of the form 10^k-1 the corresponding entry is zero. Apart from this the entries are distinct.

Examples

			The 20th palindromic number A002113(20) is 101 having 9's complement 898 (999 - 101 = 898). So a(20) = 898. - _Indranil Ghosh_, Jan 30 2017
		

Crossrefs

Programs

  • Python
    # Program for generating the b-file
    def a(n):
        return 10**len(str(n))-n-1
    i=0
    j=1
    while j<=250:
        if i==int(str(i)[::-1]):
            print(str(j)+" "+str(a(i)))
            j+=1
        i+=1 # Indranil Ghosh, Jan 30 2017
    
  • Python
    def A084019(n):
        if n == 1: return 9
        y = 10*(x:=10**(len(str(n>>1))-1))
        if nChai Wah Wu, Jun 13 2024

A109910 a(n) = 9's complement of digit reversal of n.

Original entry on oeis.org

9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 8, 88, 78, 68, 58, 48, 38, 28, 18, 8, 7, 87, 77, 67, 57, 47, 37, 27, 17, 7, 6, 86, 76, 66, 56, 46, 36, 26, 16, 6, 5, 85, 75, 65, 55, 45, 35, 25, 15, 5, 4, 84, 74, 64, 54, 44, 34, 24, 14, 4, 3, 83, 73, 63, 53, 43, 33, 23, 13, 3, 2
Offset: 0

Views

Author

Amarnath Murthy, Jul 16 2005

Keywords

Examples

			a(17) = 28. Digit reversal of 17 = 71, 9's complement of 71 is 99-71 = 28.
		

Crossrefs

Programs

  • Maple
    R := proc(n) local nn, nnn: nn:=convert(n, base, 10): add(nn[nops(nn)+1-j]*10^(j-1), j=1..nops(nn)): end:
    A109910 := proc(n) return 10^length(max(R(n),1)) - R(n) - 1: end:
    seq(A109910(n),n=0..70); # Nathaniel Johnston, Apr 28 2011
  • Mathematica
    Table[10^If[# == 0, 1, IntegerLength@ #] - 1 - # &@ FromDigits@ Reverse@ IntegerDigits@ n, {n, 0, 70}] (* Michael De Vlieger, Feb 01 2017 *)
  • Python
    def A109910(n):
        x=int(str(n)[::-1])
        return 10**len(str(x))-1-x # Indranil Ghosh, Jan 30 2017

Formula

a(n) = A061601(A004086(n)). - Indranil Ghosh, Jan 30 2017

A111708 a(n) = n concatenated with 9's complement of n.

Original entry on oeis.org

9, 18, 27, 36, 45, 54, 63, 72, 81, 90, 1089, 1188, 1287, 1386, 1485, 1584, 1683, 1782, 1881, 1980, 2079, 2178, 2277, 2376, 2475, 2574, 2673, 2772, 2871, 2970, 3069, 3168, 3267, 3366, 3465, 3564, 3663, 3762, 3861, 3960, 4059, 4158, 4257, 4356, 4455, 4554
Offset: 0

Views

Author

Amarnath Murthy, Aug 22 2005

Keywords

Comments

If n has k digits a(n) is a multiple of 10^k -1.
The sequence contains 10^(k) multiples of 10^k -1.
a(n)/{10^k -1} gives all natural numbers.
All terms are multiples of 9: A007953(a(n))=9*A055642(n); A010888(a(n))=9. - Reinhard Zumkeller, Sep 17 2015

Examples

			a(90) = 9009.
		

Crossrefs

Cf. A061601, A010888, A007953, A055642, subsequence of A262277.

Programs

  • Haskell
    a111708 0 = 9
    a111708 n = f [] n where
       f ys 0 = foldl (\v d -> 10 * v + d) 0 $ ys ++ map (9 -) ys
       f ys x = f (d : ys) x' where (x', d) = divMod x 10
    -- Reinhard Zumkeller, Sep 17 2015

Extensions

More terms from Joshua Zucker, May 08 2006
Definition cleared and offset changed by Reinhard Zumkeller, Sep 17 2015

A201462 Numbers that are not coprime to their 9's complement.

Original entry on oeis.org

3, 6, 9, 11, 12, 15, 18, 21, 22, 24, 27, 30, 33, 36, 39, 42, 44, 45, 48, 51, 54, 55, 57, 60, 63, 66, 69, 72, 75, 77, 78, 81, 84, 87, 88, 90, 93, 96, 99, 102, 105, 108, 111, 114, 117, 120, 123, 126, 129, 132, 135, 138, 141, 144, 147, 148, 150, 153, 156, 159
Offset: 1

Views

Author

Alonso del Arte, Dec 01 2011

Keywords

Comments

All multiples of 3 are in this sequence. Multiples of 11 are in this sequence if they have an even number of digits or if they are also multiples of 3.

Examples

			22 is in the sequence because its 9's complement is 77 and gcd(22, 77) = 11 > 1.
		

Crossrefs

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

Programs

  • Haskell
    a201462 n = a201462_list !! (n-1)
    a201462_list = [x | x <- [1..], gcd x (a061601 x) > 1]
    -- Reinhard Zumkeller, Dec 03 2011
  • Magma
    [n: n in [3..159] | Gcd(10^#Intseq(n)-1,n) gt 1]; // Bruno Berselli, Dec 02 2011
    
  • Mathematica
    (* First run the program for A061601 to define nineComplement *) Select[Range[200], GCD[#, nineComplement[#]] > 1 &]

A262277 Numbers having in decimal representation the same distinct decimal digits as their 9's complement.

Original entry on oeis.org

18, 27, 36, 45, 54, 63, 72, 81, 90, 118, 181, 188, 227, 272, 277, 336, 363, 366, 445, 454, 455, 544, 545, 554, 633, 636, 663, 722, 727, 772, 811, 818, 881, 900, 909, 990, 1089, 1098, 1118, 1181, 1188, 1278, 1287, 1368, 1386, 1458, 1485, 1548, 1584, 1638
Offset: 1

Views

Author

Reinhard Zumkeller, Sep 17 2015

Keywords

Comments

If d is a digit of any term then also 9 - d;

Crossrefs

Cf. A061601, A227362, subsequences: A111708, A050278, A171102.

Programs

  • Haskell
    import Data.List (nub, sort)
    a262277 n = a262277_list !! (n-1)
    a262277_list = filter f [1..] where
       f x = sort ds' == sort (map (9 -) ds') where
         ds' = nub $ ds x
         ds 0 = []; ds z = d : ds z' where (z', d) = divMod z 10
    
  • PARI
    isok(m) = my(d=digits(m), c=apply(x->9-x, d)); Set(d) == Set(c); \\ Michel Marcus, Jan 22 2022

Formula

A227362(A061601(a(n))) = A227362(a(n)).

A284811 Fixed points of the transform A267193.

Original entry on oeis.org

18, 27, 36, 45, 54, 63, 72, 81, 90, 1098, 1188, 1278, 1368, 1458, 1548, 1638, 1728, 1818, 1908, 2097, 2187, 2277, 2367, 2457, 2547, 2637, 2727, 2817, 2907, 3096, 3186, 3276, 3366, 3456, 3546, 3636, 3726, 3816, 3906, 4095, 4185, 4275, 4365, 4455, 4545, 4635, 4725
Offset: 1

Views

Author

Paolo P. Lava, Apr 05 2017

Keywords

Comments

These numbers are called antipalindromic in base 10 by Dvorakova et al. - Michel Marcus, Aug 18 2020

Examples

			1278 is a term of the sequence because its complement in base 10 is 8721 and the digit reversal is again 1278.
		

Crossrefs

Subsequence of A008591 (multiples of 9).

Programs

  • Maple
    P:=proc(q,h) local a,b,k,n; for n from 1 to q do a:=convert(n,base,h); b:=0;
    for k from 1 to nops(a) do a[k]:=h-1-a[k]; b:=h*b+a[k]; od; if b=n then print(n); fi; od; end: P(10^2,10);
  • PARI
    isok(m) = {my(d=digits(m)); for (j=1, #d, if (d[j] + d[#d+1-j] != 9, return(0));); return (1);} \\ Michel Marcus, Aug 18 2020
    
  • PARI
    a(n) = my (d=digits(n)); n*10^#d + fromdigits(apply (t -> 9-t, Vecrev(d))) \\ Rémy Sigrist, Aug 18 2020
Previous Showing 11-20 of 30 results. Next