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

A373460 Numbers k such that k and k+1 both have an equal number of even and odd digits.

Original entry on oeis.org

29, 49, 69, 89, 1009, 1029, 1049, 1069, 1089, 1209, 1229, 1249, 1269, 1289, 1409, 1429, 1449, 1469, 1489, 1609, 1629, 1649, 1669, 1689, 1809, 1829, 1849, 1869, 1889, 2109, 2129, 2149, 2169, 2189, 2309, 2329, 2349, 2369, 2389, 2509, 2529, 2549, 2569, 2589, 2709
Offset: 1

Views

Author

Amiram Eldar, Jun 07 2024

Keywords

Comments

The terms are of the form 100*m + j, where m is either 0 or a term of A227870 and j is in {29, 49, 69, 89} if m = 0 or in {9, 29, 49, 69, 89} if m > 0.

Examples

			29 is a term since it has one even digit (2) and one odd digit (9), and 29+1 = 30 also has one even digit (0) and one odd digit (3).
		

Crossrefs

Subsequence of A017377 and A227870.
Cf. A337238 (binary analog), A373505.

Programs

  • Mathematica
    q[n_] := Module[{d = Differences[Tally[Mod[IntegerDigits[n], 2]]]}, d != {} && d[[1, 2]] == 0]; Select[Range[3000], q[#] && q[# + 1] &]
  • PARI
    iseq(n) = {my(o = 0, e = 0); while(n > 0, if((n%10) % 2 == 0, e++, o++); n \= 10); e == o;}
    lista(kmax) = {my(q1 = 0, q2); for(k = 1, kmax, q2 = iseq(k); if(q1 && q2, print1(k-1, ", ")); q1 = q2);}

Formula

a(n) = 100 * A227870(floor(n/5)) + 20 * (n mod 5) + 9, for n > 4.
Showing 1-1 of 1 results.