|
|
A331009
|
|
Lexicographically earliest sequence of distinct positive terms such that for any n > 0, the n-th term and the n-th digit have the same parity.
|
|
1
|
|
|
1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 10, 31, 12, 33, 14, 35, 16, 37, 18, 39, 41, 20, 43, 45, 47, 22, 49, 51, 53, 24, 55, 57, 59, 26, 61, 63, 65, 28, 67, 69, 30, 71, 32, 34, 36, 73, 38, 75, 40, 77, 42, 44, 46, 79, 81, 83, 85, 87
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
This sequence is a variant of A324282; here we have equal parity, there different parity.
This sequence is a permutation of the natural numbers.
|
|
LINKS
|
|
|
EXAMPLE
|
The first terms, alongside the corresponding digits, are:
n a(n) n-th digit
-- ---- ----------
1 1 1
2 2 2
3 3 3
4 4 4
5 5 5
6 6 6
7 7 7
8 8 8
9 9 9
10 11 1
11 13 1
12 15 1
13 17 3
14 19 1
15 21 5
|
|
MATHEMATICA
|
a[1]=1; a[n_]:=a[n]=(k=1; While[MemberQ[s=Array[a, n-1], k]||OddQ@k!= OddQ[Flatten[IntegerDigits/@Join[s, {k}]][[n]]], k++]; k); Array[a, 100] (* Giorgos Kalogeropoulos, Sep 07 2023 *)
|
|
PROG
|
(PARI) See Links section.
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|