login
A373460
Numbers k such that k and k+1 both have an equal number of even and odd digits.
2
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,1
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.
LINKS
FORMULA
a(n) = 100 * A227870(floor(n/5)) + 20 * (n mod 5) + 9, for n > 4.
EXAMPLE
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).
MATHEMATICA
q[n_] := Module[{d = Differences[Tally[Mod[IntegerDigits[n], 2]]]}, d != {} && d[[1, 2]] == 0]; Select[Range[3000], q[#] && q[# + 1] &]
PROG
(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); }
CROSSREFS
Subsequence of A017377 and A227870.
Cf. A337238 (binary analog), A373505.
Sequence in context: A108258 A232236 A228585 * A042947 A134555 A164075
KEYWORD
nonn,base,easy
AUTHOR
Amiram Eldar, Jun 07 2024
STATUS
approved