OFFSET
1,3
COMMENTS
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
For n > 3 the last digit of a(n) isn't 0 or 4. - David A. Corneth, Aug 05 2018
LINKS
Andrew Howroyd, Table of n, a(n) for n = 1..1226 (first 101 terms from Harvey P. Dale, terms 102..223 from David A. Corneth)
MATHEMATICA
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 *)
PROG
(PARI) alternating(n)={my(v=digits(n)%2); 0==#select(i->v[i]==v[i-1], [2..#v])}
{ for(n=0, 10^5, if(alternating(n^2) && alternating(n), print1(n^2, ", "))) } \\ Andrew Howroyd, Aug 05 2018
(PARI) \\ for larger n: requires alternating function above
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)}
apply(n->n^2, upto(sqrtint(10^12))) \\ Andrew Howroyd, Aug 05 2018
CROSSREFS
KEYWORD
nonn,base
AUTHOR
EXTENSIONS
Offset changed by David A. Corneth, Aug 05 2018
STATUS
approved