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 A030154 #26 Aug 06 2018 05:36:53 %S A030154 0,1,4,9,16,25,36,49,81,256,529,729,1296,4761,5476,6561,9216,16129, %T A030154 32761,34969,87616,763876,5414929,5612161,7414729,7436529,7634169, %U A030154 14561856,21058921,34503876,43072969,43414921,45252529,69272329 %N A030154 Squares such that in n and sqrt(n) the parity of digits alternates. %C A030154 The more digits there are in n, the lower the likelihood that the parity of n's digits will strictly alternate. Thus, the terms of the sequence become increasingly rare as n gets larger. - _Harvey P. Dale_, Aug 05 2018 %C A030154 For n > 3 the last digit of a(n) isn't 0 or 4. - _David A. Corneth_, Aug 05 2018 %H A030154 Andrew Howroyd, <a href="/A030154/b030154.txt">Table of n, a(n) for n = 1..1226</a> (first 101 terms from Harvey P. Dale, terms 102..223 from David A. Corneth) %t A030154 pdaQ[n_]:=Module[{a=Mod[IntegerDigits[n],2],b=Mod[IntegerDigits[ Sqrt[ n]],2]},Length[ Split[a]] ==IntegerLength[n]&&Length[Split[b]]== IntegerLength[ Sqrt[n]]]; Join[{0},Select[Range[8500]^2,pdaQ]] (* _Harvey P. Dale_, Aug 05 2018 *) %o A030154 (PARI) alternating(n)={my(v=digits(n)%2);0==#select(i->v[i]==v[i-1],[2..#v])} %o A030154 { for(n=0, 10^5, if(alternating(n^2) && alternating(n), print1(n^2, ", "))) } \\ _Andrew Howroyd_, Aug 05 2018 %o A030154 (PARI) \\ for larger n: requires alternating function above %o A030154 upto(n)={local(R=List([0])); my(recurse(s,b)=if(b<n, for(i=0, 9, if(b==1||(s\(b\10)-i)%2, my(k=i*b+s); if(k<=n&&(b==1||k^2\(b\10)*11\10%2), if(i>0&&alternating(k^2\b), listput(R, k)); self()(k, 10*b)))))); recurse(0,1); listsort(R); Vec(R)} %o A030154 apply(n->n^2, upto(sqrtint(10^12))) \\ _Andrew Howroyd_, Aug 05 2018 %Y A030154 Cf. A030141, A030151, A030152, A030153. %K A030154 nonn,base %O A030154 1,3 %A A030154 _Patrick De Geest_ %E A030154 Offset changed by _David A. Corneth_, Aug 05 2018