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

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

A061601 9's complement of n: a(n) = 10^d - 1 - n where d is the number of digits in n. If a is a digit in n replace it with 9 - a.

Original entry on oeis.org

9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 89, 88, 87, 86, 85, 84, 83, 82, 81, 80, 79, 78, 77, 76, 75, 74, 73, 72, 71, 70, 69, 68, 67, 66, 65, 64, 63, 62, 61, 60, 59, 58, 57, 56, 55, 54, 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, 28
Offset: 0

Views

Author

Amarnath Murthy, May 19 2001

Keywords

Comments

A109002 and A178500 give record values and where they occur: A109002(n+1)=a(A178500(n)) and a(m)<A109002(n+1) for m<A178500(n). - Reinhard Zumkeller, May 28 2010
If n is divisible by 3, so is a(n). The same goes for 9. - Alonso del Arte, Dec 01 2011
For n > 0, a(n-1) consists of the A055642(n) least significant digits of the 10-adic integer -n. - Stefano Spezia, Jan 21 2021

Examples

			a(7) = 2 = 10 - 1 -7. a(123) = 1000 -1 -123 = 876.
		

References

  • Kjartan Poskitt, Murderous Maths: Numbers, The Key to the Universe, Scholastic Ltd, 2002. See p 159.

Crossrefs

Cf. A055120.
See A267193 for complement obverse of n.

Programs

  • Haskell
    a061601 n = if n <= 9 then 9 - n else 10 * ad n' + 9 - d
                where (n',d) = divMod n 10
    -- Reinhard Zumkeller, Feb 21 2014, Oct 04 2011
    
  • Maple
    A061601 := proc(n)
            10^A055642(n)-1-n ;
    end proc: # R. J. Mathar, Nov 30 2011
  • Mathematica
    nineComplement[n_] := FromDigits[Table[9, {Length[IntegerDigits[n]]}] - IntegerDigits[n]]; Table[nineComplement[n], {n, 0, 71}] (* Alonso del Arte, Nov 30 2011 *)
  • PARI
    A061601(n)=my(e=length(Str(n)));10^e-1 - n; \\ Joerg Arndt, Aug 28 2013
    
  • Python
    def A061601(n):
        return 10**len(str(n))-1-n # Indranil Ghosh, Jan 30 2017

Formula

a(n) = if n<10 then 9 - n else 10*a([n/10]) + 9 - n mod 10. - Reinhard Zumkeller, Jan 20 2010
a(n) <= 9n - 1. - Charles R Greathouse IV, Nov 15 2022

Extensions

Corrected and extended by Matthew Conroy, Jan 19 2002

A284797 Write in base k, complement, reverse. Case k = 3.

Original entry on oeis.org

2, 1, 0, 7, 4, 1, 6, 3, 0, 25, 16, 7, 22, 13, 4, 19, 10, 1, 24, 15, 6, 21, 12, 3, 18, 9, 0, 79, 52, 25, 70, 43, 16, 61, 34, 7, 76, 49, 22, 67, 40, 13, 58, 31, 4, 73, 46, 19, 64, 37, 10, 55, 28, 1, 78, 51, 24, 69, 42, 15, 60, 33, 6, 75, 48, 21, 66, 39, 12, 57, 30
Offset: 0

Views

Author

Paolo P. Lava, Apr 03 2017

Keywords

Examples

			a(9) = 25 because 9 in base 3 is 100, its complement in base 3 is 122 and the digit reverse is 221 that is 25 in base 10.
		

Crossrefs

Programs

  • Maple
    P:=proc(q,h) local a,b,k,n; print(h-1); 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; print(b); od; end: P(10^2,3);
  • Mathematica
    Table[FromDigits[Reverse[2-IntegerDigits[n,3]],3],{n,0,70}] (* Harvey P. Dale, Sep 08 2019 *)
  • Python
    from gmpy2 import digits
    def A284797(n): return -int((s:=digits(n,3)[::-1]),3)-1+3**len(s) # Chai Wah Wu, Feb 04 2022

A284799 Write in base k, complement, reverse. Case k = 4.

Original entry on oeis.org

3, 2, 1, 0, 14, 10, 6, 2, 13, 9, 5, 1, 12, 8, 4, 0, 62, 46, 30, 14, 58, 42, 26, 10, 54, 38, 22, 6, 50, 34, 18, 2, 61, 45, 29, 13, 57, 41, 25, 9, 53, 37, 21, 5, 49, 33, 17, 1, 60, 44, 28, 12, 56, 40, 24, 8, 52, 36, 20, 4, 48, 32, 16, 0, 254, 190, 126, 62, 238, 174
Offset: 0

Views

Author

Paolo P. Lava, Apr 03 2017

Keywords

Examples

			a(16) = 62 because 16 in base 4 is 100, its complement in base 4 is 233 and the digit reverse is 332 that is 64 in base 10.
		

Crossrefs

Programs

  • Maple
    P:=proc(q,h) local a,b,k,n; print(h-1); 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; print(b); od; end: P(10^2,4);
  • Mathematica
    With[{k = 4}, Array[FromDigits[Reverse[k - IntegerDigits[#, k] - 1], k] &, 70, 0]] (* Michael De Vlieger, Feb 04 2022 *)
  • Python
    from gmpy2 import digits
    def A284799(n): return -int((s:=digits(n,4)[::-1]),4)-1+4**len(s) # Chai Wah Wu, Feb 04 2022

Formula

a(a(n))=n unless n == 3 (mod 4). - Robert Israel, Apr 01 2020

A284807 Write in base k, complement, reverse. Case k = 8.

Original entry on oeis.org

7, 6, 5, 4, 3, 2, 1, 0, 62, 54, 46, 38, 30, 22, 14, 6, 61, 53, 45, 37, 29, 21, 13, 5, 60, 52, 44, 36, 28, 20, 12, 4, 59, 51, 43, 35, 27, 19, 11, 3, 58, 50, 42, 34, 26, 18, 10, 2, 57, 49, 41, 33, 25, 17, 9, 1, 56, 48, 40, 32, 24, 16, 8, 0, 510, 446, 382, 318, 254
Offset: 0

Views

Author

Paolo P. Lava, Apr 03 2017

Keywords

Examples

			a(16) = 61 because 16 in base 8 is 20, its complement in base 8 is 57 and the digit reverse is 75 that is 61 in base 10.
		

Crossrefs

Programs

  • Maple
    P:=proc(q,h) local a,b,k,n; print(h-1); 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; print(b); od; end: P(10^2,8);
  • Mathematica
    With[{k = 8}, Array[FromDigits[Reverse[k - IntegerDigits[#, k] - 1], k] &, 69, 0]] (* Michael De Vlieger, Feb 04 2022 *)
  • Python
    def A284807(n): return -int((s:=oct(n)[-1:1:-1]),8)-1+8**len(s) # Chai Wah Wu, Feb 04 2022

Extensions

Offset corrected by Chai Wah Wu, Feb 04 2022

A284801 Write in base k, complement, reverse. Case k = 5.

Original entry on oeis.org

4, 3, 2, 1, 0, 23, 18, 13, 8, 3, 22, 17, 12, 7, 2, 21, 16, 11, 6, 1, 20, 15, 10, 5, 0, 123, 98, 73, 48, 23, 118, 93, 68, 43, 18, 113, 88, 63, 38, 13, 108, 83, 58, 33, 8, 103, 78, 53, 28, 3, 122, 97, 72, 47, 22, 117, 92, 67, 42, 17, 112, 87, 62, 37, 12, 107, 82
Offset: 0

Views

Author

Paolo P. Lava, Apr 03 2017

Keywords

Examples

			a(11) = 17 because 11 in base 5 is 21, its complement in base 5 is 23 and the digit reverse is 32 that is 17 in base 10.
		

Crossrefs

Programs

  • Maple
    P:=proc(q,h) local a,b,k,n; print(h-1); 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; print(b); od; end: P(10^2,5);

A284803 Write in base k, complement, reverse. Case k = 6.

Original entry on oeis.org

5, 4, 3, 2, 1, 0, 34, 28, 22, 16, 10, 4, 33, 27, 21, 15, 9, 3, 32, 26, 20, 14, 8, 2, 31, 25, 19, 13, 7, 1, 30, 24, 18, 12, 6, 0, 214, 178, 142, 106, 70, 34, 208, 172, 136, 100, 64, 28, 202, 166, 130, 94, 58, 22, 196, 160, 124, 88, 52, 16, 190, 154, 118, 82, 46
Offset: 0

Views

Author

Paolo P. Lava, Apr 03 2017

Keywords

Examples

			a(13) = 27 because 13 in base 6 is 21, its complement in base 6 is 34 and the digit reverse is 43 that is 27 in base 10.
		

Crossrefs

Programs

  • Maple
    P:=proc(q,h) local a,b,k,n; print(h-1); 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; print(b); od; end: P(10^2,6);
  • Mathematica
    Table[FromDigits[Reverse[5-IntegerDigits[n,6]],6],{n,0,70}] (* Harvey P. Dale, Jan 05 2020 *)

Extensions

Example corrected by Harvey P. Dale, Jan 05 2020

A284805 Write in base k, complement, reverse. Case k = 7.

Original entry on oeis.org

6, 5, 4, 3, 2, 1, 0, 47, 40, 33, 26, 19, 12, 5, 46, 39, 32, 25, 18, 11, 4, 45, 38, 31, 24, 17, 10, 3, 44, 37, 30, 23, 16, 9, 2, 43, 36, 29, 22, 15, 8, 1, 42, 35, 28, 21, 14, 7, 0, 341, 292, 243, 194, 145, 96, 47, 334, 285, 236, 187, 138, 89, 40, 327, 278, 229, 180
Offset: 0

Views

Author

Paolo P. Lava, Apr 03 2017

Keywords

Examples

			a(14) = 46 because 14 in base 7 is 20, its complement in base 7 is 46 and the digit reverse is 64 that is 46 in base 10.
		

Crossrefs

Programs

  • Maple
    P:=proc(q,h) local a,b,k,n; print(h-1); 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; print(b); od; end: P(10^2,7);

A284809 Write in base k, complement, reverse. Case k = 9.

Original entry on oeis.org

8, 7, 6, 5, 4, 3, 2, 1, 0, 79, 70, 61, 52, 43, 34, 25, 16, 7, 78, 69, 60, 51, 42, 33, 24, 15, 6, 77, 68, 59, 50, 41, 32, 23, 14, 5, 76, 67, 58, 49, 40, 31, 22, 13, 4, 75, 66, 57, 48, 39, 30, 21, 12, 3, 74, 65, 56, 47, 38, 29, 20, 11, 2, 73, 64, 55, 46, 37, 28, 19
Offset: 0

Views

Author

Paolo P. Lava, Apr 03 2017

Keywords

Examples

			a(14) = 34 because 14 in base 9 is 15, its complement in base 9 is 73 and the digit reverse is 37 that is 34 in base 10.
		

Crossrefs

Programs

  • Maple
    P:=proc(q,h) local a,b,k,n; print(h-1); 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; print(b); od; end: P(10^2,9);
  • Mathematica
    Table[FromDigits[Reverse[8-#&/@IntegerDigits[n,9]],9],{n,0,70}] (* Harvey P. Dale, Mar 12 2023 *)
Showing 1-9 of 9 results.