login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A030141 Numbers in which parity of the decimal digits alternates. 24
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 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, 101, 103, 105, 107, 109, 121, 123, 125, 127, 129 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,3

COMMENTS

An alternating integer is a positive integer for which, in base-10, the parity of its digits alternates.

The number of terms < 10^n (n>=0): 1, 10, 55, 280, 1405, 7030, 35155, ..., . - Robert G. Wilson v, Apr 01 2011

The number of terms between 10^n and 10^(n+1) is 9 * 5^n for n>=0. For n>=0, number of terms < 10^n is 1 + 9 * (5^n-1)/4. - Franklin T. Adams-Watters, Apr 01 2011

A228710(a(n)) = 1. - Reinhard Zumkeller, Aug 31 2013

LINKS

Reinhard Zumkeller, Table of n, a(n) for n = 1..10000

45th International Mathematical Olympiad (45th IMO), Problem #6 and Solution, Mathematics Magazine, 78 (2005), pp. 247, 250, 251.

Index entries for 10-automatic sequences.

EXAMPLE

121 is alternating and in the sequence because its consecutive digits are odd-even-odd, 1 being odd and 2 even. Of course, 1234567890 is also alternating.

MATHEMATICA

fQ[n_] := Block[{m = Mod[ IntegerDigits@ n, 2]}, m == Split[m, UnsameQ][[1]]]; Select[ Range[0, 130], fQ] (* Robert G. Wilson v, Apr 01 2011 *)

PROG

(Haskell)

a030141 n = a030141_list !! (n-1)

a030141_list = filter ((== 1) . a228710) [0..]

-- Reinhard Zumkeller, Aug 31 2013

CROSSREFS

Complement: A228709.

Subsequences: A030142, A030143, A030144, A030147, A030152, A062285.

Cf. A110303, A110304, A110305, A056830, A103181, A228722, A228723.

Sequence in context: A103969 A271168 A292514 * A242367 A246077 A064915

Adjacent sequences:  A030138 A030139 A030140 * A030142 A030143 A030144

KEYWORD

nonn,base,easy

AUTHOR

Patrick De Geest

EXTENSIONS

Offset corrected by Reinhard Zumkeller, Aug 31 2013

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy .

Last modified February 25 04:05 EST 2018. Contains 299630 sequences. (Running on oeis4.)