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

A100961 For a decimal string s, let f(s) = decimal string ijk, where i = number of even digits in s, j = number of odd digits in s, k=i+j (see A171797). Start with s = decimal expansion of n; a(n) = number of applications of f needed to reach the string 123.

Original entry on oeis.org

2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 1, 2, 1, 2
Offset: 0

Views

Author

N. J. A. Sloane, Jun 17 2005

Keywords

Comments

Obviously if the digits of m and n have the same parity then a(m) = a(n). E.g. a(334) = a(110). In other words, a(n) = a(A065031(n)).
It is easy to show that (i) the trajectory of every number under f eventually reaches 123 (if s has more than three digits then f(s) has fewer digits than s) and (ii) since each string ijk has only finitely many preimages, a(n) is unbounded.

Examples

			n=0: s=0 -> f(s) = 101 -> f(f(s)) = 123, stop, a(0) = 2.
n=1: s=1 => f(s) = 011 -> f(f(s)) = 123, stop, f(1) = 2.
		

Crossrefs

A073054 gives another version. f(n) is (essentially) A171797 or A073053.

Extensions

More terms from Zak Seidov, Jun 18 2005

A318700 Positive numbers that contain odd and even digits.

Original entry on oeis.org

10, 12, 14, 16, 18, 21, 23, 25, 27, 29, 30, 32, 34, 36, 38, 41, 43, 45, 47, 49, 50, 52, 54, 56, 58, 61, 63, 65, 67, 69, 70, 72, 74, 76, 78, 81, 83, 85, 87, 89, 90, 92, 94, 96, 98, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 112, 114, 116, 118, 120, 121, 122
Offset: 1

Views

Author

Enrique Navarrete, Aug 31 2018

Keywords

Comments

The sequence of first differences takes on the values {1, 2, 3} only, and each of these values occurs infinitely often (the values 1 and 2 are clear; for the value 3, note that consecutive numbers such as 199..9, 200..0 and 399..9, 400..0 that are excluded from the sequence occur infinitely often).
Numbers n such that A065031(n) is a term of A111066. - Felix Fröhlich, Sep 01 2018
Nonnegative integers excluding those such that digits in their decimal representation share all the same parity. - R. J. Cano, Sep 10 2018

Examples

			49 and 50 are in the sequence but 19 and 20 are not.
		

Crossrefs

Programs

  • Mathematica
    Select[Range@ 122, Union[Mod[IntegerDigits[#], 2]] == {0, 1} &] (* Michael De Vlieger, Sep 04 2018 *)
  • PARI
    is(n) = my(d=digits(n), v=[]); if(n < 10, return(0)); for(k=1, #d, v=concat(v, [d[k]%2])); vecmin(v)!=vecmax(v) \\ Felix Fröhlich, Sep 01 2018
    
  • PARI
    See Cano link.

A167677 Replace prime digits with 1 and nonprime digits with 2.

Original entry on oeis.org

2, 2, 1, 1, 2, 1, 2, 1, 2, 2, 22, 22, 21, 21, 22, 21, 22, 21, 22, 22, 12, 12, 11, 11, 12, 11, 12, 11, 12, 12, 12, 12, 11, 11, 12, 11, 12, 11, 12, 12, 22, 22, 21, 21, 22, 21, 22, 21, 22, 22, 12, 12, 11, 11, 12, 11, 12, 11, 12, 12, 22, 22, 21, 21, 22, 21, 22, 21, 22, 22, 12, 12, 11
Offset: 0

Views

Author

Zak Seidov, Nov 09 2009

Keywords

Crossrefs

Programs

  • Mathematica
    Table[FromDigits[If[PrimeQ[ # ],1,2]&/@IntegerDigits[n]],{n,0,200}]

A167678 Replace prime digits with 2 and nonprime digits with 1.

Original entry on oeis.org

1, 1, 2, 2, 1, 2, 1, 2, 1, 1, 11, 11, 12, 12, 11, 12, 11, 12, 11, 11, 21, 21, 22, 22, 21, 22, 21, 22, 21, 21, 21, 21, 22, 22, 21, 22, 21, 22, 21, 21, 11, 11, 12, 12, 11, 12, 11, 12, 11, 11, 21, 21, 22, 22, 21, 22, 21, 22, 21, 21, 11, 11, 12, 12, 11, 12, 11, 12, 11, 11, 21, 21, 22
Offset: 0

Views

Author

Zak Seidov, Nov 09 2009

Keywords

Crossrefs

Programs

  • Mathematica
    Table[FromDigits[If[PrimeQ[ # ],2,1]&/@IntegerDigits[n]],{n,0,200}]

A167679 Replace odd digits with 2 and even digits with 1.

Original entry on oeis.org

1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 11, 12, 11, 12, 11, 12, 11, 12, 11, 12, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 11, 12, 11, 12, 11, 12, 11, 12, 11, 12, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 11, 12, 11, 12, 11, 12, 11, 12, 11, 12, 21, 22, 21
Offset: 0

Views

Author

Zak Seidov, Nov 09 2009

Keywords

Crossrefs

Programs

  • Mathematica
    Table[FromDigits[If[OddQ[ # ],2,1]&/@IntegerDigits[n]],{n,0,200}]
Showing 1-5 of 5 results.