login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A307153 Sequence gives pair of terms giving the numbers of previous even digits and previous odd digits; a(0)=0. 1
0, 1, 1, 1, 3, 1, 5, 1, 7, 1, 9, 1, 11, 1, 14, 2, 15, 3, 18, 4, 19, 5, 22, 7, 23, 8, 24, 11, 26, 13, 28, 15, 30, 16, 32, 18, 34, 20, 35, 22, 37, 24, 39, 26, 41, 29, 43, 31, 46, 33, 48, 35, 50, 36, 52, 38, 54, 40, 55, 42, 57, 44, 59, 46, 61, 49, 63, 51, 66, 53, 68 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,5
COMMENTS
Up to n = 10^5, any integer generally appears 0, 1 or 2 times. Only 248, 428 and 806 appear 3 times and 1 appears 8 times.
Are there any numbers that appear 4, 5 or more times?
From Giovanni Resta, Apr 01 2019: (Start)
4 times: 15711971, 22606282, 22826268, ...
5 times: 42862042, 44464482, 82802082, ...
6 times: 224026426, 224028040, 224042062, ...
7 times: 242620882, 244220442, 260088080, ...
Therefore, the first terms that appear n times, with n >= 0, are 6, 0, 3, 248, 15711971, 42862042, 224026426, 242620882, 1, ... (End)
LINKS
FORMULA
a(2n+1) = total number of even digits from a(0) to a(2n).
a(2n+2) = total number of odd digits from a(0) to a(2n+1).
EXAMPLE
a(1) = 1 because there is only one even digit before a(1): a(0) = 0.
a(2) = 1 because there is only one odd digit before a(2): a(1) = 1. Etc.
MAPLE
P:=proc(q) local a, b, d, d1, k, n, p, p1; a:=[0]: p:=1; d:=0;
for n from 2 to q do a:=[op(a), p]: b:=[op(convert(p, base, 10))]:
p1:=0: d1:=0: for k from 1 to nops(b) do if b[k] mod 2=0
then p1:=p1+1: else d1:=d1+1: fi; od; d:=d+d1: p:=p+p1:
a:=[op(a), d]: b:=[op(convert(d, base, 10))]: p1:=0: d1:=0:
for k from 1 to nops(b) do if b[k] mod 2=0 then p1:=p1+1:
else d1:=d1+1: fi; od; d:=d+d1: p:=p+p1: od; op(a); end: P(35);
PROG
(PARI) nb = [0, 0]; for (n=1, 71, print1 (v=nb[1+n%2]", "); apply(d -> nb[1+d%2]++, if (v, digits(v), [0]))) \\ Rémy Sigrist, May 04 2019
CROSSREFS
Sequence in context: A009001 A093178 A340086 * A339421 A336898 A300330
KEYWORD
nonn,base,easy
AUTHOR
Paolo P. Lava, Mar 27 2019
STATUS
approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 23 05:20 EDT 2024. Contains 371906 sequences. (Running on oeis4.)