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.

Previous Showing 51-60 of 71 results. Next

A061904 Numbers n such that the iterative cycle: n -> sum of digits of n^2 has only one distinct element.

Original entry on oeis.org

1, 3, 6, 9, 10, 12, 15, 18, 21, 30, 39, 45, 48, 51, 60, 90, 100, 102, 105, 111, 120, 150, 180, 201, 210, 249, 300, 318, 321, 348, 351, 390, 450, 480, 501, 510, 549, 600, 900, 1000, 1002, 1005, 1011, 1020, 1050, 1101, 1110, 1149, 1200, 1500, 1761, 1800, 2001
Offset: 1

Views

Author

Asher Auel, May 17 2001

Keywords

Comments

Since the only numbers invariant under this iteration are 1 and 9, n is contained in this sequence iff the sum of digits of n^2 is 1 or 9.

Examples

			6 -> 3+6 = 9 -> 8+1 = 9 thus 9 is the only element of the iterative cycle of 6. 12 -> 1+4+4 = 9 -> 8+1 = 9 ...
		

Crossrefs

A061907 The iterative cycle: n -> sum of digits of n^2 has only four distinct elements.

Original entry on oeis.org

2, 11, 20, 101, 110, 134, 136, 163, 172, 197, 200, 217, 233, 242, 244, 262, 278, 287, 296, 298, 307, 313, 314, 316, 343, 359, 386, 397, 406, 413, 422, 424, 431, 433, 442, 458, 467, 469, 476, 478, 487, 514, 523, 541, 577, 583, 586, 593, 604, 613, 614, 622
Offset: 1

Views

Author

Asher Auel, May 17 2001

Keywords

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.
		

Crossrefs

A118470 Numbers k for which digitsum(k) + digitsum(k^2) + digitsum(k^3) = digitsum(k^4).

Original entry on oeis.org

0, 162, 171, 351, 468, 558, 1620, 1710, 2106, 3321, 3510, 4023, 4680, 5121, 5247, 5544, 5580, 5868, 8001, 10008, 10071, 10224, 10305, 10503, 10818, 11025, 11241, 11511, 12321, 12654, 12888, 13239, 14004, 14301, 15471, 15876, 16011, 16200, 16218, 17100
Offset: 1

Views

Author

Luc Stevens (lms022(AT)yahoo.com), May 04 2006

Keywords

Comments

If x is a term, then so is 10*x. - Michael S. Branicky, Dec 25 2021

Examples

			162 is a term because s(162) = 9, s(162^2) = 18, s(162^3) = 27, s(162^4) = 54 and 9 + 18 + 27 = 54.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[0, 20000], Sum[i*(DigitCount[ # ][[i]] + DigitCount[ #^2][[i]] + DigitCount[ #^3][[i]]), {i, 1, 9}] == Sum[i*DigitCount[ #^4][[i]], {i, 1, 9}] &] (* Stefan Steinerberger, May 04 2006 *)
    s[n_] := Plus @@ IntegerDigits@n; Select[ Range[0, 16217], s@# + s[ #^2] + s[ #^3] == s[ #^4] &] (* Robert G. Wilson v, May 04 2006 *)
    Parallelize[While[True,If[Total[IntegerDigits[n]]+Total[IntegerDigits[n^2]]+Total[IntegerDigits[n^3]]==Total[IntegerDigits[n^4]],Print[n]];n++];n] (* J.W.L. (Jan) Eerland, Dec 25 2021 *)
  • PARI
    is(n)=my(s=sumdigits); s(n)+s(n^2)+s(n^3) == s(n^4) \\ Anders Hellström, Sep 16 2015
    
  • PARI
    select(isA118470(n)={sumdigits(n)+sumdigits(n^2)+sumdigits(n^3) == sumdigits(n^4)}, [0..1000]) \\ J.W.L. (Jan) Eerland, Dec 25 2021
    
  • Python
    def sd(n): return sum(map(int, str(n)))
    def ok(n): return sd(n) + sd(n**2) + sd(n**3) == sd(n**4)
    print([k for k in range(20000) if ok(k)]) # Michael S. Branicky, Dec 25 2021

Extensions

More terms from Joshua Zucker, May 11 2006

A153753 Numbers k such that there are 18 digits in k^2 and for each factor f of 18 (1,2,3,6,9) the sum of digit groupings of size f is a square.

Original entry on oeis.org

324344373, 333306315, 333321861, 333359685, 333361029, 334363803, 369396732, 370397193, 407380269, 407381484, 444475035, 666636972, 666695028, 666701463, 702667239, 702671124, 702736170, 703667130, 704741610
Offset: 1

Views

Author

Doug Bell, Dec 31 2008

Keywords

Comments

This sequence is a subsequence of both A153745 and A061910.

Examples

			324344373^2 = 105199272296763129;
1+0+5+1+9+9+2+7+2+2+9+6+7+6+3+1+2+9 = 81 = 9^2;
10+51+99+27+22+96+76+31+29 = 441 = 21^2;
105+199+272+296+763+129 = 1764 = 42^2;
105199+272296+763129 = 1140624 = 1068^2;
105199272+296763129 = 401962401 = 20049^2.
		

Crossrefs

A159879 Numbers n such that digit sum of n^2 is 2*(digit sum of n).

Original entry on oeis.org

0, 2, 11, 20, 27, 36, 54, 72, 74, 81, 92, 101, 108, 110, 128, 135, 144, 153, 162, 171, 191, 200, 209, 218, 225, 227, 252, 254, 261, 270, 317, 326, 344, 353, 360, 371, 387, 405, 416, 425, 504, 506, 515, 540, 605, 641, 684, 711, 720, 722, 731, 740, 767, 774, 801
Offset: 1

Views

Author

Zak Seidov, Apr 25 2009

Keywords

Comments

A007953(n^2) = 2*A007953(n), sod(n^2) = 2*sod(n).
a(n) == {0 or 2} (mod 9). - Robert G. Wilson v, May 27 2009

Crossrefs

A007953 Digital sum (i.e., sum of digits) of n. A004159 Sum of digits of n^2.

Programs

  • Mathematica
    fQ[n_] := Plus @@ IntegerDigits[n^2] == 2 Plus @@ IntegerDigits@n; Select[ Range[0, 809], fQ@# &] (* Robert G. Wilson v, May 27 2009 *)

Extensions

Indices in b-file corrected by N. J. A. Sloane, Aug 31 2009

A166550 Numbers n with property that n^2 and n-th prime have the same sum of digits.

Original entry on oeis.org

4, 8, 11, 22, 34, 59, 61, 85, 179, 229, 260, 266, 352, 385, 391, 403, 418, 440, 491, 565, 595, 619, 724, 770, 832, 844, 961, 965, 980, 1012, 1039, 1069, 1075, 1099, 1108, 1127, 1139, 1148, 1211, 1217, 1390, 1468, 1585, 1589, 1649, 1747, 1780, 1789, 1795, 1799
Offset: 1

Views

Author

Zak Seidov, Oct 16 2009

Keywords

Comments

Examples

			4^2=16, prime(4)=7, 1+6=7
8^2=64, prime(8)=19, 6+4=1+9
11^2=121, prime(11)=31, 1+2+1=3+1
22^2=484, prime(22)=79, 4+8+4=7+9
34^2=1156, prime(22)=139, 1+1+5+6=1+3+9.
		

Crossrefs

Cf. A117224 Numbers for which the square and the cube have the same digital sum, A007605 Sum of digits of n-th prime, A004159 Sum of digits of n^2.

Programs

  • Mathematica
    Position[Table[Plus@@IntegerDigits[Prime[n]]-Plus@@IntegerDigits[n^2],{n,1,3000}],0]//Flatten
    Select[Range[2000],Total[IntegerDigits[#^2]]==Total[IntegerDigits[ Prime[ #]]]&] (* Harvey P. Dale, May 22 2015 *)

A185076 a(n) is the least number k such that (sum of digits of k^2) + (number of digits of k^2) = n, or 0 if no such k exists.

Original entry on oeis.org

0, 1, 0, 10, 2, 100, 11, 1000, 4, 3, 6, 8, 19, 35, 7, 16, 34, 106, 13, 41, 24, 17, 37, 107, 323, 43, 124, 317, 67, 113, 63, 114, 134, 343, 83, 133, 367, 1024, 167, 374, 264, 314, 386, 1043, 313, 583, 1303, 3283, 707, 1183, 3316, 836, 1333, 3286, 10133
Offset: 1

Views

Author

Carmine Suriano, Feb 23 2011

Keywords

Comments

a(n) < sqrt(10^(n-1)). 0 < a(2m) <= 10^(m-1) with the upper bound reached for 1<=m<=4. - Chai Wah Wu, Mar 15 2023

Examples

			a(7)=11 since 7 = sumdigits(121) + numberdigits(121) = 4 + 3.
		

Crossrefs

Programs

  • Mathematica
    Table[k=1; While[d=IntegerDigits[k^2]; n>Length[d] && n != Total[d] + Length[d], k++]; If[Length[d] >= n, k=0]; k, {n, 50}]
  • Python
    from itertools import count
    def A185076(n):
        for k in count(1):
            if n == (t:=len(s:=str(k**2)))+sum(map(int,s)):
                return k
            if t >= n:
                return 0 # Chai Wah Wu, Mar 15 2023

Formula

n = A004159(a(n)) + A185679(a(n)).

A215618 Sum of digits of n^2 is a square.

Original entry on oeis.org

1, 2, 3, 6, 9, 11, 12, 13, 14, 15, 18, 21, 22, 23, 31, 39, 41, 45, 48, 51, 58, 59, 67, 68, 76, 77, 85, 86, 94, 95, 101, 102, 103, 104, 105, 111, 112, 113, 121, 122, 131, 139, 148, 157, 158, 166, 175, 176, 184, 185, 193, 194, 201, 202, 203, 211, 212, 221, 229
Offset: 1

Views

Author

Zak Seidov, Aug 17 2012

Keywords

Comments

No trailing zeros allowed.

Examples

			a(59)=229 because 229^2=52441 and 5+2+4+4+1=16=4^2.
		

Crossrefs

Cf. A004159 (sum of digits of n^2).

Programs

  • Mathematica
    sdn2Q[n_]:=Module[{idn2=IntegerDigits[n^2]},Last[idn2]>0&&IntegerQ[Sqrt[ Total[idn2]]]]; Select[Range[300],sdn2Q] (* Harvey P. Dale, Aug 27 2013 *)

A224977 n^2 minus sum of digits of n^2.

Original entry on oeis.org

0, 0, 0, 0, 9, 18, 27, 36, 54, 72, 99, 117, 135, 153, 180, 216, 243, 270, 315, 351, 396, 432, 468, 513, 558, 612, 657, 711, 765, 828, 891, 945, 1017, 1071, 1143, 1215, 1278, 1350, 1431, 1512, 1593, 1665, 1746, 1827, 1917, 2016, 2106, 2196, 2295, 2394, 2493
Offset: 0

Views

Author

Keywords

Comments

a(n) mod 9 = 0 for all n.

Examples

			a(0) = 0^2 - 0 = 0.
a(12) = 144 - (1+4+4) = 135.
		

Crossrefs

Cf. A067552.
Derived from A000290 and A004159.

Programs

  • Mathematica
    Table[n^2 - Sum[DigitCount[n^2][[i]]i, {i, 9}], {n, 50}] (* Alonso del Arte, Apr 21 2013 *)
    #^2-Total[IntegerDigits[#^2]]&/@Range[0,50] (* Harvey P. Dale, May 10 2017 *)
  • R
    library(gmp); digsum<-function(x) sum(as.numeric(unlist(strsplit(as.character(x),split=""))))
    ans=rep(0,100); n=0
    while(n<=100) ans[(n=n+1)]=n^2-digsum(n^2); ans

Formula

a(n) = A000290(n) - A004159(n).

A268135 Numbers n such that the digit sum of n^2 is a divisor of the digit sum of n.

Original entry on oeis.org

1, 9, 10, 18, 19, 45, 46, 55, 90, 99, 100, 145, 149, 180, 189, 190, 198, 199, 289, 351, 361, 369, 379, 388, 450, 451, 459, 460, 468, 495, 496, 549, 550, 558, 559, 568, 585, 595, 639, 729, 739, 775, 838, 855, 900, 954, 955, 990, 999, 1000, 1049, 1098, 1099, 1179, 1188, 1189, 1198
Offset: 1

Views

Author

Melvin Peralta, Jan 26 2016

Keywords

Comments

Because A058369 (with offset 1) is a subsequence, this sequence is infinite.
Conjecture: The relative complement of A058369 with respect to this sequence is infinite. That is, there are infinitely many n such that the digit sum of n^2 is a proper divisor of the digit sum of n.
If the digit sum of n^2 is a proper divisor of the digit sum of n, then this property holds for 10*n as well, i.e. the digit sum of n = 149*10^k has as a proper divisor the digit sum of n^2 for all k > 0. Are there infinitely many n that are not a multiple of 10 such that the digit sum of n^2 is a proper divisor of the digit sum of n? The first few such numbers are: 149, 549, 1049, 14499, 19499, 55679, 59499, 64499, 73499, 118499, 144999, 145949, 179249, 244949, 244998, 334679, 347855, 473499, 548735, 549549, 549639, 556965, 837855, ... - Chai Wah Wu, Mar 16 2016

Examples

			Digit sum of 149^2 = 7. Digit sum of 149 = 14. Since 7 is a divisor of 14, 149 is in the sequence.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[200], Mod[Total[IntegerDigits[#]], Total[IntegerDigits[#^2]]] == 0 &]
  • PARI
    isok(n) = (sumdigits(n) % sumdigits(n^2)) == 0; \\ Michel Marcus, Jan 27 2016

Extensions

More terms from Michel Marcus, Jan 27 2016
Previous Showing 51-60 of 71 results. Next