cp's OEIS Frontend

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.

A297647 Octagonal numbers (A000567) in which parity of digits alternates.

This page as a plain text file.
%I A297647 #11 Jan 04 2018 02:50:21
%S A297647 1,8,21,65,96,341,3816,4961,8321,8965,9296,10325,12545,14145,14981,
%T A297647 16725,18565,23056,27456,36741,63656,65416,103416,105656,169456,
%U A297647 181056,210145,216545,232965,236321,256961,412181,430165,434721,569416,614721,658945,698901
%N A297647 Octagonal numbers (A000567) in which parity of digits alternates.
%C A297647 Intersection of A000567 and A030141. - _Felix Fröhlich_, Jan 03 2018
%H A297647 Robert Israel, <a href="/A297647/b297647.txt">Table of n, a(n) for n = 1..2000</a>
%e A297647 8321 is in the sequence because 8, 3, 2 and 1 have even and odd parity alternately.
%p A297647 filter:= proc(n) local L;
%p A297647   if n < 10 then return true fi;
%p A297647   L:= convert(n,base,10) mod 2;
%p A297647   not has(L[2..-1]-L[1..-2],0)
%p A297647 end proc:
%p A297647 select(filter, [seq(n*(3*n-2),n=1..1000)]); # _Robert Israel_, Jan 03 2018
%o A297647 (PARI)
%o A297647 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 A297647 select(is_alt, vector(1000, n, (6*n^2-4*n)/2))
%Y A297647 Cf. A297644, A297645, A297646.
%Y A297647 Cf. A000567, A030141, A030152, A030160, A068882.
%K A297647 nonn,base
%O A297647 1,2
%A A297647 _Colin Barker_, Jan 02 2018