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 11-20 of 23 results. Next

A351650 Integers m such that digsum(m) divides digsum(m^2) where digsum = sum of digits = A007953.

Original entry on oeis.org

1, 2, 3, 9, 10, 11, 12, 13, 18, 19, 20, 21, 22, 24, 27, 30, 31, 33, 36, 42, 45, 46, 54, 55, 63, 72, 74, 81, 90, 92, 99, 100, 101, 102, 103, 108, 110, 111, 112, 113, 117, 120, 121, 122, 123, 126, 128, 130, 132, 135, 144, 145, 153, 162, 171, 180, 189, 190, 191, 198
Offset: 1

Views

Author

Bernard Schott, Feb 16 2022

Keywords

Comments

This is a generalization of a problem proposed by French site Diophante in link.
The smallest term k such that the corresponding quotient = n is A280012(n).
The quotient is 1 iff m is in A058369 \ {0}.
If k is in A061909, then digsum(k^2) = digsum(k)^2.
If k is a term, 10*k is also a term.
There are infinitely many m such that both m and m+1 are in the sequence, for example subsequence A002283 \ {0}.
Corresponding quotients are in A351651.

Examples

			digit sum of 42 = 4+2 = 6; then 42^2 = 1764, digit sum of 1764 = 1+7+6+4 = 18; as 6 divides 18, 42 is a term.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[200], Divisible[Total[IntegerDigits[#^2]], Total[IntegerDigits[#]]] &] (* Amiram Eldar, Feb 16 2022 *)
  • PARI
    is(n)=sumdigits(n^2)%sumdigits(n) == 0 \\ David A. Corneth, Feb 16 2022
    
  • Python
    def sd(n): return sum(map(int, str(n)))
    def ok(n): return sd(n**2)%sd(n) == 0
    print([m for m in range(1, 200) if ok(m)]) # Michael S. Branicky, Feb 16 2022

Formula

A004159(a(n)) = A007953(a(n)) * A351651(n).

Extensions

More terms from David A. Corneth, Feb 16 2022

A117224 Numbers for which the square and the cube have the same digital sum.

Original entry on oeis.org

0, 1, 3, 6, 10, 24, 28, 30, 37, 60, 64, 81, 87, 93, 100, 114, 118, 136, 163, 219, 222, 228, 234, 240, 252, 258, 267, 273, 276, 280, 291, 294, 300, 312, 316, 342, 343, 370, 384, 387, 433, 447, 468, 469, 477, 478, 507, 525, 534, 537, 541, 585, 591, 600, 606, 613
Offset: 1

Views

Author

Luc Stevens (lms022(AT)yahoo.com), Apr 21 2006

Keywords

Examples

			24 is in the sequence because 24^2 = 576, 24^3 = 13824 and 5 + 7 + 6 = 1 + 3 + 8 + 2 + 4.
		

Crossrefs

Cf. A058369.

Programs

  • Magma
    [n: n in [0..613] | &+Intseq(n^2) eq &+Intseq(n^3)];  // Bruno Berselli, Jun 28 2011
    
  • Maple
    a:=proc(n) local nn,nnn: nn:=convert(n^2,base,10): nnn:=convert(n^3,base,10): if sum(nn[i],i=1..nops(nn))=sum(nnn[j],j=1..nops(nnn)) then n else fi end: seq(a(n),n=0..620); # Emeric Deutsch, Apr 27 2006
  • Mathematica
    scdsQ[n_]:=Total[IntegerDigits[n^2]]==Total[IntegerDigits[n^3]]; Select[ Range[ 0,700],scdsQ] (* Harvey P. Dale, Jan 23 2019 *)
  • PARI
    is(n) = sumdigits(n^2) == sumdigits(n^3) \\ David A. Corneth, Sep 05 2020

Extensions

Offset corrected by Arkadiusz Wesolowski, Jun 28 2011

A260702 Numbers n such that 3*n and n^2 have the same digit sum.

Original entry on oeis.org

0, 3, 6, 9, 12, 15, 18, 21, 30, 33, 39, 45, 48, 51, 60, 66, 90, 96, 99, 102, 105, 111, 120, 123, 129, 132, 150, 153, 156, 159, 162, 165, 180, 189, 195, 198, 201, 210, 225, 231, 246, 252, 255, 261, 285, 300, 330, 333, 348, 351, 390, 399, 429, 450, 453, 459, 462
Offset: 1

Views

Author

Vincenzo Librandi, Nov 17 2015

Keywords

Comments

All terms are multiple of 3.
If n is in the sequence, then so is 10*n. - Robert Israel, Apr 05 2020

Examples

			159 is in the sequence because 159^2 = 25281 and 3*159 = 477 have the same digit sum: 18.
		

Crossrefs

Programs

  • Magma
    [n: n in [0..500] | &+Intseq(3*n) eq &+Intseq(n^2)];
    
  • Maple
    select(n -> convert(convert(3*n,base,10),`+`)=convert(convert(n^2,base,10),`+`), [seq(i,i=0..1000,3)]); # Robert Israel, Apr 05 2020
  • Mathematica
    Select[Range[0, 500], Total[IntegerDigits[3 #]] == Total[IntegerDigits[#^2]] &]
  • PARI
    isok(n) = sumdigits(3*n) == sumdigits(n^2); \\ Michel Marcus, Nov 17 2015
    
  • Sage
    [n for n in (0..500) if sum((3*n).digits())==sum((n^2).digits())] # Bruno Berselli, Nov 17 2015

Formula

A007953(A008585(a(n))) = A007953(A000290(a(n))).

A309883 Numbers k such that A003132(k^2) = A003132(k), where A003132(n) is the sum of the squares of the digits of n.

Original entry on oeis.org

0, 1, 10, 35, 100, 152, 350, 377, 452, 539, 709, 1000, 1299, 1398, 1439, 1519, 1520, 1569, 1591, 1679, 1965, 2599, 2838, 3332, 3500, 3598, 3770, 4520, 4586, 4754, 4854, 5390, 5501, 5835, 5857, 6388, 6595, 6735, 6861, 6951, 7090, 7349, 7887, 8395, 9795, 10000, 10056, 10159, 10389, 11055, 11091, 12990, 12999
Offset: 1

Views

Author

Antonio Roldán, Aug 21 2019

Keywords

Comments

If k is in the sequence, then so are k*10^r, r >= 1.

Examples

			377^2 = 142129, A003132(377) = 3^2 + 7^2 + 7^2 = 107, A003132(142129) = 1^2 + 4^2 + 2^2 + 1^2 + 2^2 + 9^2 = 107.
		

Crossrefs

Programs

  • Magma
    [0] cat [k:k in [1..13000]| &+[c^2: c in Intseq(k)] eq &+[c^2: c in Intseq(k^2)]]; // Marius A. Burtea, Aug 24 2019
  • Maple
    filter:= proc(n) local t;
      add(t^2, t = convert(n,base,10)) = add(t^2, t = convert(n^2,base,10))
    end proc:
    select(filter, [$0..20000]); # Robert Israel, Apr 30 2023
  • Mathematica
    digSum[n_] := Total[IntegerDigits[n]^2]; Select[Range[0, 13000], digSum[#] == digSum[#^2] &] (* Amiram Eldar, Aug 22 2019 *)
  • PARI
    for(i = 0, 30000, if(norml2(digits(i^2)) == norml2(digits(i)), print1(i, ", ")))
    
  • Python
    def A003132(n):
        s = 0
        while n > 0:
            s, n = s+(n%10)**2, n//10
        return s
    n, a = 0, 0
    while n < 50:
        if A003132(a) == A003132(a*a):
            n = n+1
            print(n,a)
        a = a+1 # A.H.M. Smeets, Aug 23 2019
    

A261640 Numbers n such that the digital sum of n is the same as the digital sum of n^2 in both base 2 and base 10.

Original entry on oeis.org

0, 1, 351, 379, 496, 558, 639, 1495, 1792, 3259, 4600, 5950, 6399, 6588, 8568, 10494, 10495, 12799, 17380, 17919, 26479, 38872, 38880, 44991, 44992, 46585, 48888, 56952, 59247, 60895, 64639, 89839, 89848, 89856, 92799, 105390, 142848, 168895, 174078, 179596
Offset: 1

Views

Author

Tom Edgar, Aug 27 2015

Keywords

Comments

Intersection of A077436 and A058369.
Numbers such that A007953(n) = A007953(n^2) and A000120(n) = A000120(n^2).

Examples

			Consider the number n = 351 so n^2 = 123201. The base-10 digit sums of 351 and 123201 are both 9. Moreover, 351 has binary representation 101011111 and 123201 has binary representation 11110000101000001 and both have base-2 digit sum = 7. Thus 351 is a term in the sequence.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[0,180000],Total[IntegerDigits[#]]==Total[IntegerDigits[#^2]]&&Total[ IntegerDigits[ #,2]]==Total[IntegerDigits[#^2,2]]&] (* Harvey P. Dale, May 29 2023 *)
  • Sage
    [n for n in [0..200000] if sum((n).digits(2))==sum((n^2).digits(2)) and sum((n).digits())==sum((n^2).digits())]

Extensions

Name (definition) and Example edited by Harvey P. Dale, May 29 2023

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

A309884 Numbers k such that A003132(k^3) = A003132(k), where A003132(n) is the sum of the squares of the digits of n.

Original entry on oeis.org

0, 1, 10, 74, 100, 740, 1000, 3488, 7400, 10000, 23658, 30868, 34880, 47508, 48517, 52187, 58947, 59468, 67685, 68058, 74000, 76814, 78368, 78845, 84878, 100000, 108478, 145877, 149217, 163871, 179685, 186884, 188647, 218977, 219878, 236580, 238758, 248967, 278638, 292597, 308680
Offset: 1

Views

Author

Antonio Roldán, Aug 21 2019

Keywords

Comments

If k is in the sequence, then so are k*10^r, with r >= 1.

Examples

			74^3 = 405224, A003132(74) = 7^2 + 4^2 = 65, A003132(405224) = 4^2 + 0^2 + 5^2 + 2^2 + 2^2 + 4^2 = 65.
		

Crossrefs

Programs

  • Magma
    [0] cat [k:k in [1..310000]| &+[c^2: c in Intseq(k)] eq &+[c^2: c in Intseq(k^3)]]; // Marius A. Burtea, Aug 26 2019
  • Mathematica
    digSum[n_] := Total[IntegerDigits[n]^2]; Select[Range[0, 310000], digSum[#] == digSum[#^3] &] (* Amiram Eldar, Aug 22 2019 *)
  • PARI
    for(i = 0, 400000, if(norml2(digits(i^3)) == norml2(digits(i)), print1(i, ", ")))
    

A325450 Numbers k such that sum of digits (k) and sum of digits (k^2) is 9.

Original entry on oeis.org

9, 18, 45, 90, 180, 351, 450, 900, 1800, 3510, 4500, 9000, 18000, 35100, 45000, 90000, 180000, 351000, 450000, 900000, 1800000, 3510000, 4500000, 9000000, 18000000
Offset: 1

Views

Author

Vincenzo Librandi, May 10 2019

Keywords

Comments

A007953(A058369(n)) begins with 1, 9, 1, 9, 10, 9, 10, 10, 9, 18, ...; the 1's come from A011557, the 9's come from this sequence, the 10's come from A325451.

Examples

			a(3) = 45 because 4+5 = 9, 45^2 = 2025, and 2+0+2+5 = 9.
		

Crossrefs

Subsequence of A058369 (k and k^2 have same digit sum).

Programs

  • Magma
    [n: n in [1..2*10^7] | &+Intseq(n^2) eq 9  and &+Intseq(n) eq 9];
  • Mathematica
    Select[Range[2 10^7], Total[IntegerDigits[#]]==9&& Total[IntegerDigits[#^2]]==9&]

A325451 Numbers k such that sum of digits (k) and sum of digits (k^2) is 10.

Original entry on oeis.org

19, 46, 55, 145, 190, 361, 451, 460, 550, 1450, 1900, 3610, 4510, 4600, 5500, 14500, 19000, 20251, 36100, 45100, 46000, 55000, 145000, 190000, 202510, 361000, 451000, 460000, 550000, 1450000, 1900000, 2025100, 3610000, 4510000, 4600000, 5500000, 14500000
Offset: 1

Views

Author

Vincenzo Librandi, May 10 2019

Keywords

Comments

Subsequence of A058369 (k and k^2 have same digit sum).
A007953(A058369(n)) begins with 1, 9, 1, 9, 10, 9, 10, 10, 9, 18, ...: the 1's come from A011557, the 9's come from A325450, and the 10's come from this sequence.

Examples

			a(4) = 145 because 1+4+5 = 10, 145^2 = 21025, and 2+1+0+2+5 = 10.
		

Crossrefs

Programs

  • Magma
    [n: n in [1..2*10^7] | &+Intseq(n^2) eq 10  and &+Intseq(n) eq 10];
  • Mathematica
    Select[Range[2 10^7], Total[IntegerDigits[#]]==10 && Total[IntegerDigits[#^2]]==10 &]

A351651 a(n) is the quotient obtained when digsum(m^2) is divided by digsum(m), with digsum = sum of digits = A007953 and m = A351650(n).

Original entry on oeis.org

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

Views

Author

Bernard Schott, Feb 16 2022

Keywords

Comments

All positive integers are terms of this sequence (see A280012).
a(n) = 1 iff m = A351650(n) is a term of A058369 \ {0}.
a(n) = digsum(n) if m = A351650(n) is a term of A061909 \ {0}.

Examples

			A351650(8) = 13, then digsum(13) = 1+3 = 4 while digsum(13^2) = digsum(169) = 1+6+9 = 16; hence, a(8) = 16/4 = 4.
		

Crossrefs

Programs

  • Mathematica
    Select[Total[IntegerDigits[#^2]]/Total[IntegerDigits[#]]& /@ Range[300], IntegerQ] (* Amiram Eldar, Feb 16 2022 *)
  • PARI
    lista(nn) = {my(list = List(), q); for (n=1, nn, if (denominator(q=sumdigits(n^2)/sumdigits(n))==1, listput(list, q));); Vec(list);} \\ Michel Marcus, Feb 16 2022

Formula

a(n) = A004159(A351650(n)) / A007953(A351650(n)).

Extensions

More terms from Michel Marcus, Feb 16 2022
Previous Showing 11-20 of 23 results. Next