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

A004166 Sum of digits of 3^n.

Original entry on oeis.org

1, 3, 9, 9, 9, 9, 18, 18, 18, 27, 27, 27, 18, 27, 45, 36, 27, 27, 45, 36, 45, 27, 45, 54, 54, 63, 63, 81, 72, 72, 63, 81, 63, 72, 99, 81, 81, 90, 90, 81, 90, 99, 90, 108, 90, 99, 108, 126, 117, 108, 144, 117, 117, 135, 108, 90, 90, 108, 126, 117, 99
Offset: 0

Views

Author

Keywords

Comments

All terms a(n), n > 1, are divisible by 9. - M. F. Hasler, Sep 27 2017

Crossrefs

Cf. sum of digits of k^n: A001370 (k=2), this sequence (k=3), A065713 (k=4), A066001 (k=5), A066002 (k=6), A066003 (k=7), A066004 (k=8), A065999 (k=9), A066005 (k=11), A066006 (k=12), A175527 (k=13).

Programs

  • Mathematica
    Total[IntegerDigits[#]]&/@(3^Range[0,60]) (* Harvey P. Dale, Mar 03 2013 *)
    Table[Total[IntegerDigits[3^n]], {n, 0, 60}] (* Vincenzo Librandi, Oct 08 2013 *)
  • PARI
    a(n)=sumdigits(3^n); \\ Michel Marcus, Nov 01 2013
    
  • Python
    def a(n): return sum(map(int, str(3**n)))
    print([a(n) for n in range(61)]) # Michael S. Branicky, Apr 25 2022

Formula

a(n) = A007953(A000244(n)). - Michel Marcus, Nov 01 2013

Extensions

Edited by M. F. Hasler, May 18 2017

A067500 Powers of 3 with digit sum also a power of 3.

Original entry on oeis.org

1, 3, 9, 27, 81, 243, 19683, 59049, 177147, 1594323, 43046721, 129140163, 10460353203, 7625597484987, 617673396283947, 50031545098999707, 150094635296999121, 4052555153018976267
Offset: 1

Views

Author

Amarnath Murthy, Feb 11 2002

Keywords

Comments

a(n) = 3^A118872(n).

Crossrefs

Programs

  • Mathematica
    With[{l3s=3^Range[0,200]},Select[l3s,MemberQ[l3s,Total[IntegerDigits[ #]]]&]] (* Harvey P. Dale, May 20 2011 *)

Extensions

More terms from Harvey P. Dale, Mar 02 2002
Offset corrected by Reinhard Zumkeller, May 14 2011

A358633 a(n) is the smallest k > 1 such that the sum of digits of n^k is a power of n (or -1 if no such k exists).

Original entry on oeis.org

2, 2, 2, 18, 8, 7, 4, 3, 2, 2, 45741764, 4216, 32, 537, 39, 44, 3, 3, 1187, 13, 67, 4
Offset: 1

Views

Author

Jon E. Schoenfield, Nov 24 2022

Keywords

Comments

a(11), if it is not -1, seems likely to exceed 4*10^6.
Additional known terms: a(12)..a(22) = {4216, 32, 537, 39, 44, 3, 3, 1187, 13, 67, 4}; a(24)..a(28) = {88, 4, 3, 3, 4}; a(30) = 399, a(31) = 7, a(33)..a(55) = {159, 7, 5, 4, 191, 188, 228, 13, 389332, 236, 7, 11543, 6, 5, 302, 292, 15405, 788, 337, 18213, 7, 6, 21248}; a(57)..a(60) = {413, 7, 25683, 1044}; a(62) = 476.
a(10^m) = 2 for all m >= 0, since the sum of digits of (10^m)^2 is 1.
If n is not divisible by 10, then a(n) tends to be fairly close to a number x such that the number of digits of n^x is (2/9)*n^j for some positive integer j, i.e., log_10(n^x) ~ (2/9)*n^j, so a(n) ~ (2/9)*n^j/log_10(n) for some integer j. E.g., a(12) = 4216 ~ 4269.90... = (2/9)*12^4/log_10(12). For n = 11, such numbers x are (2/9)*11^j/log_10(11) = 0.213389... * 11^j, which, for j = 1..7, round to 2, 26, 284, 3124, 34366, 378032, and 4158357. (By exhaustive search, a(n) > 10^5 (or a(n) = -1) for n = 23, 29, 32, 56, and 61, and (if a(11) != -1) a(11) > 4*10^5, so a(11) seems very likely to be either in the general vicinity of 4.16*10^6 or > 4.5*10^7.)
a(32) = 4950773; a(61) = 1722427. - Martin Ehrenstein, Nov 25 2022
3*10^7 < a(23) <= 555650815. - Martin Ehrenstein, Nov 28 2022

Examples

			The sum of digits of 1^2 = 1 is 1, which is a power of 1, so a(1) = 2.
The sum of digits of 2^2 = 4 is 4, which is a power of 2, so a(2) = 2.
For k = 2..17, the sum of digits of 4^k is {7, 10, 13, 7, 19, 22, 25, 19, 31, 25, 37, 40, 43, 37, 58, 61}, none of which is a power of 4, but the sum of digits of 4^18 = 68719476736 is 6+8+7+1+9+4+7+6+7+3+6 = 64 = 4^3, so a(4) = 18.
		

Crossrefs

Cf. A066005 (sum of digits of 11^n).

Programs

  • PARI
    isok(k,n) = my(s=sumdigits(n^k), x, y); if (s==1, return(2)); (s==n) || ((ispower(s,,&x)) && ((x==n) || (ispower(n,,&y) && (y==x))));
    a(n) = my(k=2); while (!isok(k,n), k++); k; \\ Michel Marcus, Nov 25 2022

Extensions

a(11)-a(22) from Martin Ehrenstein, Nov 26 2022

A358667 T(n,k) is the k-th integer j > 1 such that the sum of digits of n^j is a power of n (or -1 if no such k-th integer exists); table read by downward antidiagonals.

Original entry on oeis.org

2, 3, 2, 4, 3, 2, 5, 9, 3, 18, 6, 36, 4, 88, 8, 7, 85, 5, 97, 208, 7, 8, 176, 9, 100, 977, 8, 4, 9, 194, 10, 1521, 1007, 9, 11, 3, 10, 200, 11, 6034, 4938, 10, 4433, 12, 2, 11, 375, 13, 6052, 24709, 13, 30810, 125, 18, 2, 12, 1517, 16, 96867, 24733, 51, 216613, 1014, 1503, 3
Offset: 1

Views

Author

Jon E. Schoenfield, Nov 25 2022

Keywords

Comments

T(11,1) is unknown at this time.

Examples

			Table begins:
.
   n\k|   1    2     3     4      5     6     7     8    9    10   11 ...
   ---+------------------------------------------------------------------
    1 |   2    3     4     5      6     7     8     9   10    11   12 ...
    2 |   2    3     9    36     85   176   194   200  375  1517  ...
    3 |   2    3     4     5      9    10    11    13   16   ...
    4 |  18   88    97   100   1521  6034  6052 96867  ...
    5 |   8  208   977  1007   4938 24709 24733   ...
    6 |   7    8     9    10     13    51   ...
    7 |   4   11  4433 30810 216613   ...
    8 |   3   12   125  1014    ...
    9 |   2   18  1503   ...
   10 |   2    3   ...
   11 |   ?  ...
  ... | ...
		

Crossrefs

Formula

T(n,1) = A358633(n).
T(1,k) = k+1.
T(2,k) = A095412(k+2).
T(3,k) = A118872(k+2).
Showing 1-4 of 4 results.