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!)
A297710 Partition numbers (A000041) in which parity of digits alternates. 0
1, 2, 3, 5, 7, 30, 56, 101, 385, 490, 3010, 4565, 8349, 10143 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
No more terms up to numbpart(7000).
Intersection of A000041 and A030141.
LINKS
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
Sequence in context: A269022 A174536 A054797 * A287945 A238850 A245064
KEYWORD
nonn,base,more
AUTHOR
Colin Barker, Jan 04 2018
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 19 04:35 EDT 2024. Contains 371782 sequences. (Running on oeis4.)