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!)
A297647 Octagonal numbers (A000567) in which parity of digits alternates. 4
1, 8, 21, 65, 96, 341, 3816, 4961, 8321, 8965, 9296, 10325, 12545, 14145, 14981, 16725, 18565, 23056, 27456, 36741, 63656, 65416, 103416, 105656, 169456, 181056, 210145, 216545, 232965, 236321, 256961, 412181, 430165, 434721, 569416, 614721, 658945, 698901 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
Intersection of A000567 and A030141. - Felix Fröhlich, Jan 03 2018
LINKS
EXAMPLE
8321 is in the sequence because 8, 3, 2 and 1 have even and odd parity alternately.
MAPLE
filter:= proc(n) local L;
if n < 10 then return true fi;
L:= convert(n, base, 10) mod 2;
not has(L[2..-1]-L[1..-2], 0)
end proc:
select(filter, [seq(n*(3*n-2), n=1..1000)]); # Robert Israel, Jan 03 2018
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(1000, n, (6*n^2-4*n)/2))
CROSSREFS
Sequence in context: A080144 A241522 A096018 * A267144 A240516 A079386
KEYWORD
nonn,base
AUTHOR
Colin Barker, Jan 02 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 12:14 EDT 2024. Contains 371792 sequences. (Running on oeis4.)