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 A068881 #15 Mar 23 2024 17:44:56 %S A068881 9,81,961,9216,96721,929296,9690769,98525476,987656329,9618509476, %T A068881 98987632129,987650365636,9890943230169,98987854141696, %U A068881 987896383010761,9896907878105616,98989096389856929,989894587654967296,9898969096969272961,98985494707696721476 %N A068881 Largest n-digit square with property that digits alternate in parity, or 0 if no such number exists. %H A068881 Sean A. Irvine, <a href="/A068881/b068881.txt">Table of n, a(n) for n = 1..53</a> (terms 1..33 from Giovanni Resta) %e A068881 a(4) = 9216 as 9, 2, 1, 6 have alternating parity. %p A068881 alp:= proc(n) local L,d; %p A068881 L:= convert(n,base,10); %p A068881 d:= nops(L); %p A068881 if d::even then L:= L + map(op, [[0,1]$(d/2)]) else L:= L + map(op, [[0,1]$((d-1)/2),[0]]) fi; %p A068881 nops(convert(L mod 2, set))=1 %p A068881 end proc:f:= proc(d) local s; %p A068881 for s from floor(sqrt(10^d)) by -1 to ceil(sqrt(10^(d-1))) do %p A068881 if alp(s^2) then return s^2 fi %p A068881 od; %p A068881 0 %p A068881 end proc:map(f, [$1..10]); # _Robert Israel_, Aug 14 2018 %t A068881 altQ[n_] := n < 10 || Union[Total /@ Partition[ Mod[ IntegerDigits@ n, 2], 2, 1]] == {1}; a[n_] := Block[{r = Floor@ Sqrt@ FromDigits[8 + Mod[ Range@ n, 2]]}, While[! altQ[r^2], r--]; r^2]; Array[a, 16] (* _Giovanni Resta_, Aug 17 2018 *) %Y A068881 Cf. A068876, A030152, A068880. %K A068881 base,nonn %O A068881 1,1 %A A068881 _Amarnath Murthy_, Mar 19 2002 %E A068881 a(5) corrected and more terms from _Robert Israel_, Aug 14 2018 %E A068881 a(18)-a(20) from _Giovanni Resta_, Aug 16 2018