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

A330822 a(n) = digsum(2^a(n-1)) with a(0) = 0.

Original entry on oeis.org

0, 1, 2, 4, 7, 11, 14, 22, 25, 29, 41, 50, 76, 106, 142, 214, 313, 380, 508, 691, 875, 1184, 1687, 2243, 3164, 4126, 5578, 7855, 10676, 13981, 18659, 25421, 34277, 46409, 63023, 85658, 116248, 157660, 213892, 290554, 393145, 532838, 723451, 981020, 1328449, 1799363
Offset: 0

Views

Author

Haris Ziko, Jan 02 2020

Keywords

Examples

			Starting with a(0) = 0.
a(1) = digsum(2^0) = digsum(1) = 1.
a(2) = digsum(2^1) = digsum(2) = 2.
a(3) = digsum(2^2) = digsum(4) = 4.
a(4) = digsum(2^4) = digsum(16) = 7.
etc.
		

Crossrefs

Programs

  • Magma
    a:=[0,1]; [n le 2 select a[n] else &+Intseq(2^Self(n-1)):n in [1..50]]; // Marius A. Burtea, Jan 03 2020
  • Mathematica
    a[0] = 0; a[n_] := a[n] = Total @ IntegerDigits[2^a[n-1]]; Array[a, 45, 0] (* Amiram Eldar, Jan 03 2020 *)
    NestList[Total[IntegerDigits[2^#]]&,0,50] (* Harvey P. Dale, Jul 19 2025 *)
  • PARI
    a(n)={my(x=0); for(i=0, n-1, x=sumdigits(2^x)); x};
    lista(nn)={my(x=0, v=vector(nn+1)); v[1]=0; for(i=1, nn, x=sumdigits(2^x); v[i+1]=x); v};
    

A364606 Numbers k such that the average digit of 2^k is an integer.

Original entry on oeis.org

0, 1, 2, 3, 6, 13, 16, 26, 46, 51, 56, 73, 122, 141, 166, 313, 383
Offset: 1

Views

Author

Jon E. Schoenfield, Jul 29 2023

Keywords

Examples

			2^26 = 67108864 is an 8-digit number; its average digit is (6+7+1+0+8+8+6+4)/8 = 40/8 = 5, an integer, so 26 is a term.
		

Crossrefs

Programs

  • Maple
    q:= n-> (l-> irem(add(i, i=l), nops(l))=0)(convert(2^n, base, 10)):
    select(q, [$0..400])[];  # Alois P. Heinz, Jul 29 2023
  • Mathematica
    Select[Range[0, 2^12], IntegerQ@ Mean@ IntegerDigits[2^#] &] (* Michael De Vlieger, Jul 29 2023 *)
  • PARI
    isok(k) = my(d=digits(2^k)); !(vecsum(d) % #d); \\ Michel Marcus, Jul 29 2023
    
  • Python
    from itertools import count, islice
    from gmpy2 import mpz, digits
    def A364606_gen(startvalue=0): # generator of terms >= startvalue
        m = mpz(1)<A364606_list = list(islice(A364606_gen(),10)) # Chai Wah Wu, Jul 31 2023

Formula

{ k : A001370(k) mod A034887(k) = 0 }.

A375976 Sum of squares of the decimal digits of 2^n.

Original entry on oeis.org

1, 4, 16, 64, 37, 13, 52, 69, 65, 30, 21, 84, 133, 150, 126, 162, 131, 64, 77, 177, 191, 164, 139, 301, 225, 113, 266, 197, 231, 269, 209, 275, 404, 450, 443, 371, 426, 332, 461, 487, 413, 288, 266, 396, 346, 382, 426, 404, 463, 393, 514, 528, 517, 569, 584
Offset: 0

Views

Author

Luca Khan, Sep 04 2024

Keywords

Examples

			For n=4, 2^4 = 16 and those digits 1^2 + 6^2 = 37 = a(4).
		

Crossrefs

Programs

  • Mathematica
    a[n_]:=Norm[IntegerDigits[2^n]]^2; Array[a,55,0] (* Stefano Spezia, Sep 06 2024 *)
  • PARI
    a(n) = norml2(digits(2^n)); \\ Michel Marcus, Sep 06 2024
    
  • Python
    def A375976(n): return sum((0, 1, 4, 9, 16, 25, 36, 49, 64, 81)[int(d)] for d in str(1<'0') # Chai Wah Wu, Sep 30 2024

Formula

a(n) = A003132(A000079(n)).

A112436 Next term is the sum of the last 10 digits in the sequence, beginning with a(10) = 5.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 5, 10, 11, 13, 17, 25, 22, 25, 30, 29, 32, 30, 29, 33, 36, 34, 36, 42, 37, 41, 37, 40, 35, 37, 37, 42, 38, 45, 46, 46, 46, 50, 44, 43, 40, 34, 31, 30, 25, 25, 28, 31, 31, 32, 30, 26, 24, 26, 30, 28, 35, 35, 37, 39, 48, 50, 47, 50, 45, 42, 36, 40, 33
Offset: 1

Views

Author

Alexandre Wajnberg, Dec 11 2005

Keywords

Comments

Variation on Angelini's A112395. The sequence cycles at a(28)=42 and the loop has 312 terms. Computed by Gilles Sadowski.

Examples

			a(28)=42 because 2+9 + 3+3 + 3+6 + 3+4 + 3+6 = 42
		

Crossrefs

A112438 Next term is the sum of the last 10 digits in the sequence, beginning with a(10) = 7.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 7, 14, 19, 29, 40, 44, 38, 44, 42, 37, 43, 42, 37, 39, 45, 44, 45, 48, 50, 43, 41, 38, 40, 32, 32, 30, 28, 27, 32, 32, 32, 34, 31, 26, 29, 35, 38, 42, 44, 44, 41, 38, 38, 43, 42, 40, 39, 40, 33, 32, 31, 31, 23, 24, 24, 25, 28, 34, 36, 39, 45, 47, 48
Offset: 1

Views

Author

Alexandre Wajnberg, Dec 11 2005

Keywords

Comments

Variation on Angelini's A112395. The sequence cycles at a(18)=44 and the loop has 312 terms. Computed by Gilles Sadowski.

Examples

			a(18)=44 because 1+9 + 2+9 + 4+0 + 4+4 + 3+8 = 44
		

Crossrefs

A112439 Next term is the sum of the last 10 digits in the sequence, beginning with a(10) = 8.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 8, 16, 23, 28, 38, 49, 46, 49, 57, 59, 62, 57, 59, 60, 54, 49, 54, 51, 43, 44, 43, 37, 38, 43, 43, 42, 41, 36, 34, 34, 34, 35, 38, 40, 37, 40, 37, 39, 40, 40, 34, 37, 37, 35, 39, 47, 51, 47, 48, 52, 47, 47, 52, 48, 48, 53, 50, 44, 45, 42, 36, 37, 42
Offset: 1

Views

Author

Alexandre Wajnberg, Dec 11 2005

Keywords

Comments

Variation on Angelini's A112395. The sequence cycles at a(32)=37 and the loop has 312 terms. Computed by Gilles Sadowski.

Examples

			a(32)=37 because 5+4 + 5+1 + 4+3 + 4+4 + 4+3 = 37
		

Crossrefs

A112440 Next term is the sum of the last 10 digits in the sequence, beginning with a(10) = 9.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 18, 27, 36, 45, 54, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45
Offset: 1

Views

Author

Alexandre Wajnberg, Dec 11 2005

Keywords

Comments

Variation on Angelini's A112395. The sequence cycles at a(17)=45 and the loop has one term. Computed by Gilles Sadowski.

Examples

			a(17)=45 because 1+8 + 2+7 + 3+6 + 4+5 + 5+4 = 45
		

Crossrefs

A117771 Numbers n such that digit sum of 2^n is less than or equal to n.

Original entry on oeis.org

5, 9, 10, 17, 70
Offset: 1

Views

Author

Joshua Zucker, Jul 24 2006

Keywords

Comments

Probably there are no more terms.
Probably 5 and 70 are the only cases when digit sum of 2^n is equal to n. - Tanya Khovanova, Jul 23 2006
Probably 1, 2, 5 and 70 are the only cases when digit sum of 2^n is divisible by n. - Zak Seidov, Jul 24 2006

Crossrefs

Cf. A001370.

Programs

  • Mathematica
    Select[Range[80],#>=Total[IntegerDigits[2^#]]&] (* Harvey P. Dale, Sep 22 2019 *)
  • PARI
    isok(n) = d = digits(2^n); sum(i=1, #d, d[i]) <= n; \\ Michel Marcus, Aug 17 2013

A286512 Numbers N for which there is k > 0 such that sum of digits(N^k) = N, but the least such k is larger than the least k for which sum of digits(N^k) > N*11/10.

Original entry on oeis.org

17, 31, 63, 86, 91, 103, 118, 133, 155, 157, 211, 270, 290, 301, 338, 352, 421, 432, 440, 441, 450, 478, 513, 533, 693, 853, 1051, 1237, 1363, 1459, 1526, 1665, 2781
Offset: 1

Views

Author

M. F. Hasler, May 18 2017

Keywords

Comments

The set of these numbers appears to be finite, and probably 2781 is its largest element.
The motivation for this sequence is the study of the behavior of the sum of digits of powers of a given number. Statistically, sumdigits(n^k) ~ 4.5*log_10(n')*k (where n' = n without trailing 0's), but typically fluctuations of some percent persist up to large values of k. (Cf. the graph of sequences n^k cited in the cross-references.)
The ratio of 11/10 is somewhat arbitrary, but larger ratios of the simple form (1 + 1/m) yield quite small subsets of this sequence (for m=2 the only element is 118, for m=3 the set is {31, 86, 118}, for m=1 it is empty), and smaller ratios yield much larger (possibly infinite?) sets. Also, the condition can be written sumdigits(N^k)-N > N/10, and 10 is the base we are using.
To compute the sequence A247889 we would like to have a rule telling us when we can stop the search for an exponent. It appears that sumdigits(N^k) >= 2*N is a limit that works for all N; the present sequence gives counterexamples to the (r.h.s.) limit of 1.1*N. The above comment mentioned the counterexamples {118} resp. {31, 86, 118}) for limits N*3/2 and N*4/3.

Crossrefs

Cf. sum of digits of k^n: A001370 (k=2), A004166 (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). (In these sequences, k is fixed and n is the index/exponent; in the present sequence it's the opposite and therefore the names k <-> n are exchanged.)

Programs

  • PARI
    for(n=1,5000,A247889(n)&&!A247889(n,n*11\10)&&print1(n",")) \\ Here, A247889() is a variant of the function computing that sequence which accepts as second optional argument a limit m, stopping the search for the exponent as soon as the digital sum of n^k exceeds m.

A287058 Sum of decimal digits of 118^n.

Original entry on oeis.org

1, 10, 19, 19, 55, 64, 55, 64, 82, 91, 109, 100, 109, 181, 118, 145, 127, 163, 154, 172, 154, 190, 226, 190, 208, 217, 271, 289, 253, 280, 298, 307, 334, 289, 334, 280, 361, 343, 334, 379, 406, 406, 379, 424, 379, 424, 415, 406, 523, 433, 478
Offset: 0

Views

Author

M. F. Hasler, May 18 2017

Keywords

Comments

118 is exceptional in the sense that it appears to be the only number m for which the smallest k such that sumdigits(m^k) = m occurs after the smallest k such that sumdigits(m^k) > m*3/2. If this last limit is decreased to m*4/3, then 31 and 86 also have this property. It appears that no number has this property if the limit is increased to 2m, see also A247889.
It is also remarkable that many values in the sequence are repeated (19, 55, 64, 109, 190, 154, 280, 289, 334 (3 times), 379, 406, 424, ...), while most other numbers never appear.

Crossrefs

Cf. sum of digits of k^n: A001370 (k=2), A004166 (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).

Programs

  • Mathematica
    Total[IntegerDigits[#]]&/@NestList[118#&,1,50] (* Harvey P. Dale, Feb 24 2022 *)
  • PARI
    a(n)=sumdigits(118^n)
Previous Showing 31-40 of 42 results. Next