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
Rémy Sigrist, Jan 06 2020
STATUS
approved