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-10 of 31 results. Next

A293832 Smallest of a run of n consecutive integers in A061910, i.e., for which the sum of digits of their square is again a square.

Original entry on oeis.org

1, 1, 1, 9, 9, 9, 9, 46045846, 302260461719025
Offset: 1

Views

Author

M. F. Hasler, Oct 16 2017

Keywords

Comments

a(9) > 10^11. It can be expected that a(n) exists for all n, at an order of magnitude a(n) ~ 10^m with m/log_10(m) ~ n.
A061910 considers only positive integers, and here we also consider this case. If 0 were allowed, then the first 4 terms would be 0.

Examples

			For k = 1, 2 and 3, k^2 is a single-digit number and thus equal to its sum of digits, which therefore is a square. Therefore a(n) = 1 starts the first run of n consecutive integers with this property, for n = 1, 2 and 3.
However, the square of k = 4 has digit sum 7 which is not a square, and the same is the case for k = 5, 7 and 8. (Only k = 6 would have the required property.)
The consecutive integers { 9, 10, 11, 12, 13, 14, 15 } have squares 81, 100, 121, 169, 196, 225 which all have a digit sum (9, 1, 4, 16, 16 and 9) which is a square. Therefore a(n) = 9 starts the first run of n consecutive integers with this property, for n = 4 through 7.
(Actually, 10^(3m-2)^2-1 starts a run of 7 such numbers, for any m >= 1.)
The first run of 8 such numbers is (46045846, ..., 46045853), whence a(8) = 46045846.
		

Crossrefs

Programs

  • PARI
    A293832(n,k=0)=until(,forstep(j=n,1,-1,issquare(sumdigits((k+j)^2))||next(2+!k+=j));return(k+1))

Extensions

a(9) from Giovanni Resta, Aug 27 2018

A061909 Skinny numbers: numbers n such that there are no carries when n is squared by "long multiplication".

Original entry on oeis.org

0, 1, 2, 3, 10, 11, 12, 13, 20, 21, 22, 30, 31, 100, 101, 102, 103, 110, 111, 112, 113, 120, 121, 122, 130, 200, 201, 202, 210, 211, 212, 220, 221, 300, 301, 310, 311, 1000, 1001, 1002, 1003, 1010, 1011, 1012, 1013, 1020, 1021, 1022, 1030, 1031, 1100, 1101, 1102
Offset: 1

Views

Author

N. J. A. Sloane, Jun 14 2007

Keywords

Comments

There are several equivalent formulations. Suppose the decimal expansion of n is n = Sum_{i = 0..k } d_i 10^i, where 0 <= d_i <= 9 for i = 0..k.
Then n is skinny if and only if:
(i) e_i = Sum_{ j = 0..i } d_j d_{i-j} <= 9 for i = 0 .. 2k-1;
(ii) if P_n(X) = Sum_{i = 0..k } d_i X^i (so P_n(10) = n) then P_{n^2}(X) = P_n(X)^2;
(iii) R(n^2) = R(n)^2, where R(n) means the digit reversal of n;
(iv) (sum of digits of n)^2 = sum of digits of n^2.
This entry is a merging and reworking of earlier entries from Asher Auel, May 17 2001 and Amarnath Murthy, Aug 15 2005. Thanks to Andrew S. Plewe for suggesting that these sequences might be identical.
Also, numbers n in base 10 whose base 10 expansion of n^2 is the same as if n were interpreted in some base b>10 and n^2 also calculated in that base. - Andrew Silberman (sandrew(AT)math.upenn.edu), Oct 30 2006
From David Applegate and N. J. A. Sloane, Jun 14 2007: (Start)
The decimal expansion of a skinny number n may contain only 0's, 1's, 2's and 3's.
There may be at most one 3 and if there is a 3 then there can be no 2's. (Hence of course if there are any 2's then there can be no 3's.)
There is no limit to the number of 1's and 2's - consider for example Sum_{i=0..m} 10^{2^i} and 2*Sum_{i=0..m} 10^{2^i}.
These are necessary conditions, but are not sufficient (e.g., 131 is not skinny). (End)
There are fifty-five skinny numbers without a 0 digit, the greatest being a(5203) = 111111111. - Jason Zimba, Jul 05 2020

Examples

			12 is a member as 12^2 = 144, digit reversal of 144 is 441 = 21^2.
13 is a member as 13 squared is 169 and sqrt(961) = 31.
113 is a member as 113^2 = 12769, reversal(12769) = 96721 = 311^2.
(Sum of digits of 13)^2 = 4^2 = 16 and sum of digits of 13^2 = sum of digits of 169 = 16.
10^k is in the sequence for all k >= 0, since reversal((10^k)^2) = 1 = (reversal(10^k))^2. - _Ryan Propper_, Sep 09 2005
		

Crossrefs

A085305 is a subsequence.
The primes in this sequence are given by A085306.
Numbers n such that A067552(n) = 0.

Programs

  • Haskell
    a061909 n = a061909_list !! (n-1)
    a061909_list = filter (\x -> a004086 (x^2) == (a004086 x)^2) [0..]
    -- Reinhard Zumkeller, Jul 08 2011
    
  • Maple
    rev:=proc(n) local nn, nnn: nn:=convert(n,base,10): add(nn[nops(nn)+1-j]*10^(j-1),j=1..nops(nn)) end: a:=proc(n) if sqrt(rev(n^2))=rev(n) then n else fi end: seq(a(n),n=1..1200); # Emeric Deutsch, Mar 31 2007
    f := []: for n from 1 to 1000 do if (convert(convert(n,base,10),`+`))^2 = convert(convert(n^2,base,10),`+`) then f := [op(f), n] fi; od; f; # Asher Auel
  • Mathematica
    r[n_] := FromDigits[Reverse[IntegerDigits[n]]]; Do[If[r[n]^2 == r[n^2], Print[n]], {n, 1, 10^4}] (* Ryan Propper, Sep 09 2005 *)
    Select[Range[0,1200],IntegerReverse[#^2]==IntegerReverse[#]^2&] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Aug 02 2017 *)
  • PARI
    is(n)=sumdigits(n)^2==sumdigits(n^2) \\ Charles R Greathouse IV, Jun 21 2017
    
  • Python
    from itertools import count, islice, product
    def sd(n): return sum(map(int, str(n)))
    def ok(n): return sd(n**2) == sd(n)**2
    def agen(): # generator of terms
        yield from [0, 1, 2, 3]
        for d in count(2):
            for f in "123":
                rset = "01" if f == "3" else "012" if f == "2" else "0123"
                for r in product(rset, repeat=d-1):
                    t = int(f+"".join(r))
                    if ok(t): yield t
    print(list(islice(agen(), 53))) # Michael S. Branicky, Dec 23 2022

Formula

a(n) >> n^2.0959..., where the exponent is log 10/log 3. - Charles R Greathouse IV, Sep 21 2012

A053057 Squares whose digit sum is also a square.

Original entry on oeis.org

0, 1, 4, 9, 36, 81, 100, 121, 144, 169, 196, 225, 324, 400, 441, 484, 529, 900, 961, 1521, 1681, 2025, 2304, 2601, 3364, 3481, 3600, 4489, 4624, 5776, 5929, 7225, 7396, 8100, 8836, 9025, 10000, 10201, 10404, 10609, 10816, 11025, 12100, 12321, 12544, 12769
Offset: 1

Views

Author

Felice Russo, Feb 25 2000

Keywords

Comments

The numbers 81, 100, 121, 144, 169, 196, 225 are seven consecutive squares belonging to this sequence. The next set of seven consecutive squares whose digit sum is also a square is {9999^2, 10000^2, 10001^2, 10002^2, 10003^2, 10004^2, 10005^2}. (See Crux Mathematicorum link.) - Bernard Schott, May 24 2017
The first set of 8 consecutive squares begin at 46045846^2. This was already known in 2016, see MathStackExchange link. - Michel Marcus, May 25 2017
The first run of 9 consecutive squares starts at 302260461719025^2. - Giovanni Resta, Jun 08 2017

Examples

			144 is a term: 144 = 12^2 and 1 + 4 + 4 = 9 = 3^2. - _Bernard Schott_, May 24 2017
		

References

  • Felice Russo, A set of new Smarandache functions, sequences and conjectures in number theory, American Research Press, 2000.

Crossrefs

Subsequence of A000290.

Programs

  • Magma
    [n^2: n in [0..120] | IsSquare(&+Intseq(n^2))];  // Bruno Berselli, May 26 2011
    
  • Mathematica
    Select[Range[0,115]^2, IntegerQ[Sqrt[DigitSum[#]]]&] (* Stefano Spezia, Mar 07 2024 *)
  • PARI
    lista(nn) = for (n=1, nn, if (issquare(sumdigits(n^2)), print1(n^2, ", "));); \\ Michel Marcus, May 25 2017

Extensions

More terms from James Sellers, Feb 28 2000

A153745 Numbers k such that the number of digits d in k^2 is not prime and for each factor f of d the sum of the d/f digit groupings in k^2 of size f is a square.

Original entry on oeis.org

1, 2, 3, 39, 60, 86, 90, 321, 347, 401, 3387, 3414, 3578, 3900, 4767, 6000, 6549, 6552, 6744, 6780, 6783, 7387, 7862, 7889, 8367, 8598, 8600, 8773, 8898, 9000, 9220, 9884, 9885, 10000, 10001, 10002, 10003, 10004, 10005, 10010, 10011, 10012, 10013, 10020
Offset: 1

Views

Author

Doug Bell, Dec 31 2008

Keywords

Comments

This sequence is a subsequence of A061910.

Examples

			39^2 = 1521; 1+5+2+1 = 9 = 3^2 and 15+21 = 36 = 6^2.
321^2 = 103041; 1+0+3+0+4+1 = 9 = 3^2; 10+30+41 = 81 = 9^2; and 103+041 = 144 = 12^2.
		

Crossrefs

Programs

  • PARI
    isok(n) = {my(d = digits(n^2)); if (! isprime(#d), my(dd = divisors(#d)); for (k=1, #dd, my(tg = 10^dd[k]); my(s = 0); my(m = n^2); for (i=1, #d/dd[k], s += m % tg; m = m\tg;); if (! issquare(s), return(0));); return (1););} \\ Michel Marcus, Jun 06 2015
    
  • Python
    from sympy import divisors
    from gmpy2 import is_prime, isqrt_rem, isqrt, is_square
    A153745_list = []
    for l in range(1,20):
        if not is_prime(l):
            fs = divisors(l)
            a, b = isqrt_rem(10**(l-1))
            if b > 0:
                a += 1
            for n in range(a,isqrt(10**l-1)+1):
                ns = str(n**2)
                for g in fs:
                    y = 0
                    for h in range(0,l,g):
                        y += int(ns[h:h+g])
                    if not is_square(y):
                        break
                else:
                    A153745_list.append(n) # Chai Wah Wu, Jun 08 2015

Formula

a(n) = sqrt(A258660(n)). - Doug Bell, Jun 15 2015

Extensions

Data corrected by Doug Bell, Jan 19 2009
Name corrected by Doug Bell, Jun 06 2015

A061912 a(n) is the smallest m for which sqrt(sum of digits of m^2) = n.

Original entry on oeis.org

0, 1, 2, 3, 13, 67, 264, 1667, 16667, 94863, 1643167, 29983327, 706399164, 31144643167, 1296109172867, 62441868958167, 6927459779738887, 447213595487659543, 77453069648658793167, 14104963594032775808167, 3146266035952345970972687
Offset: 0

Views

Author

Asher Auel, May 17 2001

Keywords

Comments

a(15) <= 62441868958167. - Donovan Johnson, Jul 10 2012
a(21) <= 29999999949999914454883190583. a(22) <= 948566760423324122079007168333. - Zhining Yang, Jun 21 2024

Examples

			Sum of digits of 13^2 = sum of digits of 169 = 16 is the first occurrence of 4^2, so a(4) = 13.
		

Crossrefs

Programs

  • Maple
    f := []: a := 1: for i from 1 to 10 do for j from 1 do if sqrt(convert(convert(j^2,base,10),`+`)) = i then f := [op(f),j]; a := j; break fi; od; od; f;
  • Mathematica
    t={}; m=0; Do[While[Sqrt[Total[IntegerDigits[m^2]]] != n, m++]; AppendTo[t, m], {n,0,9}]; t (* Jayanta Basu, May 06 2013 *)
  • PARI
    a(n) = my(k=0); while(sumdigits(k^2) != n^2, k++); k; \\ Michel Marcus, Jan 07 2017

Extensions

a(11) from John W. Layman, Jan 10 2002
a(12) from Ryan Propper, Jul 07 2005
a(13) from Zak Seidov, Jan 27 2011
a(14) from Donovan Johnson, Jul 10 2012
a(15)-a(20) from Zhining Yang, Jun 21 2024

A061903 Number of distinct elements of the iterative cycle: n -> sum of digits of n^2.

Original entry on oeis.org

1, 1, 4, 1, 3, 3, 1, 2, 2, 1, 1, 4, 1, 2, 2, 1, 2, 3, 1, 2, 4, 1, 2, 2, 2, 2, 3, 2, 3, 2, 1, 2, 3, 2, 2, 2, 2, 3, 2, 1, 3, 2, 2, 3, 3, 1, 2, 2, 1, 3, 3, 1, 2, 3, 2, 2, 2, 2, 2, 2, 1, 2, 3, 3, 3, 2, 2, 3, 2, 2, 2, 2, 2, 3, 3, 2, 3, 3, 2, 2, 2, 2, 3, 3, 2, 2, 3, 3, 3, 3, 1, 3, 3, 3, 3, 2, 2, 3, 3, 2, 1, 4, 1, 2, 2
Offset: 0

Views

Author

Asher Auel, May 17 2001

Keywords

Comments

It seems that any such iterative cycle can contain at most 4 distinct elements.
a(197483417) = 5 is the first counterexample: 136 -> 28 -> 19 -> 10 -> 1. In fact this sequence is unbounded, since you can extend any chain leftward with the number k999...999 for suitably chosen k. In particular this gives the (pessimistic) bound that there is some n < 10^21942602 with a(n) = 6. - Charles R Greathouse IV, May 30 2014

Examples

			a(2) = 4 since 2 -> 4 -> 1+6 = 7 -> 4+9 = 13 -> 1+6+9 = 16 -> 2+5+6 = 13, thus {4,7,13,16} are the distinct elements of the iterative cycle of 2. a(6) = 1 since 6 -> 3+6 = 9 -> 8+1 = 9 thus 9 is the only element in the iterative cycle of 6.
		

Crossrefs

Programs

  • Maple
    A:= proc(n) local L,m,x;
      L:= {}; x:= n;
      do
        x:= convert(convert(x^2,base,10),`+`);
        if member(x,L) then return nops(L)  fi;
        L:= L union {x};
      od:
    end proc:
    seq(A(n), n=0..200); # Robert Israel, May 30 2014
  • PARI
    a(n)=my(v=List()); while(1, n=sumdigits(n^2); for(i=1, #v, if(n==v[i], return(#v))); listput(v,n)) \\ Charles R Greathouse IV, May 30 2014

Extensions

Corrected a(0) and example, Robert Israel, May 30 2014

A237525 Numbers k such that the sum of digits of k^3 is a cube.

Original entry on oeis.org

0, 1, 2, 5, 8, 10, 11, 20, 27, 33, 36, 39, 42, 50, 54, 57, 69, 72, 75, 78, 80, 84, 87, 93, 100, 101, 105, 108, 110, 111, 114, 135, 138, 147, 162, 165, 168, 174, 177, 200, 219, 222, 225, 228, 231, 234, 258, 267, 270, 273, 276, 285, 291, 294, 312
Offset: 1

Views

Author

Derek Orr, Feb 09 2014

Keywords

Comments

If k is in the sequence then so is 10*k. - David A. Corneth, May 26 2021

Examples

			36^3 = 46656. DigitSum(46656) = 27 (also a cube). So, 36 is a member of this sequence.
		

Crossrefs

Programs

  • PARI
    isok(n) = ispower(sumdigits(n^3), 3); \\ Michel Marcus, Feb 09 2014

Formula

a(n) = A053058(n)^(1/3).

A262711 Numbers k such that sum of digits of k^2 is 7.

Original entry on oeis.org

4, 5, 32, 40, 49, 50, 149, 320, 400, 490, 500, 1049, 1490, 3200, 4000, 4900, 5000, 10490, 14900, 32000, 40000, 49000, 50000, 104900, 149000, 320000, 400000, 490000, 500000, 1049000, 1490000, 3200000, 4000000, 4900000, 5000000, 10490000, 14900000
Offset: 1

Views

Author

Vincenzo Librandi, Sep 28 2015

Keywords

Comments

Subsequence of A156638. [Bruno Berselli, Sep 28 2015]

Examples

			4 is in sequence because 4^2 = 16 and 1+6 = 7.
		

Crossrefs

Cf. sum of digits of n^2 is k: A052216 (k=4), this sequence (k=7), A262712 (k=9), A262713 (k=10).
Cf. A215614.

Programs

  • Magma
    [n: n in [1..2*10^7] | &+Intseq(n^2) eq 7];
    
  • Mathematica
    Select[Range[10^7], Total[IntegerDigits[#^2]] == 7 &]
  • PARI
    for(n=1, 1e8, if (sumdigits(n^2) == 7, print1(n", "))) \\ Altug Alkan, Sep 28 2015

A061911 Square root of the sum of the digits of k^2 when this sum is a square.

Original entry on oeis.org

1, 2, 3, 3, 3, 1, 2, 3, 4, 4, 3, 3, 2, 3, 4, 4, 3, 4, 3, 4, 3, 3, 3, 4, 4, 3, 5, 4, 5, 5, 4, 5, 3, 5, 4, 1, 2, 3, 4, 4, 3, 2, 3, 4, 5, 3, 4, 5, 4, 4, 4, 4, 4, 3, 5, 5, 5, 4, 5, 3, 5, 4, 5, 5, 2, 3, 4, 4, 3, 4, 5, 4, 5, 4, 4, 5, 4, 4, 4, 3, 5, 5, 6, 4, 5, 5, 5, 5, 5, 5, 3, 4, 4, 4, 5, 3, 4, 3, 5, 4, 5, 4, 5, 4, 3
Offset: 1

Views

Author

Asher Auel, May 17 2001

Keywords

Examples

			6^2 = 36 and 3+6 = 9 is a square, thus 3 is in the sequence. 13^2 = 169 and 1+6+9 = 16 is a square, thus 4 is in the sequence.
		

Crossrefs

Programs

  • Maple
    readlib(issqr): f := []: for n from 1 to 200 do if issqr(convert(convert(n^2,base,10),`+`)) then f := [op(f),sqrt(convert(convert(n^2,base,10),`+`))] fi; od; f;
  • Mathematica
    Select[Table[Sqrt[Total[IntegerDigits[n^2]]],{n,350}],IntegerQ] (* Jayanta Basu, May 06 2013 *)

Formula

a(n) = sqrt(A004159(A061910(n))) = sqrt(A007953((A061910(n))^2)). - Zak Seidov, Jul 04 2012

A068833 Start of the first occurrence of exactly n consecutive squares with digit sum also a square.

Original entry on oeis.org

16, 36, 900, 3364, 0, 123409881, 10000, 81, 2120219933855716, 91361386718598177458046950625
Offset: 0

Views

Author

Amarnath Murthy, Mar 09 2002

Keywords

Examples

			a(7) = 81 as the sums of the digits of the 7 consecutive squares 81, 100, 121, 144, 169, 196, 225 are squares, but the digit sums of 64 and 256 are not.
		

Crossrefs

Programs

  • Mathematica
    l[n_] := Module[{k}, For[k=0, IntegerQ[Sqrt[Plus@@IntegerDigits[(n+k)^2]]], k++, Null]; k]; Clear[a]; For[n=0, True, n+=ln+1, If[a[ln=l[n]]==-1, Null, Null, a[ln]=n; Print["a(", ln, ")=", n^2]]]

Extensions

Edited by Dean Hickerson, Oct 28 2002
a(9) from Giovanni Resta, Aug 27 2018
Showing 1-10 of 31 results. Next