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

A095406 Numbers n such that Sum-of-digits-of-n < Sum-of-digits-of-all-distinct-prime-factors-of-n.

Original entry on oeis.org

10, 12, 14, 15, 20, 21, 30, 34, 35, 38, 40, 42, 50, 51, 57, 60, 63, 70, 74, 90, 91, 95, 100, 102, 104, 105, 106, 110, 111, 112, 114, 115, 116, 118, 119, 120, 122, 123, 126, 130, 132, 133, 134, 140, 141, 142, 145, 146, 150, 152, 153, 154, 158, 161, 170, 171, 174
Offset: 1

Views

Author

Labos Elemer, Jun 21 2004

Keywords

Examples

			n=38: digit sum=11, prime factor-digit sum=2+1+9=12>11, so 38 is here;
n=10^j:digit sum=1, prime factor-digit sum=2+5=7?1. so 10^j is here for all j [this implies that the sequence is infinite].
		

Crossrefs

Programs

  • Mathematica
    ffi[x_] :=Flatten[FactorInteger[x]] lf[x_] :=Length[FactorInteger[x]] ba[x_] :=Table[Part[ffi[x], 2*j-1], {j, 1, lf[x]}] sd[x_] :=Apply[Plus, IntegerDigits[x]] tdp[x_] :=Flatten[Table[IntegerDigits[Part[ba[x], j]], {j, 1, lf[x]}], 1] sdp[x_] :=Apply[Plus, tdp[x]] a=Table[sd[w], {w, 1, 256}];b=Table[sdp[w], {w, 1, 150}];b-a; Flatten[Position[Sign[b-a], -1]]
    Select[Range[200],Total[IntegerDigits[#]]Harvey P. Dale, May 06 2012 *)

Formula

Solutions to A007953[x] < A095402[x].

A071421 a(n) = a(n-1) + sum of decimal digits of n^n.

Original entry on oeis.org

1, 5, 14, 27, 38, 65, 90, 127, 172, 173, 214, 268, 326, 378, 477, 565, 663, 771, 898, 929, 1046, 1194, 1340, 1493, 1644, 1798, 1987, 2150, 2317, 2380, 2564, 2769, 2976, 3190, 3450, 3720, 3991, 4256, 4562, 4674, 4982, 5297, 5610, 5935, 6241, 6593, 6967
Offset: 1

Views

Author

Labos Elemer, May 27 2002

Keywords

Crossrefs

Programs

  • Mathematica
    s=0; Do[s=s+Apply[Plus, IntegerDigits[n^n]]; Print[s], {n, 1, 128}]
    nxt[{n_,a_}]:={n+1,a+Total[IntegerDigits[(n+1)^(n+1)]]}; NestList[nxt,{1,1},50][[All,2]] (* Harvey P. Dale, Dec 11 2016 *)

A071422 a(n) = a(n-1) + sum of decimal digits of sigma(n), the sum of divisors of n.

Original entry on oeis.org

1, 4, 8, 15, 21, 24, 32, 38, 42, 51, 54, 64, 69, 75, 81, 85, 94, 106, 108, 114, 119, 128, 134, 140, 144, 150, 154, 165, 168, 177, 182, 191, 203, 212, 224, 234, 245, 251, 262, 271, 277, 292, 300, 312, 327, 336, 348, 355, 367, 379, 388, 405, 414, 417, 426, 429
Offset: 1

Views

Author

Labos Elemer, May 27 2002

Keywords

Crossrefs

Partial sums of A067342.

Programs

  • Mathematica
    s=0; Do[s=s+Apply[Plus, IntegerDigits[DivisorSigma[1, n]]]; Print[s], {n, 1, 128}]
    nxt[{n_,a_}]:={n+1,a+Total[IntegerDigits[DivisorSigma[1,n+1]]]}; Transpose[ NestList[nxt,{1,1},60]][[2]] (* Harvey P. Dale, Jan 25 2013 *)

A283556 Digital root of the sum of the first n primes.

Original entry on oeis.org

0, 2, 5, 1, 8, 1, 5, 4, 5, 1, 3, 7, 8, 4, 2, 4, 3, 8, 6, 1, 9, 1, 8, 1, 9, 7, 9, 4, 3, 4, 9, 1, 6, 8, 3, 8, 6, 1, 2, 7, 9, 8, 9, 2, 6, 5, 6, 1, 8, 1, 5, 4, 9, 7, 6, 2, 4, 3, 4, 2, 4, 8, 4, 5, 1, 8, 1, 8, 3, 8, 6, 8, 7, 5, 9, 1, 6, 8, 9, 5, 9, 5, 3, 2, 3, 1, 3, 2, 9, 2, 6, 5, 7, 8, 4, 8, 7, 3, 2, 3
Offset: 0

Views

Author

Dimitris Valianatos, Mar 10 2017

Keywords

Examples

			For n=3, a(3)=1 because the sum of the first 3 primes is 10 and the sum of digits of 10 is 1.
		

Crossrefs

Programs

  • Maple
    0, op(subs(0=9, ListTools:-PartialSums(select(isprime, [2,seq(i,i=3..1000,2)])) mod 9)); # Robert Israel, Mar 30 2017
  • Mathematica
    With[{nn = 78}, {0}~Join~Table[NestWhile[Total@ IntegerDigits@ # &, #, # >= 10 &] &@ Total@ Take[#, n], {n, nn}] &@ Array[Prime, nn]] (* Michael De Vlieger, Mar 15 2017 *)
  • PARI
    {
    p=0;print1(p", ");
    forprime(n=2,1000,
             p+=n;
             while(p>9,p=sumdigits(p))
             ;print1(p", ")
            )
    }
    
  • Python
    from sympy import primerange
    from itertools import accumulate
    prime_sum = [0] + list(accumulate(primerange(2, 1000)))
    def dig_root(n): return 1+(n-1)%9
    def a(n):
        return 0 if n<1 else dig_root(prime_sum[n])
    print([a(n) for n in range(101)]) # Indranil Ghosh, Mar 30 2017

Formula

a(n) = ((A007504(n) - 1) mod 9) + 1.
a(n) = ((A051351(n) - 1) mod 9) + 1.
a(n) = A010888(A007504(n)). - Michel Marcus, Mar 26 2017

Extensions

Corrected by Robert Israel, Mar 30 2017

A058196 Sum of digits of first 10^n primes.

Original entry on oeis.org

2, 57, 1111, 17024, 224155, 2674957, 31352962, 363506969, 4127383480, 45630284509, 502160313778
Offset: 0

Views

Author

Robert G. Wilson v, Nov 27 2000

Keywords

Crossrefs

Programs

  • Mathematica
    NextPrime[ n_Integer ] := Module[ {k}, k = n + 1; While[ ! PrimeQ[ k ], k++ ]; k ]; c = d = p = q = 0; Do[ While[ d++; d <= 10^n, q = NextPrime[ q ]; p = p + Apply[ Plus, RealDigits[ q ][ [ 1 ] ] ]; If[ PrimeQ[ p ], c++ ] ]; d--; Print[ p ], {n, 0, 10}]
  • PARI
    a(n) = {my(k = 0, s = 0, pow = 10^n); forprime(p = 2, , k++; s += sumdigits(p); if(k == pow, break)); s;} \\ Amiram Eldar, Jun 03 2024

Extensions

a(9)-a(10) from Amiram Eldar, Jun 03 2024

A071122 a(n) = a(n-1) + sum of decimal digits of 2^n.

Original entry on oeis.org

2, 6, 14, 21, 26, 36, 47, 60, 68, 75, 89, 108, 128, 150, 176, 201, 215, 234, 263, 294, 320, 345, 386, 423, 452, 492, 527, 570, 611, 648, 695, 753, 815, 876, 935, 999, 1055, 1122, 1193, 1254, 1304, 1350, 1406, 1464, 1526, 1596, 1664, 1737, 1802, 1878, 1958
Offset: 1

Views

Author

Labos Elemer, May 27 2002

Keywords

Crossrefs

Programs

  • Mathematica
    s=0; Do[s=s+Apply[Plus, IntegerDigits[2^n]]; Print[s], {n, 1, 128}]

A071123 a(n) = a(n-1) + sum of decimal digits of n!.

Original entry on oeis.org

1, 3, 9, 15, 18, 27, 36, 45, 72, 99, 135, 162, 189, 234, 279, 342, 405, 459, 504, 558, 621, 693, 792, 873, 945, 1026, 1134, 1224, 1350, 1467, 1602, 1710, 1854, 1998, 2142, 2313, 2466, 2574, 2763, 2952, 3096, 3285, 3465, 3681, 3888, 4104, 4329, 4563, 4788
Offset: 1

Views

Author

Labos Elemer, May 27 2002

Keywords

Crossrefs

Programs

  • Mathematica
    s=0; Do[s=s+Apply[Plus, IntegerDigits[n! ]]; Print[s], {n, 1, 128}]
Previous Showing 11-17 of 17 results.