login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A247843
Consecutive exclusionary squares: Numbers n such that n^2 does not contain digits of n and (n+1)^2 does not contain digits of n+1.
1
2, 3, 7, 8, 17, 33, 38, 53, 57, 58, 157, 187, 237, 313, 333, 557, 558, 672, 688, 738, 787, 788, 812, 813, 853, 1557, 2087, 2107, 2112, 3112, 3113, 3157, 3333, 3357, 3358, 4453, 4553, 5598, 5857, 6672, 6688, 7017, 7287, 7772, 7888, 7908, 8087, 8337, 15787, 17157, 18557, 22112, 32358
OFFSET
1,1
PROG
(Python)
for n in range(10**5):
..s, t = str(n), str(n+1)
..s2, t2 = str(n**2), str((n+1)**2)
..c = 0
..for i in s:
....if s2.count(i):
......c += 1
......break
..for j in t:
....if t2.count(j):
......c += 1
......break
..if not c:
....print(n, end=', ')
CROSSREFS
Cf. A029783.
Sequence in context: A060121 A002964 A166966 * A181658 A251541 A325105
KEYWORD
nonn,base
AUTHOR
Derek Orr, Sep 25 2014
STATUS
approved