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-8 of 8 results.

A111434 Numbers k such that the sums of the digits of k, k^2 and k^3 coincide.

Original entry on oeis.org

0, 1, 10, 100, 468, 585, 1000, 4680, 5850, 5851, 5868, 10000, 28845, 46800, 58500, 58510, 58680, 58968, 100000, 288450, 468000, 585000, 585100, 586800, 589680, 1000000, 2884500, 4680000, 5850000, 5851000, 5868000, 5896800, 10000000
Offset: 1

Views

Author

Giovanni Resta, Nov 21 2005

Keywords

Comments

The sequence is clearly infinite, since we can add trailing zeros. Is the subset of values not ending in 0 infinite too (see A114135)?

Examples

			468 is in the sequence since 468^2 = 219024 and 468^3 = 102503232 and we have 18 = 4+6+8 = 2+1+9+0+2+4 = 1+0+2+5+0+3+2+3+2.
5851 is in the sequence because 5851, 34234201 (= 5851^2) and 200304310051 (=5851^3) all have digital sum 19.
		

Crossrefs

Programs

  • Maple
    s:=proc(n) local nn: nn:=convert(n,base,10): sum(nn[j],j=1..nops(nn)): end: a:=proc(n) if s(n)=s(n^2) and s(n)=s(n^3) then n else fi end: seq(a(n),n=0..1000000); # Emeric Deutsch, May 13 2006
  • Mathematica
    SumOfDig[n_]:=Apply[Plus, IntegerDigits[n]]; Do[s=SumOfDig[n]; If[s==SumOfDig[n^2] && s==SumOfDig[n^3], Print[n]], {n, 10^6}]
    Select[Range[0,10000000],Length[Union[Total/@IntegerDigits[{#,#^2,#^3}]]] == 1&] (* Harvey P. Dale, Apr 26 2014 *)

Extensions

b-file Corrected by David A. Corneth, Jul 22 2021

A292788 For n > 1, a(n) = least positive k, not a power of n, such that the digital sum of k in base n equals the digital sum of k^3 in base n.

Original entry on oeis.org

56953, 13, 2, 3, 20, 2, 6, 3, 8, 5, 1110, 3, 65, 8, 4, 7, 86, 9, 2374, 4, 8, 12, 114, 3, 99, 12, 135, 15, 3567, 4, 185, 15, 11, 16, 6, 19, 73, 20, 12, 5, 81, 6, 85, 23, 19, 24, 93, 7, 97, 24, 18, 27, 796, 28, 44, 7, 19, 28, 413, 4, 365, 32, 8, 31, 26, 21, 200
Offset: 2

Views

Author

Rémy Sigrist, Sep 23 2017

Keywords

Comments

The term a(10) = 8 belongs to A070276.
For any n > 1, a(n^2) <= n.
Is this sequence defined for any n > 1 ?
Apparently, a(k) < k for any odd k > 3.
Among the first 99 999 terms, the digital sum of a(n) in base n is > n for n = 2, 12, 20, 30.
The scatterplot of the sequence shows beams on the upper part, which correspond to clusters of close points for which a(n) = k*n + (n-k-e) for some k > 0 and e in { 0, 2 }.
See also A292787 for a similar sequence involving squares instead of cubes.
The least positive k, not a power of 2, such that the hamming weight of k equals the hamming weight of k^4 is 34225258495.

Examples

			For n = 3:
- let d_3 denote the digital sum in base 3 (d_3 = A053735),
- 1 is a power of 3,
- d_3(2) = 2 and d_3(2^3) = 4,
- 3 is a power of 3,
- d_3(4) = 2 and d_3(4^3) = 4,
- d_3(5) = 3 and d_3(5^3) = 7,
- d_3(6) = 2 and d_3(6^3) = 4,
- d_3(7) = 3 and d_3(7^3) = 5,
- d_3(8) = 4 and d_3(8^3) = 8,
- 9 is a power of 3,
- d_3(10) = 2 and d_3(10^3) = 4,
- d_3(11) = 3 and d_3(11^3) = 9,
- d_3(12) = 2 and d_3(12^3) = 4,
- d_3(13) = 3 and d_3(13^3) = 3,
- hence a(3) = 13.
		

Crossrefs

Programs

  • Mathematica
    With[{kk = 10^5}, Table[SelectFirst[Complement[Range[2, kk], n^Range@ Floor@ Log[n, kk]], Total@ IntegerDigits[#, n] == Total@ IntegerDigits[#^3, n] &] /. k_ /; MissingQ@ k -> -1, {n, 2, 68}]] (* Michael De Vlieger, Sep 24 2017 *)
  • PARI
    a(n) = my (p=1); for (k=1, oo, if (k==p, p*=n, if (sumdigits(k,n) == sumdigits(k^3,n), return (k))))

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
    

A204324 Numbers k such that A007953(k) >= A007953(k^3), where A007953 = digital sum in base 10.

Original entry on oeis.org

0, 1, 8, 10, 80, 100, 171, 378, 468, 487, 577, 585, 586, 587, 684, 800, 1000, 1710, 3780, 4680, 4870, 4877, 5770, 5850, 5851, 5860, 5868, 5870, 6840, 8000, 10000, 15877, 17100, 28845, 28847, 28885, 28887, 37800, 46800, 46877, 48700, 48770, 48784, 49468
Offset: 1

Views

Author

M. F. Hasler, Jan 14 2012

Keywords

Comments

When k is in the sequence, then 10*k is in the sequence, too.

Crossrefs

Programs

  • Mathematica
    Select[Range[0,51000],Total[IntegerDigits[#]]>=Total[IntegerDigits[#^3]]&] (* Harvey P. Dale, Jul 05 2025 *)
  • PARI
    for(n=0,1e6, A007953(n)>=A007953(n^3)&print1(n","))

Formula

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

Original entry on oeis.org

0, 171, 324, 378, 468, 684, 1710, 3240, 3780, 4680, 6840, 17100, 28845, 29241, 32400, 34884, 37800, 46800, 46944, 48924, 68400, 69174, 84348, 171000, 242424, 288450, 292410, 324000, 348840, 378000, 467424, 468000, 469440, 489240, 493794, 684000, 691740
Offset: 1

Views

Author

Vincenzo Librandi, Jan 01 2016

Keywords

Examples

			171 is in the sequence because 171^3 = 5000211 and 2*171 = 342 have the same digit sum: 9.
		

Crossrefs

Programs

  • Magma
    [n: n in [0..2*10^6] | &+Intseq(2*n) eq &+Intseq(n^3)];
    
  • Mathematica
    Select[Range[0, 7 10^5], Total[IntegerDigits[2 #]] == Total[IntegerDigits[#^3]] &]
  • PARI
    isok(n) = sumdigits(2*n)==sumdigits(n^3); \\ Michel Marcus, Jan 02 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, ", ")))
    

A321881 Numbers whose sum and product of digits are cubes.

Original entry on oeis.org

0, 1, 8, 10, 80, 100, 107, 170, 206, 260, 305, 350, 404, 440, 503, 530, 602, 620, 701, 710, 800, 999, 1000, 1007, 1016, 1025, 1034, 1043, 1052, 1061, 1070, 1106, 1124, 1142, 1160, 1205, 1214, 1241, 1250, 1304, 1340, 1403, 1412, 1421, 1430, 1502, 1520, 1601, 1610, 1700
Offset: 1

Views

Author

Enrique Navarrete, Nov 20 2018

Keywords

Comments

The first numbers in the sequence that are cubes themselves are 0,1,8,1000,8000.
a(22)=999 is the only term up to n=120 related to the cube 27 (the previous ones relate to 0,1,8).
Also, a(22)=999 is the first term that has more than one digit and consists of a single repeated digit; the next ones are 11111111 and 333333333.

Examples

			93111111111111111 (15 ones) is in the sequence since the sum and the product of the digits is 27 (a cube).
333 is not in the sequence since the product of the digits is 27 but the sum is 9 (not a cube).
		

Crossrefs

Programs

  • Magma
    [n:n in [0..2000]| IsPower((&+Intseq(n)), 3) and IsPower((&*Intseq(n)), 3)] // Marius A. Burtea, Jan 21 2019
  • Maple
    filter:= proc(n) local L;
      L:= convert(n,base,10);
      simplify(convert(L,`+`)^(1/3))::integer and
      simplify(convert(L,`*`)^(1/3))::integer;
    end proc:
    select(filter, [$0..1000]); # Robert Israel, Jan 21 2019
  • Mathematica
    cubeQ[n_] := IntegerQ[Surd[n, 3]]; aQ[n_] := cubeQ[Plus @@ IntegerDigits[n]] &&
    cubeQ[Times @@ IntegerDigits[n]]; Select[Range[0, 3000], aQ] (* Amiram Eldar, Nov 20 2018 *)
  • PARI
    isok(n) = my(d=digits(n)); ispower(vecsum(d), 3) && ispower(vecprod(d), 3); \\ Michel Marcus, Nov 29 2018
    

A124667 Prime numbers p such that the sum of the digits of p equals the sums of the digits of p^3.

Original entry on oeis.org

487, 577, 4877, 5851, 15877, 467587, 496187, 697967, 5889959, 8194787, 14596991, 17978887, 27698887, 47959487, 58590487, 58678903, 59489371, 79492771, 79897897, 79932871, 109148887, 109696969, 145969757, 227799577, 276857947
Offset: 1

Views

Author

Tanya Khovanova, Dec 23 2006

Keywords

Examples

			487^3 = 115501303 -- the sum of the digits of 487 and 115501303 is the same and is equal to 19.
		

Crossrefs

An equivalent sequence for squares is A058370 = Primes p such that p and p^2 have same digit sum. This sequence is prime subsequence of A070276 = Sum of digits of n equals the sum of digits of n^3.

Programs

  • Mathematica
    Select[Range[10000000], PrimeQ[ # ] && Plus @@ IntegerDigits[ # ] == Plus @@ IntegerDigits[ #^3] &]
    Select[Prime[Range[151*10^5]],Total[IntegerDigits[#]]==Total[ IntegerDigits[ #^3]]&] (* Harvey P. Dale, Feb 17 2018 *)

Extensions

More terms from Olaf Voß, Feb 11 2008
Showing 1-8 of 8 results.