This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A297644 #14 Jan 06 2019 03:58:52 %S A297644 1,5,12,70,92,145,210,852,925,2147,2501,3290,3432,3876,4187,4347,6305, %T A297644 6501,12105,12927,25676,27270,27676,45850,58707,69230,69876,70525, %U A297644 76501,78547,98945,101270,123410,161212,270725,349692,367290,567030,707610,709672 %N A297644 Pentagonal numbers (A000326) in which parity of digits alternates. %C A297644 Intersection of A000326 and A030141. - _Felix Fröhlich_, Jan 03 2018 %H A297644 Robert Israel, <a href="/A297644/b297644.txt">Table of n, a(n) for n = 1..2000</a> %e A297644 3876 is in the sequence because 3, 8, 7 and 6 have odd and even parity alternately. %p A297644 filter:= proc(n) local L; %p A297644 if n < 10 then return true fi; %p A297644 L:= convert(n, base, 10) mod 2; %p A297644 not has(L[2..-1]-L[1..-2], 0) %p A297644 end proc: %p A297644 select(filter, [seq(n*(3*n-1)/2, n=1..1000)]); # _Robert Israel_, Jan 03 2018 %o A297644 (PARI) %o A297644 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) %o A297644 select(is_alt, vector(1000, n, (3*n^2-n)/2)) %Y A297644 Cf. A297645, A297646, A297647. %Y A297644 Cf. A000326, A030141, A030152, A030160, A068882. %K A297644 nonn,base %O A297644 1,2 %A A297644 _Colin Barker_, Jan 02 2018