login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A256630 Numbers n such that the decimal expansions of both n and n^2 have 0 as smallest digit and 4 as largest digit. 23
142201, 1422010, 11141110, 11411110, 11412021, 14220100, 20323421, 21024111, 101203421, 110141011, 110142201, 111411100, 114111100, 114120210, 120013421, 141433102, 142201000, 203234210, 210241110, 1012034210, 1101410011, 1101410110, 1101422010, 1114111000 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

LINKS

Chai Wah Wu, Table of n, a(n) for n = 1..10000

MATHEMATICA

fQ[n_] := Block[{c = DigitCount@ n}, And[Plus @@ Take[c, {5, 9}] == 0, c[[4]] > 0, c[[10]] > 0]]; Select[Range@ 10000000, fQ@ # && fQ[#^2] &] (* Michael De Vlieger, Apr 12 2015 *)

PROG

(PARI) is(n) = vecmin(digits(n))==0 && vecmin(digits(n^2))==0 && vecmax(digits(n))==4 && vecmax(digits(n^2))==4

(Python)

from itertools import product

A256630_list = []

for l in range(11):

    for a in ('1', '2', '3', '4'):

        for b in product('01234', repeat = l):

            for c in ('0', '1', '2'):

                s = a+''.join(b)+c

                if '0' in s and '4' in s:

                    n = int(s)

                    s2 = set(str(n**2))

                    if {'0', '4'} <= s2 <= {'0', '1', '2', '3', '4'}:

                        A256630_list.append(n)

print(A256630_list) # Chai Wah Wu, Apr 17 2015

CROSSREFS

Cf. A256631, A256633, A256634, A256708, A256709, A256889.

Subsequence of A136810.

Sequence in context: A214479 A269321 A204287 * A263037 A086999 A175694

Adjacent sequences:  A256627 A256628 A256629 * A256631 A256632 A256633

KEYWORD

nonn,base

AUTHOR

Felix Fröhlich, Apr 05 2015

EXTENSIONS

More terms from Alois P. Heinz, Apr 16 2015

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 21 04:10 EDT 2021. Contains 345354 sequences. (Running on oeis4.)