cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-3 of 3 results.

A048387 Squares resulting from procedure described in A048386.

Original entry on oeis.org

0, 1, 4, 9, 16, 25, 36, 49, 64, 81, 49, 169, 1681, 361, 100, 144, 1936, 11664, 1369, 400, 441, 41616, 43681, 900, 9025, 93636, 1600, 16641, 166464, 2500, 3600, 36481, 4900, 6400, 646416, 8100, 11025, 11449, 1444, 14161, 14641, 116964, 12544, 136161
Offset: 1

Views

Author

Patrick De Geest, Mar 15 1999

Keywords

Crossrefs

Programs

  • Magma
    f:=func; [0] cat [f(k):k in [1..4000]|IsSquare(f(k))]; // Marius A. Burtea, Feb 13 2020

Formula

a(n) = A048385(A048386(n)). - Michel Marcus, Feb 13 2020

Extensions

Offset 1 from Michel Marcus, Feb 13 2020

A048385 In base-10 notation replace digits of n with their squared values (Version 1).

Original entry on oeis.org

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
Offset: 0

Views

Author

Patrick De Geest, Mar 15 1999

Keywords

Crossrefs

See A068522 for another version.

Programs

  • 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
    
  • 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
  • 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
    
  • 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 *)
  • 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
    
  • 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
    

Formula

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

A276697 Integers m such that A048390(m) is a cube.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1000, 1042, 2000, 3000, 4000, 5000, 6000, 7000, 8000, 9000, 321213, 642426, 1000000, 1042000, 2000000, 3000000, 4000000, 5000000, 6000000, 7000000, 8000000, 9000000, 10121026, 302102103, 321213000, 604204206, 642426000, 1000000000
Offset: 1

Views

Author

Michel Marcus, Nov 06 2016

Keywords

Comments

Integers that become cubes when their digits d are replaced with d^3.
Sequence is infinite, since 10^(3*k) is a term for all k.

Examples

			For m <= 9, 1-digit integers, A048390(m) = m^3 so all integers <= 9 are terms of this sequence.
		

Crossrefs

Programs

  • Magma
    f:=func; [0] cat [k:k in [1..8000000]|IsPower(f(k),3)]; // Marius A. Burtea, Feb 13 2020
  • PARI
    isok(n) = my(d = digits(n)); my(s = ""); for (k=1, #d, s = concat(s, Str(d[k]^3))); ispower(eval(s), 3);
    

Extensions

a(34)-a(38) from Jinyuan Wang, Feb 13 2020
Showing 1-3 of 3 results.