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.

A256303 Apply the transformation 0 -> 1 -> 2 -> 0 to the digits of n written in base 3; do not convert back to base 10.

Original entry on oeis.org

1, 2, 0, 21, 22, 20, 1, 2, 0, 211, 212, 210, 221, 222, 220, 201, 202, 200, 11, 12, 10, 21, 22, 20, 1, 2, 0, 2111, 2112, 2110, 2121, 2122, 2120, 2101, 2102, 2100, 2211, 2212, 2210, 2221, 2222, 2220, 2201, 2202, 2200, 2011, 2012, 2010, 2021, 2022, 2020, 2001
Offset: 0

Views

Author

M. F. Hasler, Mar 22 2015

Keywords

Comments

Base 3 variant of A256078 (base 2) and A048379 (base 10). See A256304 - A256308 for bases 4 through 8, A256289 for base 9, and A256293 for the variant where the result is converted back to base 10.

Examples

			a(3) = 21 because 3 = "10" (in base 3) becomes "21".
a(8) = 0 because 8 = "22" (in base 3) becomes "00".
		

Programs

  • Mathematica
    Table[FromDigits[IntegerDigits[n,3]/.{0->1,1->2,2->0}],{n,0,60}] (* Harvey P. Dale, Jun 17 2022 *)
  • PARI
    A256303(n,b=3)=!n+eval(Strchr(apply(d->(d+1)%b+48, digits(n,b))))

A256294 Apply the transformation 0 -> 1 -> 2 -> 3 -> 0 to the digits of n written in base 4, then convert back to base 10.

Original entry on oeis.org

1, 2, 3, 0, 9, 10, 11, 8, 13, 14, 15, 12, 1, 2, 3, 0, 37, 38, 39, 36, 41, 42, 43, 40, 45, 46, 47, 44, 33, 34, 35, 32, 53, 54, 55, 52, 57, 58, 59, 56, 61, 62, 63, 60, 49, 50, 51, 48, 5, 6, 7, 4, 9, 10, 11, 8, 13, 14, 15, 12
Offset: 0

Views

Author

M. F. Hasler, Mar 22 2015

Keywords

Comments

Base 4 variant of A035327 (base 2) and A048379 (base 10). See A256293 - A256299 for bases 3 through 9, and A256304 for the variant where the result is not converted back to base 10.

Examples

			a(4) = 7 because 4 = 10[4] becomes 21[4] = 9.
a(15) = 0 because 15 = 33[4] becomes 00[4] = 0.
		

Programs

  • PARI
    A256294(n,b=4)=!n+apply(t->(t+1)%b,n=digits(n,b))*vector(#n,i,b^(#n-i))~
Showing 1-2 of 2 results.