OFFSET
1,2
EXAMPLE
8349 is in the sequence because 8, 3, 4 and 9 have even and odd parity alternately.
PROG
(PARI)
is_alt(n) = m=n; e=n%10; n\=10; while(n>0, f=n%10; if(e%2==f%2, return, e=f; n\=10)); return(m)
select(is_alt, vector(7000, n, numbpart(n)))
(Python)
from sympy import npartitions
A297710_list = []
for i in range(1, 10**6):
n = npartitions(i)
s = [int(d) for d in str(n)]
for j in range(len(s)-1):
if not (s[j]+s[j+1]) % 2:
break
else:
A297710_list.append(n) # Chai Wah Wu, Jan 04 2018
CROSSREFS
KEYWORD
nonn,base,more
AUTHOR
Colin Barker, Jan 04 2018
STATUS
approved