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

A124176 Consider the map f that sends m to m + (sum of odd digits of m) - (sum of even digits of m). Sequence gives numbers m such that f^(k)(m) = m for some k.

Original entry on oeis.org

0, 11, 13, 17, 18, 25, 28, 54, 55, 64, 65, 112, 121, 134, 137, 143, 148, 155, 156, 165, 166, 173, 178, 184, 187, 198, 200, 209, 211, 216, 231, 233, 234, 237, 244, 245, 270, 275, 280, 285, 314, 336, 341, 358, 363, 385, 396, 402, 407, 410, 413, 429, 431, 432
Offset: 1

Views

Author

Eric Angelini, Dec 04 2006

Keywords

Comments

Terms computed by Barry and Theunis de Jong.
Subsequence A036301 lists fixed points of the map f = A304439. - M. F. Hasler, May 18 2018

Examples

			11 and 13 loop on themselves, but 12 doesn't:
11 -> 13 -> 17 -> 25 -> 28 -> 18 -> 11
12 -> 11 -> 13 -> 17 -> 25 -> 28 -> 18 -> 11
13 -> 17 -> 25 -> 28 -> 18 -> 11 -> 13.
		

Crossrefs

Programs

  • PARI
    is(n,S=List())=until(setsearch(Set(S),n=A304439(n)),listput(S,n));n==S[1] \\ M. F. Hasler, May 18 2018

A124177 Consider the map f that sends m to m + (sum of even digits of m) - (sum of odd digits of m). Sequence gives numbers m such that f^(k)(m) = m for some k.

Original entry on oeis.org

0, 22, 26, 27, 34, 35, 44, 49, 52, 63, 66, 78, 79, 81, 88, 99, 104, 107, 108, 112, 115, 121, 126, 133, 134, 143, 144, 151, 156, 165, 178, 187, 211, 224, 229, 232, 233, 283, 290, 314, 336, 341, 358, 363, 385, 413, 431, 467, 470, 489, 492, 516, 538, 561, 583, 615
Offset: 1

Views

Author

Eric Angelini, Dec 04 2006

Keywords

Comments

Terms computed by Theunis de Jong.
Subsequence A036301 lists fixed points of the map f = A304440. - M. F. Hasler, May 18 2018

Examples

			26 and 27 loop on themselves, but 28 doesn't.
26 -> 34 -> 35 -> 27 -> 22 -> 26
27 -> 22 -> 26 -> 34 -> 35 -> 27
28 -> 38 -> 43 -> 44 -> 52 -> 49 -> 44.
		

Crossrefs

Programs

  • PARI
    is(n,S=List())={until(setsearch(Set(S),n=A304440(n)),listput(S,n));n==S[1]} \\ M. F. Hasler, May 18 2018

A304440 Add to n the sum of its even digits minus the sum of its odd digits.

Original entry on oeis.org

0, 0, 4, 0, 8, 0, 12, 0, 16, 0, 9, 9, 13, 9, 17, 9, 21, 9, 25, 9, 22, 22, 26, 22, 30, 22, 34, 22, 38, 22, 27, 27, 31, 27, 35, 27, 39, 27, 43, 27, 44, 44, 48, 44, 52, 44, 56, 44, 60, 44, 45, 45, 49, 45, 53, 45, 57, 45, 61, 45, 66, 66, 70, 66, 74, 66, 78, 66, 82, 66, 63
Offset: 0

Views

Author

M. F. Hasler, May 18 2018

Keywords

Comments

A036301 lists fixed points of this map, the first nonzero one being 112. It is also a subsequence of A124177 (and A124176) which lists numbers which are in a cyclic orbit under iterations of this map.

Crossrefs

Cf. A304439 (variant: + even - odd digits), A071650 (odd - even digits), A071648, A071649, A036301 (fixed points), A124177, A124176.

Programs

  • Mathematica
    nseo[n_]:=Module[{idn=IntegerDigits[n]},n+Total[Select[idn,EvenQ]]-Total[Select[idn,OddQ]]]; Array[nseo,80,0] (* Harvey P. Dale, Dec 26 2023 *)
  • PARI
    A304440(n)=n+vecsum(apply(t->t*(-1)^t,digits(n)))

Formula

a(n) = n - A071650(n).

A076164 Numbers n such that sum of squares of even digits of n equals sum of squares of odd digits of n.

Original entry on oeis.org

0, 11112, 11121, 11211, 11356, 11365, 11536, 11563, 11635, 11653, 12111, 13156, 13165, 13516, 13561, 13615, 13651, 15136, 15163, 15316, 15361, 15613, 15631, 16135, 16153, 16315, 16351, 16513, 16531, 21111, 31156, 31165, 31516, 31561
Offset: 1

Views

Author

Zak Seidov, Nov 01 2002

Keywords

Comments

The minimal number of digits in any nonzero term is 5.
Numbers such that the sum of even digits equals the sum of odd digits are listed in A036301.

Examples

			11356 is in the sequence because 1^2 + 1^2 + 3^2 + 5^2 = 6^2.
		

Crossrefs

Cf. A303269, A036301 (analog without squares), A071650, A304439, A304440, A124176, A124177.

Programs

  • Mathematica
    oeQ[n_]:=Module[{idn=IntegerDigits[n]},Total[Select[idn,OddQ]^2]== Total[ Select[ idn, EvenQ]^2]]; Select[Range[0,99999],oeQ] (* Harvey P. Dale, Sep 23 2011 *)
  • PARI
    is(n)=!vecsum(apply(d->d^2*(-1)^d,digits(n))) \\ M. F. Hasler, May 18 2018

Extensions

Edited and a(1) = 0 added by M. F. Hasler, May 18 2018
Showing 1-4 of 4 results.