A050749 Squares containing no pair of consecutive equal digits.
0, 1, 4, 9, 16, 25, 36, 49, 64, 81, 121, 169, 196, 256, 289, 324, 361, 484, 529, 576, 625, 676, 729, 784, 841, 961, 1024, 1089, 1296, 1369, 1521, 1681, 1764, 1849, 1936, 2025, 2304, 2401, 2601, 2704, 2809, 2916, 3025, 3136, 3249, 3481, 3721, 3969, 4096, 4356
Offset: 1
Programs
-
Mathematica
Select[Range[0,66]^2,FreeQ[Differences[IntegerDigits[#]],0]&] (* Jayanta Basu, May 31 2013 *) Select[Range[0,100]^2,SequenceCount[IntegerDigits[#],{x_,x_}]==0&] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Sep 08 2017 *)
Formula
a(n) = A050741(n)^2. - Andrew Howroyd, Aug 11 2024
Extensions
Offset corrected by Andrew Howroyd, Aug 11 2024