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!)
A048385 In base-10 notation replace digits of n with their squared values (Version 1). 19
0, 1, 4, 9, 16, 25, 36, 49, 64, 81, 10, 11, 14, 19, 116, 125, 136, 149, 164, 181, 40, 41, 44, 49, 416, 425, 436, 449, 464, 481, 90, 91, 94, 99, 916, 925, 936, 949, 964, 981, 160, 161, 164, 169, 1616, 1625, 1636, 1649, 1664, 1681, 250, 251, 254, 259, 2516, 2525 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,3

LINKS

Alois P. Heinz, Table of n, a(n) for n = 0..10000

FORMULA

a(n) >= n with equality iff n belongs to A007088. - Rémy Sigrist, May 17 2019

MAPLE

a:= n-> (s-> parse(cat(seq(parse(s[i])^2, i=1..length(s)))))(""||n):

seq(a(n), n=0..70);  # Alois P. Heinz, Jul 04 2014

MATHEMATICA

Table[FromDigits[Flatten[IntegerDigits/@(IntegerDigits[n]^2)]], {n, 0, 80}] (* Harvey P. Dale, May 06 2019 *)

PROG

(MAGMA) [0] cat [StringToInteger(&cat[IntegerToString(h): h in Reverse([i^2: i in Intseq(n)])]): n in [1..55]]; // Bruno Berselli, Jul 31 2012

(Python)

def digits(n):

    d=[]

    while n>0:

        d.append(n%10)

        n=n//10

    return d

def sqdig(n):

    new=0

    num=digits(n)

    spacing=0

    while num:

        k=num.pop(0)

        new+=(10**(spacing))*(k**2)

        if k>3:

            spacing+=1

        spacing+=1

    return new

# David Nacin, Aug 19 2012

(Haskell)

a048385 0 = 0

a048385 n = read (show (a048385 n') ++ show (m ^ 2)) :: Integer

            where (n', m) = divMod n 10

-- Reinhard Zumkeller, Jul 08 2014

(PARI) a(n) = if (n, fromdigits(concat(apply(d -> my (d2=d^2); if (d2, digits(d2), [0]), digits(n)))), 0) \\ Rémy Sigrist, May 17 2019

(MATLAB) m=1;

for u=0:200 digit=dec2base(u, 10)-'0'; digitp=digit.^2;

    sol(m)=str2num(strrep(num2str(digitp), ' ', '')); m=m+1;

end

sol % Marius A. Burtea, May 17 2019

CROSSREFS

See A068522 for another version.

Cf. A007088, A048386, A048387, A048388, A048389.

Sequence in context: A277342 A098733 A068522 * A230101 A057147 A213630

Adjacent sequences:  A048382 A048383 A048384 * A048386 A048387 A048388

KEYWORD

nonn,base

AUTHOR

Patrick De Geest, Mar 15 1999

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 February 25 22:37 EST 2021. Contains 341618 sequences. (Running on oeis4.)